|
Back to Table of contents |
General information |
type: class
inherits: GlowWidget
module: glowLabelWidgetGlowLabelWidget is a simple text label.
GLOW programs that require text labels should use this class.
Constants |
Inherited constants
These constants are inherited from GlowWidget.enum GlowWidget::AutoPackError noAutoPackError
enum GlowWidget::AutoPackError hAutoPackError
enum GlowWidget::AutoPackError vAutoPackErrorenum 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 centerPosenum { unspecifiedSize }
enum { unspecifiedPos }
Methods |
Constructors and destructor
GlowLabelWidget(GlowWidget* parent, const GlowLabelParams& params)
Creates a new GlowLabelWidget using the given params and adds it to parent's children.GlowLabelWidget(GlowWidgetRoot* root, const GlowLabelParams& params)
Creates a new GlowLabelWidget using the given params and adds it to the top level under root.GlowLabelWidget(void)
Creates a new GlowLabelWidget but does not initialize it. A label created in this way may not be used until its Init() method is called.void Init(GlowWidget* parent, const GlowLabelParams& params)
Initializes a new GlowLabelWidget using the given params and adds it to parent's children.void Init(GlowWidgetRoot* root, const GlowLabelParams& params)
Initializes a new GlowLabelWidget using the given params and adds it to the top level under root.virtual ~GlowLabelWidget(void)
Attributes
const char* GetText(void) const
Returns the text string.void SetText(const char* text)
Sets the text string.GlowFont GetFont(void) const
Returns the font.void SetFont(GlowFont font)
Sets the font.bool IsOpaque(void) const
Returns the opaque-ness setting.void SetOpaque(bool opaque)
Sets the opaque-ness setting.int GetHIndent(void) const
Returns the horizontal indent.void SetHIndent(int indent)
Sets the horizontal indent.int GetVIndent(void) const
Returns the vertical indent.void SetVIndent(int indent)
Sets the vertical indent.Color attributes
GlowColor GetBackColor(void) const
void SetBackColor(GlowColor c)
GlowColor GetTextColor(void) const
void SetTextColor(GlowColor c)
GlowColor GetDisableTextColor(void) const
void SetDisableTextColor(GlowColor c)
Other methods
void FindPreferredSize(int& preferredWidth, int& preferredHeight)
Gives the preferred size of the widget, which encloses the text and margins tightly. Used primarily in packing labels around other widgets.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)
Labels should not attempt to grab the keyboard focus unless a subclass makes use of keyboard events.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 GlowLabelParams& params)
Initializes a new GlowLabelWidget 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)
GlowLabelWidget overrides this method to draw the label. You should not override it again unless a subclass needs to modify how labels are drawn.virtual void OnWidgetMouseDown(Glow::MouseButton mouseButton, int x, int y, Glow::Modifiers modifiers)
GlowLabelWidgets do not normally respond to mouse events. Override this method if your subclass needs to change this behavior.virtual void OnWidgetMouseUp(Glow::MouseButton mouseButton, int x, int y, Glow::Modifiers modifiers)
GlowLabelWidgets do not normally respond to mouse events. Override this method if your subclass needs to change this behavior.virtual void OnWidgetMouseDrag(int x, int y)
GlowLabelWidgets do not normally respond to mouse events. Override this method if your subclass needs to change this behavior.virtual void OnWidgetKeyboard(Glow::KeyCode key, int x, int y, Glow::Modifiers modifiers)
GlowLabelWidgets do not normally respond to keyboard events. Override this method if your subclass needs to change this behavior.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)
GlowLabelWidget implements this method to pack a label. 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