FXMenuButton

class FXMenuButton

A menu button posts a popup menu when clicked.

Inheritance:


Public Methods

[more] FXMenuButton(FXComposite* p, const FXString& text, FXIcon* ic=NULL, FXPopup* pup=NULL, FXuint opts=JUSTIFY_NORMAL|ICON_BEFORE_TEXT|MENUBUTTON_DOWN, FXint x=0, FXint y=0, FXint w=0, FXint h=0, FXint pl=DEFAULT_PAD, FXint pr=DEFAULT_PAD, FXint pt=DEFAULT_PAD, FXint pb=DEFAULT_PAD)
Constructor
[more]virtual void create()
Create server-side resources
[more]virtual void detach()
Detach server-side resources
[more]virtual FXint getDefaultWidth()
Return default width
[more]virtual FXint getDefaultHeight()
Return default height
[more]virtual FXbool canFocus() const
Returns true because a menu button can receive focus
[more]virtual void killFocus()
Remove the focus from this window
[more]virtual FXbool contains(FXint parentx, FXint parenty) const
Return true if window logically contains the given point
[more]void setMenu(FXPopup* pup)
Change the popup menu
[more]FXPopup* getMenu() const
Return current popup menu
[more]void setXOffset(FXint offx)
Set X offset where menu pops up relative to button
[more]FXint getXOffset() const
Return current X offset
[more]void setYOffset(FXint offy)
Set Y offset where menu pops up relative to button
[more]FXint getYOffset() const
Return current Y offset
[more]void setButtonStyle(FXuint style)
Change menu button style
[more]FXuint getButtonStyle() const
Get menu button style
[more]void setPopupStyle(FXuint style)
Change popup style
[more]FXuint getPopupStyle() const
Get popup style
[more]void setAttachment(FXuint att)
Change attachment
[more]FXuint getAttachment() const
Get attachment
[more]virtual void save(FXStream& store) const
Save menu button to a stream
[more]virtual void load(FXStream& store)
Load menu button from a stream
[more]virtual ~FXMenuButton()
Destructor


Inherited from FXLabel:

Public Methods

ovirtual void enable()
ovirtual void disable()
ovoid setText(const FXString& text)
oFXString getText() const
ovoid setIcon(FXIcon* ic)
oFXIcon* getIcon() const
ovoid setFont(FXFont* fnt)
oFXFont* getFont() const
oFXColor getTextColor() const
ovoid setTextColor(FXColor clr)
ovoid setJustify(FXuint mode)
oFXuint getJustify() const
ovoid setIconPosition(FXuint mode)
oFXuint getIconPosition() const
ovoid setHelpText(const FXString& text)
oFXString getHelpText() const
ovoid setTipText(const FXString& text)
oFXString getTipText() const


Inherited from FXFrame:

Public Methods

ovoid setFrameStyle(FXuint style)
oFXuint getFrameStyle() const
oFXint getBorderWidth() const
ovoid setPadTop(FXint pt)
oFXint getPadTop() const
ovoid setPadBottom(FXint pb)
oFXint getPadBottom() const
ovoid setPadLeft(FXint pl)
oFXint getPadLeft() const
ovoid setPadRight(FXint pr)
oFXint getPadRight() const
ovoid setHiliteColor(FXColor clr)
oFXColor getHiliteColor() const
ovoid setShadowColor(FXColor clr)
oFXColor getShadowColor() const
ovoid setBorderColor(FXColor clr)
oFXColor getBorderColor() const
ovoid setBaseColor(FXColor clr)
oFXColor getBaseColor() const


Inherited from FXWindow:

Public Methods

oFXWindow* getParent() const
oFXWindow* getOwner() const
oFXWindow* getShell() const
oFXWindow* getRoot() const
oFXWindow* getNext() const
oFXWindow* getPrev() const
oFXWindow* getFirst() const
oFXWindow* getLast() const
oFXWindow* getFocus() const
ovoid setKey(FXuint k)
oFXuint getKey() const
ovoid setTarget(FXObject* t)
oFXObject* getTarget() const
ovoid setSelector(FXSelector sel)
oFXSelector getSelector() const
oFXint getX() const
oFXint getY() const
ovirtual FXint getWidthForHeight(FXint givenheight)
ovirtual FXint getHeightForWidth(FXint givenwidth)
ovoid setX(FXint x)
ovoid setY(FXint y)
ovoid setWidth(FXint w)
ovoid setHeight(FXint h)
ovoid setLayoutHints(FXuint lout)
oFXuint getLayoutHints() const
oFXAccelTable* getAccelTable() const
ovoid setAccelTable(FXAccelTable* acceltable)
ovoid addHotKey(FXHotKey code)
ovoid remHotKey(FXHotKey code)
oFXbool isShell() const
oFXbool isChildOf(const FXWindow* window) const
oFXbool containsChild(const FXWindow* child) const
oFXWindow* getChildAt(FXint x, FXint y) const
oFXint numChildren() const
oFXint indexOfChild(const FXWindow* window) const
oFXWindow* childAtIndex(FXint index) const
ostatic FXWindow* commonAncestor(FXWindow* a, FXWindow* b)
ovoid setDefaultCursor(FXCursor* cur)
oFXCursor* getDefaultCursor() const
ovoid setDragCursor(FXCursor* cur)
oFXCursor* getDragCursor() const
oFXint getCursorPosition(FXint& x, FXint& y, FXuint& buttons) const
oFXint setCursorPosition(FXint x, FXint y)
oFXbool isEnabled() const
oFXbool isActive() const
oFXbool hasFocus() const
ovirtual void setFocus()
ovirtual void setDefault(FXbool enable=TRUE)
oFXbool isDefault() const
ovoid setInitial(FXbool enable=TRUE)
oFXbool isInitial() const
ovirtual void destroy()
ovirtual void raise()
ovirtual void lower()
ovirtual void move(FXint x, FXint y)
ovirtual void resize(FXint w, FXint h)
ovirtual void position(FXint x, FXint y, FXint w, FXint h)
ovirtual void recalc()
ovoid forceRefresh()
ovirtual void reparent(FXWindow* newparent)
ovoid scroll(FXint x, FXint y, FXint w, FXint h, FXint dx, FXint dy)
ovoid update(FXint x, FXint y, FXint w, FXint h)
ovoid update()
ovoid repaint(FXint x, FXint y, FXint w, FXint h)
ovoid repaint()
ovoid grab()
ovoid ungrab()
oFXbool grabbed() const
ovoid grabKeyboard()
ovoid ungrabKeyboard()
oFXbool grabbedKeyboard() const
ovirtual void show()
ovirtual void hide()
oFXbool shown() const
ovirtual FXbool isComposite() const
oFXbool underCursor() const
oFXbool hasSelection() const
oFXbool acquireSelection(const FXDragType* types, FXuint numtypes)
oFXbool releaseSelection()
oFXbool hasClipboard() const
oFXbool acquireClipboard(const FXDragType* types, FXuint numtypes)
oFXbool releaseClipboard()
ovoid dropEnable()
ovoid dropDisable()
oFXbool isDropEnabled() const
oFXbool isDragging() const
oFXbool beginDrag(const FXDragType* types, FXuint numtypes)
oFXbool handleDrag(FXint x, FXint y, FXDragAction action=DRAG_COPY)
oFXbool endDrag(FXbool drop=TRUE)
oFXbool isDropTarget() const
ovoid setDragRectangle(FXint x, FXint y, FXint w, FXint h, FXbool wantupdates=TRUE)
ovoid clearDragRectangle()
ovoid acceptDrop(FXDragAction action=DRAG_ACCEPT)
oFXDragAction didAccept() const
oFXbool inquireDNDTypes(FXDNDOrigin origin, FXDragType*& types, FXuint& numtypes)
oFXbool offeredDNDType(FXDNDOrigin origin, FXDragType type)
oFXDragAction inquireDNDAction() const
oFXbool setDNDData(FXDNDOrigin origin, FXDragType type, FXuchar* data, FXuint size)
oFXbool getDNDData(FXDNDOrigin origin, FXDragType type, FXuchar*& data, FXuint& size)
ovoid translateCoordinatesFrom(FXint& tox, FXint& toy, const FXWindow* fromwindow, FXint fromx, FXint fromy) const
ovoid translateCoordinatesTo(FXint& tox, FXint& toy, const FXWindow* towindow, FXint fromx, FXint fromy) const
ovirtual void setBackColor(FXColor clr)
oFXColor getBackColor() const
ovoid linkBefore(FXWindow* sibling)
ovoid linkAfter(FXWindow* sibling)


Inherited from FXDrawable:

Public Methods

oFXint getWidth() const
oFXint getHeight() const
oFXVisual* getVisual() const
ovoid setVisual(FXVisual* vis)


Inherited from FXId:

Public Methods

oFXApp* getApp() const
oFXID id() const
ovoid setUserData(void* ptr)
ovoid* getUserData() const


Inherited from FXObject:

Public Methods

oconst FXchar* getClassName() const
oFXbool isMemberOf(const FXMetaClass* metaclass) const


Documentation

A menu button posts a popup menu when clicked. There are many ways to control the placement where the popup will appear; first, the popup may be placed on either of the four sides relative to the menu button; this is controlled by the flags MENUBUTTON_DOWN, etc. Next, there are several attachment modes; the popup's left/bottom edge may attach to the menu button's left/top edge, or the popup's right/top edge may attach to the menu button's right/bottom edge, or both. Also, the popup may apear centered relative to the menu button. Finally, a small offset may be specified to displace the location of the popup by a few pixels so as to account for borders and so on. Normally, the menu button shows an arrow pointing to the direction where the popup is set to appear; this can be turned off by passing the option MENUBUTTON_NOARROWS.
o FXMenuButton(FXComposite* p, const FXString& text, FXIcon* ic=NULL, FXPopup* pup=NULL, FXuint opts=JUSTIFY_NORMAL|ICON_BEFORE_TEXT|MENUBUTTON_DOWN, FXint x=0, FXint y=0, FXint w=0, FXint h=0, FXint pl=DEFAULT_PAD, FXint pr=DEFAULT_PAD, FXint pt=DEFAULT_PAD, FXint pb=DEFAULT_PAD)
Constructor

ovirtual void create()
Create server-side resources

ovirtual void detach()
Detach server-side resources

ovirtual FXint getDefaultWidth()
Return default width

ovirtual FXint getDefaultHeight()
Return default height

ovirtual FXbool canFocus() const
Returns true because a menu button can receive focus

ovirtual void killFocus()
Remove the focus from this window

ovirtual FXbool contains(FXint parentx, FXint parenty) const
Return true if window logically contains the given point

ovoid setMenu(FXPopup* pup)
Change the popup menu

oFXPopup* getMenu() const
Return current popup menu

ovoid setXOffset(FXint offx)
Set X offset where menu pops up relative to button

oFXint getXOffset() const
Return current X offset

ovoid setYOffset(FXint offy)
Set Y offset where menu pops up relative to button

oFXint getYOffset() const
Return current Y offset

ovoid setButtonStyle(FXuint style)
Change menu button style

oFXuint getButtonStyle() const
Get menu button style

ovoid setPopupStyle(FXuint style)
Change popup style

oFXuint getPopupStyle() const
Get popup style

ovoid setAttachment(FXuint att)
Change attachment

oFXuint getAttachment() const
Get attachment

ovirtual void save(FXStream& store) const
Save menu button to a stream

ovirtual void load(FXStream& store)
Load menu button from a stream

ovirtual ~FXMenuButton()
Destructor


Direct child classes:
FXMDIWindowButton

Alphabetic index HTML hierarchy of classes or Java



This page was generated with the help of DOC++.