Main Page | Class Hierarchy | Class List | Directories | File List | Class Members | File Members | Related Pages

GEdit Class Reference

An edit box allowing the user to enter text. More...

#include <GEdit.h>

Inheritance diagram for GEdit:

GControl GView GTarget GEvent GFlags List of all members.

Public Member Functions

 GEdit (int id, int x, int y, int cx, int cy, char *name)
 Constructor.
bool MultiLine ()
 Gets "Allow multiple lines".
void MultiLine (bool m)
 Sets "Allow multiple lines".
bool Password ()
 Is the text obsured by hashes?
void Password (bool m)
 Sets the text to be obsured by hashes.
void Value (int i)
 Interprets the text in the control as an integer.
int Value ()
 Sets the text in the control to an integer.
void Select (int Start=0, int Len=-1)
 Selects a region of text.
int GetCaret ()
 Gets the Caret position in characters.
void SetCaret (int Pos)
 Sets the Caret position in characters.
int OnEvent (GMessage *Msg)
 Called to process every message received by this window.
bool OnKey (GKey &k)
 A key was pressed while this view has focus.
char * Name ()
 Returns the utf-8 text associated with this view.
bool Name (char *s)
 Sets the utf-8 text associated with this view.
char16NameW ()
 Returns the wide char text associated with this view.
bool NameW (char16 *s)
 Sets the wide char text associated with this view.
void Enabled (bool e)
 Sets the enabled state.
bool Enabled ()
 true if the view is enabled
void Focus (bool f)
 Sets the keyboard focus state on the view.
bool Focus ()
 true if the view has keyboard focus
bool SetPos (GRect &p, bool Repaint=false)
 Set the position of the view in terms of it's parent.
int OnNotify (GView *c, int f)
 Called when a child view or view with it's SetNotify() set to this window changes.
void OnCreate ()
 The view is attached.

Detailed Description

An edit box allowing the user to enter text.


Constructor & Destructor Documentation

GEdit::GEdit int  id,
int  x,
int  y,
int  cx,
int  cy,
char *  name
 

Constructor.

Parameters:
id  Ctrl's ID
x  x coord
y  y coord
cx  width
cy  height
name  Initial text


Member Function Documentation

bool GEdit::Name char *  s  ) 
 

Sets the utf-8 text associated with this view.

Name and NameW are interchangable. Using them in any order will convert the text between utf-8 and wide to satify any requirement. Generally once the opposing version of the string is required both the utf-8 and wide copies of the string remain cached in RAM until the Name is changed.

Reimplemented from GView.

char16 * GEdit::NameW  )  [virtual]
 

Returns the wide char text associated with this view.

On Win32 the wide characters are 16 bits, on unix systems they are 32-bit characters.

Reimplemented from GView.

int GEdit::OnNotify GView c,
int  f
[virtual]
 

Called when a child view or view with it's SetNotify() set to this window changes.

The event by default will bubble up to the GWindow at the top of the window heirarchy visiting each GView on the way. If it reaches a GView that processes it then the event stops propergating up the heirarchy.

Reimplemented from GView.


The documentation for this class was generated from the following files:
Generated on Wed Oct 26 14:46:58 2005 for Lgi by  doxygen 1.4.1