|
Back to Table of contents |
General information |
type: class
inherits: GlowPopupMenuWidget, GlowWidgetLabelHelper
module: glowMenuButtonWidgetGlowLabeledPopupMenuWidget is a convenience class of popup menu widgets that includes a label. It also packs the label appropriately.
GLOW programs that require labeled popup menus may 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 bottomLabelPositionPacking 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
GlowLabeledPopupMenuWidget(GlowWidget* parent, const GlowLabeledPopupMenuParams& params)
Creates a new GlowLabeledPopupMenuWidget using the given params and adds it to parent's children.GlowLabeledPopupMenuWidget(GlowWidgetRoot* root, const GlowLabeledPopupMenuParams& params)
Creates a new GlowLabeledPopupMenuWidget using the given params and adds it to the top level under root.GlowLabeledPopupMenuWidget(void)
Creates a new GlowLabeledPopupMenuWidget but does not initialize it. A button created in this way may not be used until its Init() method is called.void Init(GlowWidget* parent, const GlowLabeledPopupMenuParams& params)
Initializes a new GlowLabeledPopupMenuWidget using the given params and adds it to parent's children.void Init(GlowWidgetRoot* root, const GlowLabeledPopupMenuParams& params)
Initializes a new GlowLabeledPopupMenuWidget using the given params and adds it to the top level under root.virtual ~GlowLabeledPopupMenuWidget(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 GlowPopupMenuWidget.void AddItem(const char* label)
void RemoveItem(int itemNum)
int NumItems(void) const
const char* GetItemLabel(int itemNum) const
void SetItemLabel(int itemNum, const char* label)
int GetCurItem(void) const
void SetCurItem(int itemNum)
const char* GetMark(void) const
void SetMark(const char* mark)
GlowFont GetFont(void) const
void SetFont(GlowFont font)
int GetSpacing(void) const
void SetSpacing(int spacing)
int GetIconType(void) const
void SetIconType(int iconType)
GlowColor GetBoxColor(void) const
void SetBoxColor(GlowColor c)
GlowColor GetIconColor(void) const
void SetIconColor(GlowColor c)
GlowColor GetTextColor(void) const
void SetTextColor(GlowColor c)
GlowColor GetHiliteBoxColor(void) const
void SetHiliteBoxColor(GlowColor c)
GlowColor GetHiliteIconColor(void) const
void SetHiliteIconColor(GlowColor c)
GlowColor GetHiliteTextColor(void) const
void SetHiliteTextColor(GlowColor c)
GlowColor GetDisableBoxColor(void) const
void SetDisableBoxColor(GlowColor c)
GlowColor GetDisableIconColor(void) const
void SetDisableIconColor(GlowColor c)
GlowColor GetDisableTextColor(void) const
void SetDisableTextColor(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)
TSender<const GlowPopupMenuMessage&>& Notifier(void)
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)
Popup menus 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 GlowLabeledPopupMenuParams& params)
Initializes a new GlowLabeledPopupMenuWidget 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 GlowPopupMenuWidget.virtual void OnHit(int itemHit)
Inherited methods
These methods are inherited from GlowWidget.virtual void OnWidgetPaint(void)
GlowLabeledPopupMenuWidget overrides this method to make sure the label's color is set properly for the hilite/unhilite state.virtual void OnWidgetMouseDown(Glow::MouseButton mouseButton, int x, int y, Glow::Modifiers modifiers)
GlowLabeledPopupMenuWidget 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)
GlowLabeledPopupMenuWidget 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)
GlowLabeledPopupMenuWidget 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)
The standard GlowLabeledPopupMenuWidget does not handle keyboard events. Override this method if a subclass needs to receive keyboard events.virtual void OnWidgetMove(int x, int y)
A GlowLabeledPopupMenuWidget is implemented using a subwindow internally. It overrides this method to make sure the subwindow is moved when the widget is moved. If you override it again, make sure you call the inherited method.virtual void OnWidgetReshape(int width, int height)
A GlowLabeledPopupMenuWidget is implemented using a subwindow internally. It overrides this method to make sure the subwindow is reshaped when the widget is reshaped. If you override it again, make sure you call the inherited method.virtual void OnWidgetInvisible(void)
A GlowLabeledPopupMenuWidget is implemented using a subwindow internally. It overrides this method to make sure the subwindow is hidden when the widget is hidden. If you override it again, make sure you call the inherited method.virtual void OnWidgetVisible(void)
A GlowLabeledPopupMenuWidget is implemented using a subwindow internally. It overrides this method to make sure the subwindow is shown when the widget is shown. If you override it again, make sure you call the inherited method.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)
GlowLabeledPopupMenuWidget implements this method to pack a popup menu with 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