GLOW API version 1.0 reference

Back to
Table of contents


class GlowLabeledHiddenTextFieldWidget

General information

type: class
inherits: GlowHiddenTextFieldWidget, GlowWidgetLabelHelper
module: glowTextFieldWidget

GlowLabeledHiddenTextFieldWidget is an editable text field whose contents are hidden. It also includes a label and adjusts packing accordingly.

GLOW programs that require text fields with masked entry, such as password fields, should use this class.

Constants

Positioning constants
These constants are inherited from GlowWidgetLabelHelper.

enum GlowWidgetLabelHelper::LabelPosition defaultLabelPosition
enum GlowWidgetLabelHelper::LabelPosition leftLabelPosition
enum GlowWidgetLabelHelper::LabelPosition rightLabelPosition
enum GlowWidgetLabelHelper::LabelPosition topLabelPosition
enum GlowWidgetLabelHelper::LabelPosition bottomLabelPosition

Inherited constants
These constants are inherited from GlowTextFieldWidget.

enum GlowTextFieldWidget::Style plainStyle
enum GlowTextFieldWidget::Style etchedStyle
enum GlowTextFieldWidget::Style raisedStyle
enum GlowTextFieldWidget::Style loweredStyle

Inherited constants
These constants are inherited from GlowWidget.

enum GlowWidget::AutoPackError noAutoPackError
enum GlowWidget::AutoPackError hAutoPackError
enum GlowWidget::AutoPackError vAutoPackError

enum GlowWidget::AutoPackOptions noReshape
enum GlowWidget::AutoPackOptions preferredSize
enum GlowWidget::AutoPackOptions expandPreferredSize
enum GlowWidget::AutoPackOptions forcedSize
enum GlowWidget::AutoPackOptions noMove
enum GlowWidget::AutoPackOptions leftPos
enum GlowWidget::AutoPackOptions rightPos
enum GlowWidget::AutoPackOptions topPos
enum GlowWidget::AutoPackOptions bottomPos
enum GlowWidget::AutoPackOptions centerPos

enum { unspecifiedSize }
enum { unspecifiedPos }

Methods

Constructors and destructor

GlowLabeledHiddenTextFieldWidget(GlowWidget* parent, const GlowLabeledTextFieldParams& params, char hideCharacter = '#')

Creates a new GlowLabeledHiddenTextFieldWidget using the given params and adds it to parent's children.

GlowLabeledHiddenTextFieldWidget(GlowWidgetRoot* root, const GlowLabeledTextFieldParams& params, char hideCharacter = '#')

Creates a new GlowLabeledHiddenTextFieldWidget using the given params and adds it to the top level under root.

GlowLabeledHiddenTextFieldWidget(void)

Creates a new GlowLabeledHiddenTextFieldWidget but does not initialize it. A text field created in this way may not be used until its Init() method is called.

void Init(GlowWidget* parent, const GlowLabeledTextFieldParams& params, char hideCharacter = '#')

Initializes a new GlowLabeledHiddenTextFieldWidget using the given params and adds it to parent's children.

void Init(GlowWidgetRoot* root, const GlowLabeledTextFieldParams& params, char hideCharacter = '#')

Initializes a new GlowLabeledHiddenTextFieldWidget using the given params and adds it to the top level under root.

virtual ~GlowLabeledHiddenTextFieldWidget(void)

Inherited methods
These methods are inherited from GlowWidgetLabelHelper.

int GetLabelSpacing(void) const

void SetLabelSpacing(int spacing)

int GetLabelPosition(void) const

void SetLabelPosition(int position)

int GetLabelWidth(void) const

void SetLabelWidth(int width)

int GetLabelHeight(void) const

void SetLabelHeight(int height)

const char* GetLabelText(void) const

void SetLabelText(const char* text)

GlowFont GetLabelFont(void) const

void SetLabelFont(GlowFont font)

GlowColor GetLabelTextColor(void) const

void SetLabelTextColor(GlowColor font)

GlowColor GetLabelDisableTextColor(void) const

void SetLabelDisableTextColor(GlowColor font)

Inherited methods
These methods are inherited from GlowHiddenTextFieldWidget.

const char* GetTextChars(void) const

const std::string& GetTextString(void) const

void SetText(const char* text)

void SetText(const std::string& str)

std::string GetSelectionString(void) const

char GetHideCharacter(void) const

void SetHideCharacter(char ch)

Inherited methods
These methods are inherited from GlowTextFieldWidget.

int GetStyle(void) const

void SetStyle(int style)

GlowFont GetFont(void) const

void SetFont(GlowFont font)

int GetBlinkInterval(void) const

void SetBlinkInterval(int interval)

int GetAutoScrollInterval(void) const

void SetAutoScrollInterval(int interval)

int GetSelectionLength(void) const

int GetSelectionStart(void) const

int GetSelectionEnd(void) const

void SetSelection(int start, int end)

void SetSelection(int position)

void ReplaceSelectionWith(const char* text)

void ReplaceSelectionWith(const std::string& str)

GlowColor GetBackColor(void) const

void SetBackColor(GlowColor c)

GlowColor GetTextColor(void) const

void SetTextColor(GlowColor c)

GlowColor GetCaretColor(void) const

void SetCaretColor(GlowColor c)

GlowColor GetFocusBackColor(void) const

void SetFocusBackColor(GlowColor c)

GlowColor GetFocusTextColor(void) const

void SetFocusTextColor(GlowColor c)

GlowColor GetFocusCaretColor(void) const

void SetFocusCaretColor(GlowColor c)

GlowColor GetHiliteBackColor(void) const

void SetHiliteBackColor(GlowColor c)

GlowColor GetHiliteTextColor(void) const

void SetHiliteTextColor(GlowColor c)

GlowColor GetDisableBackColor(void) const

void SetDisableBackColor(GlowColor c)

GlowColor GetDisableTextColor(void) const

void SetDisableTextColor(GlowColor c)

GlowColor GetDisableCaretColor(void) const

void SetDisableCaretColor(GlowColor c)

GlowColor GetDisableOutlineColor(void) const

void SetDisableOutlineColor(GlowColor c)

GlowColor GetLightBevelColor(void) const

void SetLightBevelColor(GlowColor c)

GlowColor GetDarkBevelColor(void) const

void SetDarkBevelColor(GlowColor c)

Inherited methods
These methods are inherited from GlowWidget.

void Move(int x, int y)

int PositionX(void) const

int PositionY(void) const

int RootPositionX(void) const

int RootPositionY(void) const

int GlobalPositionX(void) const

int GlobalPositionY(void) const

void Reshape(int width, int height)

int Width(void) const

int Height(void) const

GlowWidget::AutoPackError AutoPack(int leftLimit, int rightLimit, int topLimit, int bottomLimit, GlowWidget::AutoPackOptions hOption, GlowWidget::AutoPackOptions vOption, int& leftMargin, int& rightMargin, int& topMargin, int& bottomMargin)
GlowWidget::AutoPackError AutoPack(int leftLimit, int rightLimit, int topLimit, int bottomLimit, GlowWidget::AutoPackOptions hOption, GlowWidget::AutoPackOptions vOption)

GlowWidget::AutoPackError AutoReshape(int& leftMargin, int& rightMargin, int& topMargin, int& bottomMargin)
GlowWidget::AutoPackError AutoReshape()

void Hide(void)

void Show(void)

bool IsVisible(void) const

bool IsInvisible(void) const

bool IsVisibleMasked(void) const

void Refresh(void)

void SetRefreshEnabled(bool enabled)

bool IsRefreshEnabled(void) const

void SetClipping(bool clip)

bool IsClipping(void)

void GrabKeyboardFocus(void)

void RelinquishKeyboardFocus(void)

bool HasKeyboardFocus(void)

GlowWidgetRoot* Root(void)

void SetRefCon(long refcon)

long GetRefCon(void)

Inherited methods
These methods are inherited from GlowComponent.

void Close(void)

GlowComponent* Parent(void) const

GlowSubwindow* WhichWindow(void)

GlowSubwindow* ParentWindow(void) const

GlowWindow* ToplevelWindow(void)

bool IsToplevel(void) const

GlowComponent* Next(void) const

GlowComponent* Prev(void) const

int NumChildren(void) const

GlowComponent* FirstChild(void) const

GlowComponent* LastChild(void) const

void ReorderChild(GlowComponent* child, GlowComponent* pos)

void KillChildren(void)

void Activate(void)

void Deactivate(void)

bool IsActive(void)

bool IsInactive(void)

bool IsActiveStandby(void)

void Paint(void)

Protected methods for subclasses

Initialization

void Init(GlowWidgetRoot* root, GlowWidget* parent, const GlowLabeledTextFieldParams& params, char hideCharacter)

Initializes a new GlowLabeledHiddenTextFieldWidget using the given params and adds it to root's hierarchy under parent. parent must be present in root's hierarchy.

Inherited methods
These methods are inherited from GlowWidget.

void NormalizeCoordinates(int x, int y, GLfloat& xn, GLfloat& yn) const

void RegisterMouseEvents(void)

void RegisterKeyboardEvents(void)

void UnegisterMouseEvents(void)

void UnregisterKeyboardEvents(void)

Overrideable methods

Inherited methods
These methods are inherited from GlowWidget.

virtual void OnWidgetPaint(void)

GlowTextFieldWidget overrides this method to draw the text field. You should not override it again unless a subclass needs to modify how text fields are drawn.

virtual void OnWidgetMouseDown(Glow::MouseButton mouseButton, int x, int y, Glow::Modifiers modifiers)

GlowTextFieldWidget overrides this method to handle mouse events. You should not override it again unless a subclass needs to modify how events are handled.

virtual void OnWidgetMouseUp(Glow::MouseButton mouseButton, int x, int y, Glow::Modifiers modifiers)

GlowTextFieldWidget overrides this method to handle mouse events. You should not override it again unless a subclass needs to modify how events are handled.

virtual void OnWidgetMouseDrag(int x, int y)

GlowTextFieldWidget overrides this method to handle mouse events. You should not override it again unless a subclass needs to modify how events are handled.

virtual void OnWidgetKeyboard(Glow::KeyCode key, int x, int y, Glow::Modifiers modifiers)

GlowHiddenTextFieldWidget overrides this method to intercept keyboard events and mask characters. You should not override it again unless a subclass needs to modify how events are handled.

virtual void OnWidgetMove(int x, int y)

virtual void OnWidgetReshape(int width, int height)

virtual void OnWidgetInvisible(void)

virtual void OnWidgetVisible(void)

virtual void OnWidgetDeactivate(void)

virtual void OnWidgetActivate(void)

virtual void OnGotKeyboardFocus(void)

virtual void OnLostKeyboardFocus(void)

virtual GlowWidget::AutoPackError OnAutoPack(int hSize, int vSize, GlowWidget::AutoPackOptions hOption, GlowWidget::AutoPackOptions vOption, int& leftMargin, int& rightMargin, int& topMargin, int& bottomMargin)

GlowLabeledHiddenTextFieldWidget implements this method to pack a labeled text field. Override it if a subclass requires different packing.

Inherited methods
These methods are inherited from GlowComponent, but are used by GlowWidget and should not be overridden again.

virtual void OnActivate(void)

virtual void OnDeactivate(void)

virtual void OnBeginPaint(void)

virtual void OnEndPaint(void)


Back to
Table of contents


The GLOW Toolkit