FXToggleButton

class FXToggleButton

The toggle button provides a two-state button, which toggles between the on and the off state each time it is pressed.

Inheritance:


Public Methods

[more] FXToggleButton(FXComposite* p, const FXString& text1, const FXString& text2, FXIcon* icon1=NULL, FXIcon* icon2=NULL, FXObject* tgt=NULL, FXSelector sel=0, FXuint opts=TOGGLEBUTTON_NORMAL, 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)
Construct toggle button with two text labels, and two icons, one for each state
[more]virtual void create()
Create server-side resources
[more]virtual void detach()
Detach server-side resources
[more]virtual FXbool canFocus() const
Returns true because a toggle button can receive focus
[more]virtual FXint getDefaultWidth()
Get default width
[more]virtual FXint getDefaultHeight()
Get default height
[more]void setAltText(const FXString& text)
Change alternate text shown when toggled
[more]FXString getAltText() const
Return alternate text
[more]void setAltIcon(FXIcon* ic)
Change alternate icon shown when toggled
[more]FXIcon* getAltIcon() const
Return alternate icon
[more]void setState(FXbool s=TRUE)
Change toggled state
[more]FXbool getState() const
return toggled state
[more]void setAltHelpText(const FXString& text)
Change alternate help text shown when toggled
[more]FXString getAltHelpText() const
Return alternate help text
[more]void setAltTipText(const FXString& text)
Change alternate tip text shown when toggled
[more]FXString getAltTipText() const
Return alternate tip text
[more]void setToggleStyle(FXuint style)
Set the toggle button style flags
[more]FXuint getToggleStyle() const
Get the toggle button style flags
[more]virtual void save(FXStream& store) const
Save toggle button to a stream
[more]virtual void load(FXStream& store)
Load toggle button from a stream
[more]virtual ~FXToggleButton()
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 killFocus()
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)
ovirtual FXbool contains(FXint parentx, FXint parenty) const
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

The toggle button provides a two-state button, which toggles between the on and the off state each time it is pressed. For each state, the toggle button has a unique icon and text label. When pressed, the button widget sends a SEL_COMMAND to its target, with the message data set to the current state of the toggle button, of the type FXbool.
o FXToggleButton(FXComposite* p, const FXString& text1, const FXString& text2, FXIcon* icon1=NULL, FXIcon* icon2=NULL, FXObject* tgt=NULL, FXSelector sel=0, FXuint opts=TOGGLEBUTTON_NORMAL, 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)
Construct toggle button with two text labels, and two icons, one for each state

ovirtual void create()
Create server-side resources

ovirtual void detach()
Detach server-side resources

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

ovirtual FXint getDefaultWidth()
Get default width

ovirtual FXint getDefaultHeight()
Get default height

ovoid setAltText(const FXString& text)
Change alternate text shown when toggled

oFXString getAltText() const
Return alternate text

ovoid setAltIcon(FXIcon* ic)
Change alternate icon shown when toggled

oFXIcon* getAltIcon() const
Return alternate icon

ovoid setState(FXbool s=TRUE)
Change toggled state

oFXbool getState() const
return toggled state

ovoid setAltHelpText(const FXString& text)
Change alternate help text shown when toggled

oFXString getAltHelpText() const
Return alternate help text

ovoid setAltTipText(const FXString& text)
Change alternate tip text shown when toggled

oFXString getAltTipText() const
Return alternate tip text

ovoid setToggleStyle(FXuint style)
Set the toggle button style flags

oFXuint getToggleStyle() const
Get the toggle button style flags

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

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

ovirtual ~FXToggleButton()
Destructor


This class has no child classes.

Alphabetic index HTML hierarchy of classes or Java



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