Base class for all windows
Inheritance:
Public Methods
-
FXWindow(FXComposite* p, FXuint opts=0, FXint x=0, FXint y=0, FXint w=0, FXint h=0)
- Constructor
-
FXWindow* getParent() const
- Return a pointer to the parent window
-
FXWindow* getOwner() const
- Return a pointer to the owner window
-
FXWindow* getShell() const
- Return a pointer to the shell window
-
FXWindow* getRoot() const
- Return a pointer to the root window
-
FXWindow* getNext() const
- Return a pointer to the next (sibling) window, if any
-
FXWindow* getPrev() const
- Return a pointer to the previous (sibling) window , if any
-
FXWindow* getFirst() const
- Return a pointer to this window's first child window , if any
-
FXWindow* getLast() const
- Return a pointer to this window's last child window, if any
-
FXWindow* getFocus() const
- Return a pointer to the currently focused child window
-
void setKey(FXuint k)
- Change window key
-
FXuint getKey() const
- Return window key
-
void setTarget(FXObject* t)
- Set the message target object for this window
-
FXObject* getTarget() const
- Get the message target object for this window, if any
-
void setSelector(FXSelector sel)
- Set the message identifier for this window
-
FXSelector getSelector() const
- Get the message identifier for this window
-
FXint getX() const
- Get this window's x-coordinate, in the parent's coordinate system
-
FXint getY() const
- Get this window's y-coordinate, in the parent's coordinate system
-
virtual FXint getDefaultWidth()
- Return the default width of this window
-
virtual FXint getDefaultHeight()
- Return the default height of this window
-
virtual FXint getWidthForHeight(FXint givenheight)
- Return width for given height
-
virtual FXint getHeightForWidth(FXint givenwidth)
- Return height for given width
-
void setX(FXint x)
- Set this window's x-coordinate, in the parent's coordinate system
-
void setY(FXint y)
- Set this window's y-coordinate, in the parent's coordinate system
-
void setWidth(FXint w)
- Set the window width
-
void setHeight(FXint h)
- Set the window height
-
void setLayoutHints(FXuint lout)
- Set layout hints for this window
-
FXuint getLayoutHints() const
- Get layout hints for this window
-
FXAccelTable* getAccelTable() const
- Return a pointer to the accelerator table
-
void setAccelTable(FXAccelTable* acceltable)
- Set the accelerator table
-
void addHotKey(FXHotKey code)
- Add a hot key
-
void remHotKey(FXHotKey code)
- Remove a hot key
-
FXbool isShell() const
- Return true if window is a shell window
-
FXbool isChildOf(const FXWindow* window) const
- Return true if specified window is this window's parent
-
FXbool containsChild(const FXWindow* child) const
- Return true if specified window is a child of this window
-
FXWindow* getChildAt(FXint x, FXint y) const
- Return the child window at specified coordinates
-
FXint numChildren() const
- Return the number of child windows for this window
-
FXint indexOfChild(const FXWindow* window) const
- Return the index (starting from zero) of the specified child window, or -1 if the window is not a child or NULL
-
FXWindow* childAtIndex(FXint index) const
- Return the child window at specified index, or NULL if the index is negative or out of range
-
static FXWindow* commonAncestor(FXWindow* a, FXWindow* b)
- Return the common ancestor of window a and window b
-
void setDefaultCursor(FXCursor* cur)
- Set the default cursor for this window
-
FXCursor* getDefaultCursor() const
- Return the default cursor for this window
-
void setDragCursor(FXCursor* cur)
- Set the drag cursor for this window
-
FXCursor* getDragCursor() const
- Return the drag cursor for this window
-
FXint getCursorPosition(FXint& x, FXint& y, FXuint& buttons) const
- Return the cursor position and mouse button-state
-
FXint setCursorPosition(FXint x, FXint y)
- Warp the cursor to the new position
-
FXbool isEnabled() const
- Return true if this window is able to receive mouse and keyboard events
-
FXbool isActive() const
- Return true if the window is active
-
virtual FXbool canFocus() const
- Return true if this window is a control capable of receiving the focus
-
FXbool hasFocus() const
- Return true if this window has the focus
-
virtual void setFocus()
- Move the focus to this window
-
virtual void killFocus()
- Remove the focus from this window
-
virtual void setDefault(FXbool enable=TRUE)
- This changes the default window which responds to the Return key in a dialog.
-
FXbool isDefault() const
- Return true if this is the default window
-
void setInitial(FXbool enable=TRUE)
- Make this window the initial default window
-
FXbool isInitial() const
- Return true if this is the initial default window
-
virtual void enable()
- Enable the window to receive mouse and keyboard events
-
virtual void disable()
- Disable the window from receiving mouse and keyboard events
-
virtual void create()
- Create all of the server-side resources for this window
-
virtual void detach()
- Detach the server-side resources for this window
-
virtual void destroy()
- Destroy the server-side resources for this window
-
virtual void raise()
- Raise this window to the top of the stacking order
-
virtual void lower()
- Lower this window to the bottom of the stacking order
-
virtual void move(FXint x, FXint y)
- Move this window to the specified position in the parent's coordinates
-
virtual void resize(FXint w, FXint h)
- Resize this window to the specified width and height
-
virtual void position(FXint x, FXint y, FXint w, FXint h)
- Move and resize this window in the parent's coordinates
-
virtual void recalc()
- Mark this window's layout as dirty
-
void forceRefresh()
- Force a GUI update of this window and its children
-
virtual void reparent(FXWindow* newparent)
- Change the parent for this window
-
void scroll(FXint x, FXint y, FXint w, FXint h, FXint dx, FXint dy)
- Scroll rectangle x,y,w,h by a shift of dx,dy
-
void update(FXint x, FXint y, FXint w, FXint h)
- Mark the specified rectangle dirty, ie.
-
void update()
- Mark the entire window client area dirty
-
void repaint(FXint x, FXint y, FXint w, FXint h)
- If marked but not yet painted, paint the given area
-
void repaint()
- If marked but not yet painted, paint the entire window
-
void grab()
- Grab the mouse to this window; future mouse events will be reported to this window even while the cursor goes outside of this window
-
void ungrab()
- Release the mouse grab
-
FXbool grabbed() const
- Return true if the window has been grabbed
-
void grabKeyboard()
- Grab keyboard device
-
void ungrabKeyboard()
- Ungrab keyboard device
-
FXbool grabbedKeyboard() const
- Return true if active grab is in effect
-
virtual void show()
- Show this window
-
virtual void hide()
- Hide this window
-
FXbool shown() const
- Return true if the window is shown
-
virtual FXbool isComposite() const
- Return true if the window is composite
-
FXbool underCursor() const
- Return true if the window is under the cursor
-
FXbool hasSelection() const
- Return true if this window owns the primary selection
-
FXbool acquireSelection(const FXDragType* types, FXuint numtypes)
- Try to acquire the primary selection, given a list of drag types
-
FXbool releaseSelection()
- Release the primary selection
-
FXbool hasClipboard() const
- Return true if this window owns the clipboard
-
FXbool acquireClipboard(const FXDragType* types, FXuint numtypes)
- Try to acquire the clipboard, given a list of drag types
-
FXbool releaseClipboard()
- Release the clipboard
-
void dropEnable()
- Enable this window to receive drops
-
void dropDisable()
- Disable this window from receiving drops
-
FXbool isDropEnabled() const
- Return true if this window is able to receive drops
-
FXbool isDragging() const
- Return true if a drag operaion has been initiated from this window
-
FXbool beginDrag(const FXDragType* types, FXuint numtypes)
- Initiate a drag operation with a list of previously registered drag types
-
FXbool handleDrag(FXint x, FXint y, FXDragAction action=DRAG_COPY)
- When dragging, inform the drop-target of the new position and the drag action
-
FXbool endDrag(FXbool drop=TRUE)
- Terminate the drag operation with or without actually dropping the data
-
FXbool isDropTarget() const
- Return true if this window is the target of a drop
-
void setDragRectangle(FXint x, FXint y, FXint w, FXint h, FXbool wantupdates=TRUE)
- When being dragged over, indicate that no further SEL_DND_MOTION messages are required while the cursor is inside the given rectangle
-
void clearDragRectangle()
- When being dragged over, indicate we want to receive SEL_DND_MOTION messages every time the cursor moves
-
void acceptDrop(FXDragAction action=DRAG_ACCEPT)
- When being dragged over, indicate acceptance or rejection of the dragged data
-
FXDragAction didAccept() const
- The target accepted our drop
-
FXbool inquireDNDTypes(FXDNDOrigin origin, FXDragType*& types, FXuint& numtypes)
- When being dragged over, inquire the drag types which are being offered
-
FXbool offeredDNDType(FXDNDOrigin origin, FXDragType type)
- When being dragged over, return true if we are offered the given drag type
-
FXDragAction inquireDNDAction() const
- When being dragged over, return the drag action
-
FXbool setDNDData(FXDNDOrigin origin, FXDragType type, FXuchar* data, FXuint size)
- Set DND data; the array must be allocated with FXMALLOC and ownership is transferred to the system
-
FXbool getDNDData(FXDNDOrigin origin, FXDragType type, FXuchar*& data, FXuint& size)
- Get DND data; the caller becomes the owner of the array and must free it with FXFREE
-
virtual FXbool contains(FXint parentx, FXint parenty) const
- Return true if window logically contains the given point
-
void translateCoordinatesFrom(FXint& tox, FXint& toy, const FXWindow* fromwindow, FXint fromx, FXint fromy) const
- Translate coordinates from fromwindow's coordinate space to this window's coordinate space
-
void translateCoordinatesTo(FXint& tox, FXint& toy, const FXWindow* towindow, FXint fromx, FXint fromy) const
- Translate coordinates from this window's coordinate space to towindow's coordinate space
-
virtual void setBackColor(FXColor clr)
- Set window background color
-
FXColor getBackColor() const
- Get background color
-
void linkBefore(FXWindow* sibling)
- Relink this window before sibling in the window list
-
void linkAfter(FXWindow* sibling)
- Relink this window after sibling in the window list
-
virtual void save(FXStream& store) const
- Save window to stream
-
virtual void load(FXStream& store)
- Restore window from stream
-
virtual ~FXWindow()
- Destroy window
Public Methods
-
FXint getWidth() const
-
FXint getHeight() const
-
FXVisual* getVisual() const
-
void setVisual(FXVisual* vis)
Inherited from FXId:
Public Methods
-
FXApp* getApp() const
-
FXID id() const
-
void setUserData(void* ptr)
-
void* getUserData() const
Public Methods
-
const FXchar* getClassName() const
-
FXbool isMemberOf(const FXMetaClass* metaclass) const
Documentation
Base class for all windows
FXWindow(FXComposite* p, FXuint opts=0, FXint x=0, FXint y=0, FXint w=0, FXint h=0)
- Constructor
FXWindow* getParent() const
- Return a pointer to the parent window
FXWindow* getOwner() const
- Return a pointer to the owner window
FXWindow* getShell() const
- Return a pointer to the shell window
FXWindow* getRoot() const
- Return a pointer to the root window
FXWindow* getNext() const
- Return a pointer to the next (sibling) window, if any
FXWindow* getPrev() const
- Return a pointer to the previous (sibling) window , if any
FXWindow* getFirst() const
- Return a pointer to this window's first child window , if any
FXWindow* getLast() const
- Return a pointer to this window's last child window, if any
FXWindow* getFocus() const
- Return a pointer to the currently focused child window
void setKey(FXuint k)
- Change window key
FXuint getKey() const
- Return window key
void setTarget(FXObject* t)
- Set the message target object for this window
FXObject* getTarget() const
- Get the message target object for this window, if any
void setSelector(FXSelector sel)
- Set the message identifier for this window
FXSelector getSelector() const
- Get the message identifier for this window
FXint getX() const
- Get this window's x-coordinate, in the parent's coordinate system
FXint getY() const
- Get this window's y-coordinate, in the parent's coordinate system
virtual FXint getDefaultWidth()
- Return the default width of this window
virtual FXint getDefaultHeight()
- Return the default height of this window
virtual FXint getWidthForHeight(FXint givenheight)
- Return width for given height
virtual FXint getHeightForWidth(FXint givenwidth)
- Return height for given width
void setX(FXint x)
- Set this window's x-coordinate, in the parent's coordinate system
void setY(FXint y)
- Set this window's y-coordinate, in the parent's coordinate system
void setWidth(FXint w)
- Set the window width
void setHeight(FXint h)
- Set the window height
void setLayoutHints(FXuint lout)
- Set layout hints for this window
FXuint getLayoutHints() const
- Get layout hints for this window
FXAccelTable* getAccelTable() const
- Return a pointer to the accelerator table
void setAccelTable(FXAccelTable* acceltable)
- Set the accelerator table
void addHotKey(FXHotKey code)
- Add a hot key
void remHotKey(FXHotKey code)
- Remove a hot key
FXbool isShell() const
- Return true if window is a shell window
FXbool isChildOf(const FXWindow* window) const
- Return true if specified window is this window's parent
FXbool containsChild(const FXWindow* child) const
- Return true if specified window is a child of this window
FXWindow* getChildAt(FXint x, FXint y) const
- Return the child window at specified coordinates
FXint numChildren() const
- Return the number of child windows for this window
FXint indexOfChild(const FXWindow* window) const
-
Return the index (starting from zero) of the specified child window,
or -1 if the window is not a child or NULL
FXWindow* childAtIndex(FXint index) const
-
Return the child window at specified index,
or NULL if the index is negative or out of range
static FXWindow* commonAncestor(FXWindow* a, FXWindow* b)
- Return the common ancestor of window a and window b
void setDefaultCursor(FXCursor* cur)
- Set the default cursor for this window
FXCursor* getDefaultCursor() const
- Return the default cursor for this window
void setDragCursor(FXCursor* cur)
- Set the drag cursor for this window
FXCursor* getDragCursor() const
- Return the drag cursor for this window
FXint getCursorPosition(FXint& x, FXint& y, FXuint& buttons) const
- Return the cursor position and mouse button-state
FXint setCursorPosition(FXint x, FXint y)
- Warp the cursor to the new position
FXbool isEnabled() const
- Return true if this window is able to receive mouse and keyboard events
FXbool isActive() const
- Return true if the window is active
virtual FXbool canFocus() const
- Return true if this window is a control capable of receiving the focus
FXbool hasFocus() const
- Return true if this window has the focus
virtual void setFocus()
- Move the focus to this window
virtual void killFocus()
- Remove the focus from this window
virtual void setDefault(FXbool enable=TRUE)
-
This changes the default window which responds to the Return
key in a dialog. If enable is TRUE, this window becomes the default
window; when enable is FALSE, this window will be no longer the
default window. Finally, when enable is MAYBE, the default window
will revert to the initial default window.
FXbool isDefault() const
- Return true if this is the default window
void setInitial(FXbool enable=TRUE)
- Make this window the initial default window
FXbool isInitial() const
- Return true if this is the initial default window
virtual void enable()
- Enable the window to receive mouse and keyboard events
virtual void disable()
- Disable the window from receiving mouse and keyboard events
virtual void create()
- Create all of the server-side resources for this window
virtual void detach()
- Detach the server-side resources for this window
virtual void destroy()
- Destroy the server-side resources for this window
virtual void raise()
- Raise this window to the top of the stacking order
virtual void lower()
- Lower this window to the bottom of the stacking order
virtual void move(FXint x, FXint y)
- Move this window to the specified position in the parent's coordinates
virtual void resize(FXint w, FXint h)
- Resize this window to the specified width and height
virtual void position(FXint x, FXint y, FXint w, FXint h)
- Move and resize this window in the parent's coordinates
virtual void recalc()
- Mark this window's layout as dirty
void forceRefresh()
- Force a GUI update of this window and its children
virtual void reparent(FXWindow* newparent)
- Change the parent for this window
void scroll(FXint x, FXint y, FXint w, FXint h, FXint dx, FXint dy)
- Scroll rectangle x,y,w,h by a shift of dx,dy
void update(FXint x, FXint y, FXint w, FXint h)
- Mark the specified rectangle dirty, ie. to be repainted
void update()
- Mark the entire window client area dirty
void repaint(FXint x, FXint y, FXint w, FXint h)
- If marked but not yet painted, paint the given area
void repaint()
- If marked but not yet painted, paint the entire window
void grab()
-
Grab the mouse to this window; future mouse events will be
reported to this window even while the cursor goes outside of this window
void ungrab()
- Release the mouse grab
FXbool grabbed() const
- Return true if the window has been grabbed
void grabKeyboard()
- Grab keyboard device
void ungrabKeyboard()
- Ungrab keyboard device
FXbool grabbedKeyboard() const
- Return true if active grab is in effect
virtual void show()
- Show this window
virtual void hide()
- Hide this window
FXbool shown() const
- Return true if the window is shown
virtual FXbool isComposite() const
- Return true if the window is composite
FXbool underCursor() const
- Return true if the window is under the cursor
FXbool hasSelection() const
- Return true if this window owns the primary selection
FXbool acquireSelection(const FXDragType* types, FXuint numtypes)
- Try to acquire the primary selection, given a list of drag types
FXbool releaseSelection()
- Release the primary selection
FXbool hasClipboard() const
- Return true if this window owns the clipboard
FXbool acquireClipboard(const FXDragType* types, FXuint numtypes)
- Try to acquire the clipboard, given a list of drag types
FXbool releaseClipboard()
- Release the clipboard
void dropEnable()
- Enable this window to receive drops
void dropDisable()
- Disable this window from receiving drops
FXbool isDropEnabled() const
- Return true if this window is able to receive drops
FXbool isDragging() const
- Return true if a drag operaion has been initiated from this window
FXbool beginDrag(const FXDragType* types, FXuint numtypes)
- Initiate a drag operation with a list of previously registered drag types
FXbool handleDrag(FXint x, FXint y, FXDragAction action=DRAG_COPY)
-
When dragging, inform the drop-target of the new position and
the drag action
FXbool endDrag(FXbool drop=TRUE)
- Terminate the drag operation with or without actually dropping the data
FXbool isDropTarget() const
- Return true if this window is the target of a drop
void setDragRectangle(FXint x, FXint y, FXint w, FXint h, FXbool wantupdates=TRUE)
-
When being dragged over, indicate that no further SEL_DND_MOTION messages
are required while the cursor is inside the given rectangle
void clearDragRectangle()
-
When being dragged over, indicate we want to receive SEL_DND_MOTION messages
every time the cursor moves
void acceptDrop(FXDragAction action=DRAG_ACCEPT)
- When being dragged over, indicate acceptance or rejection of the dragged data
FXDragAction didAccept() const
- The target accepted our drop
FXbool inquireDNDTypes(FXDNDOrigin origin, FXDragType*& types, FXuint& numtypes)
- When being dragged over, inquire the drag types which are being offered
FXbool offeredDNDType(FXDNDOrigin origin, FXDragType type)
- When being dragged over, return true if we are offered the given drag type
FXDragAction inquireDNDAction() const
- When being dragged over, return the drag action
FXbool setDNDData(FXDNDOrigin origin, FXDragType type, FXuchar* data, FXuint size)
-
Set DND data; the array must be allocated with FXMALLOC and ownership is
transferred to the system
FXbool getDNDData(FXDNDOrigin origin, FXDragType type, FXuchar*& data, FXuint& size)
-
Get DND data; the caller becomes the owner of the array and must free it
with FXFREE
virtual FXbool contains(FXint parentx, FXint parenty) const
- Return true if window logically contains the given point
void translateCoordinatesFrom(FXint& tox, FXint& toy, const FXWindow* fromwindow, FXint fromx, FXint fromy) const
- Translate coordinates from fromwindow's coordinate space to this window's coordinate space
void translateCoordinatesTo(FXint& tox, FXint& toy, const FXWindow* towindow, FXint fromx, FXint fromy) const
- Translate coordinates from this window's coordinate space to towindow's coordinate space
virtual void setBackColor(FXColor clr)
- Set window background color
FXColor getBackColor() const
- Get background color
void linkBefore(FXWindow* sibling)
- Relink this window before sibling in the window list
void linkAfter(FXWindow* sibling)
- Relink this window after sibling in the window list
virtual void save(FXStream& store) const
- Save window to stream
virtual void load(FXStream& store)
- Restore window from stream
virtual ~FXWindow()
- Destroy window
- Direct child classes:
- FXToolbarGrip
FXToolBarGrip
FXScrollbar
FXScrollCorner
FXScrollBar
FXMenuSeparator
FXMenuCaption
FXFrame
FXDragCorner
FXComposite
FXCanvas
Alphabetic index HTML hierarchy of classes or Java
This page was generated with the help of DOC++.