FXWindow

class FXWindow

Base class for all windows

Inheritance:


Public Methods

[more] FXWindow(FXComposite* p, FXuint opts=0, FXint x=0, FXint y=0, FXint w=0, FXint h=0)
Constructor
[more]FXWindow* getParent() const
Return a pointer to the parent window
[more]FXWindow* getOwner() const
Return a pointer to the owner window
[more]FXWindow* getShell() const
Return a pointer to the shell window
[more]FXWindow* getRoot() const
Return a pointer to the root window
[more]FXWindow* getNext() const
Return a pointer to the next (sibling) window, if any
[more]FXWindow* getPrev() const
Return a pointer to the previous (sibling) window , if any
[more]FXWindow* getFirst() const
Return a pointer to this window's first child window , if any
[more]FXWindow* getLast() const
Return a pointer to this window's last child window, if any
[more]FXWindow* getFocus() const
Return a pointer to the currently focused child window
[more]void setKey(FXuint k)
Change window key
[more]FXuint getKey() const
Return window key
[more]void setTarget(FXObject* t)
Set the message target object for this window
[more]FXObject* getTarget() const
Get the message target object for this window, if any
[more]void setSelector(FXSelector sel)
Set the message identifier for this window
[more]FXSelector getSelector() const
Get the message identifier for this window
[more]FXint getX() const
Get this window's x-coordinate, in the parent's coordinate system
[more]FXint getY() const
Get this window's y-coordinate, in the parent's coordinate system
[more]virtual FXint getDefaultWidth()
Return the default width of this window
[more]virtual FXint getDefaultHeight()
Return the default height of this window
[more]virtual FXint getWidthForHeight(FXint givenheight)
Return width for given height
[more]virtual FXint getHeightForWidth(FXint givenwidth)
Return height for given width
[more]void setX(FXint x)
Set this window's x-coordinate, in the parent's coordinate system
[more]void setY(FXint y)
Set this window's y-coordinate, in the parent's coordinate system
[more]void setWidth(FXint w)
Set the window width
[more]void setHeight(FXint h)
Set the window height
[more]void setLayoutHints(FXuint lout)
Set layout hints for this window
[more]FXuint getLayoutHints() const
Get layout hints for this window
[more]FXAccelTable* getAccelTable() const
Return a pointer to the accelerator table
[more]void setAccelTable(FXAccelTable* acceltable)
Set the accelerator table
[more]void addHotKey(FXHotKey code)
Add a hot key
[more]void remHotKey(FXHotKey code)
Remove a hot key
[more]FXbool isShell() const
Return true if window is a shell window
[more]FXbool isChildOf(const FXWindow* window) const
Return true if specified window is this window's parent
[more]FXbool containsChild(const FXWindow* child) const
Return true if specified window is a child of this window
[more]FXWindow* getChildAt(FXint x, FXint y) const
Return the child window at specified coordinates
[more]FXint numChildren() const
Return the number of child windows for this window
[more]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
[more]FXWindow* childAtIndex(FXint index) const
Return the child window at specified index, or NULL if the index is negative or out of range
[more]static FXWindow* commonAncestor(FXWindow* a, FXWindow* b)
Return the common ancestor of window a and window b
[more]void setDefaultCursor(FXCursor* cur)
Set the default cursor for this window
[more]FXCursor* getDefaultCursor() const
Return the default cursor for this window
[more]void setDragCursor(FXCursor* cur)
Set the drag cursor for this window
[more]FXCursor* getDragCursor() const
Return the drag cursor for this window
[more]FXint getCursorPosition(FXint& x, FXint& y, FXuint& buttons) const
Return the cursor position and mouse button-state
[more]FXint setCursorPosition(FXint x, FXint y)
Warp the cursor to the new position
[more]FXbool isEnabled() const
Return true if this window is able to receive mouse and keyboard events
[more]FXbool isActive() const
Return true if the window is active
[more]virtual FXbool canFocus() const
Return true if this window is a control capable of receiving the focus
[more]FXbool hasFocus() const
Return true if this window has the focus
[more]virtual void setFocus()
Move the focus to this window
[more]virtual void killFocus()
Remove the focus from this window
[more]virtual void setDefault(FXbool enable=TRUE)
This changes the default window which responds to the Return key in a dialog.
[more]FXbool isDefault() const
Return true if this is the default window
[more]void setInitial(FXbool enable=TRUE)
Make this window the initial default window
[more]FXbool isInitial() const
Return true if this is the initial default window
[more]virtual void enable()
Enable the window to receive mouse and keyboard events
[more]virtual void disable()
Disable the window from receiving mouse and keyboard events
[more]virtual void create()
Create all of the server-side resources for this window
[more]virtual void detach()
Detach the server-side resources for this window
[more]virtual void destroy()
Destroy the server-side resources for this window
[more]virtual void raise()
Raise this window to the top of the stacking order
[more]virtual void lower()
Lower this window to the bottom of the stacking order
[more]virtual void move(FXint x, FXint y)
Move this window to the specified position in the parent's coordinates
[more]virtual void resize(FXint w, FXint h)
Resize this window to the specified width and height
[more]virtual void position(FXint x, FXint y, FXint w, FXint h)
Move and resize this window in the parent's coordinates
[more]virtual void recalc()
Mark this window's layout as dirty
[more]void forceRefresh()
Force a GUI update of this window and its children
[more]virtual void reparent(FXWindow* newparent)
Change the parent for this window
[more]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
[more]void update(FXint x, FXint y, FXint w, FXint h)
Mark the specified rectangle dirty, ie.
[more]void update()
Mark the entire window client area dirty
[more]void repaint(FXint x, FXint y, FXint w, FXint h)
If marked but not yet painted, paint the given area
[more]void repaint()
If marked but not yet painted, paint the entire window
[more]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
[more]void ungrab()
Release the mouse grab
[more]FXbool grabbed() const
Return true if the window has been grabbed
[more]void grabKeyboard()
Grab keyboard device
[more]void ungrabKeyboard()
Ungrab keyboard device
[more]FXbool grabbedKeyboard() const
Return true if active grab is in effect
[more]virtual void show()
Show this window
[more]virtual void hide()
Hide this window
[more]FXbool shown() const
Return true if the window is shown
[more]virtual FXbool isComposite() const
Return true if the window is composite
[more]FXbool underCursor() const
Return true if the window is under the cursor
[more]FXbool hasSelection() const
Return true if this window owns the primary selection
[more]FXbool acquireSelection(const FXDragType* types, FXuint numtypes)
Try to acquire the primary selection, given a list of drag types
[more]FXbool releaseSelection()
Release the primary selection
[more]FXbool hasClipboard() const
Return true if this window owns the clipboard
[more]FXbool acquireClipboard(const FXDragType* types, FXuint numtypes)
Try to acquire the clipboard, given a list of drag types
[more]FXbool releaseClipboard()
Release the clipboard
[more]void dropEnable()
Enable this window to receive drops
[more]void dropDisable()
Disable this window from receiving drops
[more]FXbool isDropEnabled() const
Return true if this window is able to receive drops
[more]FXbool isDragging() const
Return true if a drag operaion has been initiated from this window
[more]FXbool beginDrag(const FXDragType* types, FXuint numtypes)
Initiate a drag operation with a list of previously registered drag types
[more]FXbool handleDrag(FXint x, FXint y, FXDragAction action=DRAG_COPY)
When dragging, inform the drop-target of the new position and the drag action
[more]FXbool endDrag(FXbool drop=TRUE)
Terminate the drag operation with or without actually dropping the data
[more]FXbool isDropTarget() const
Return true if this window is the target of a drop
[more]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
[more]void clearDragRectangle()
When being dragged over, indicate we want to receive SEL_DND_MOTION messages every time the cursor moves
[more]void acceptDrop(FXDragAction action=DRAG_ACCEPT)
When being dragged over, indicate acceptance or rejection of the dragged data
[more]FXDragAction didAccept() const
The target accepted our drop
[more]FXbool inquireDNDTypes(FXDNDOrigin origin, FXDragType*& types, FXuint& numtypes)
When being dragged over, inquire the drag types which are being offered
[more]FXbool offeredDNDType(FXDNDOrigin origin, FXDragType type)
When being dragged over, return true if we are offered the given drag type
[more]FXDragAction inquireDNDAction() const
When being dragged over, return the drag action
[more]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
[more]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
[more]virtual FXbool contains(FXint parentx, FXint parenty) const
Return true if window logically contains the given point
[more]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
[more]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
[more]virtual void setBackColor(FXColor clr)
Set window background color
[more]FXColor getBackColor() const
Get background color
[more]void linkBefore(FXWindow* sibling)
Relink this window before sibling in the window list
[more]void linkAfter(FXWindow* sibling)
Relink this window after sibling in the window list
[more]virtual void save(FXStream& store) const
Save window to stream
[more]virtual void load(FXStream& store)
Restore window from stream
[more]virtual ~FXWindow()
Destroy window


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

Base class for all windows
o FXWindow(FXComposite* p, FXuint opts=0, FXint x=0, FXint y=0, FXint w=0, FXint h=0)
Constructor

oFXWindow* getParent() const
Return a pointer to the parent window

oFXWindow* getOwner() const
Return a pointer to the owner window

oFXWindow* getShell() const
Return a pointer to the shell window

oFXWindow* getRoot() const
Return a pointer to the root window

oFXWindow* getNext() const
Return a pointer to the next (sibling) window, if any

oFXWindow* getPrev() const
Return a pointer to the previous (sibling) window , if any

oFXWindow* getFirst() const
Return a pointer to this window's first child window , if any

oFXWindow* getLast() const
Return a pointer to this window's last child window, if any

oFXWindow* getFocus() const
Return a pointer to the currently focused child window

ovoid setKey(FXuint k)
Change window key

oFXuint getKey() const
Return window key

ovoid setTarget(FXObject* t)
Set the message target object for this window

oFXObject* getTarget() const
Get the message target object for this window, if any

ovoid setSelector(FXSelector sel)
Set the message identifier for this window

oFXSelector getSelector() const
Get the message identifier for this window

oFXint getX() const
Get this window's x-coordinate, in the parent's coordinate system

oFXint getY() const
Get this window's y-coordinate, in the parent's coordinate system

ovirtual FXint getDefaultWidth()
Return the default width of this window

ovirtual FXint getDefaultHeight()
Return the default height of this window

ovirtual FXint getWidthForHeight(FXint givenheight)
Return width for given height

ovirtual FXint getHeightForWidth(FXint givenwidth)
Return height for given width

ovoid setX(FXint x)
Set this window's x-coordinate, in the parent's coordinate system

ovoid setY(FXint y)
Set this window's y-coordinate, in the parent's coordinate system

ovoid setWidth(FXint w)
Set the window width

ovoid setHeight(FXint h)
Set the window height

ovoid setLayoutHints(FXuint lout)
Set layout hints for this window

oFXuint getLayoutHints() const
Get layout hints for this window

oFXAccelTable* getAccelTable() const
Return a pointer to the accelerator table

ovoid setAccelTable(FXAccelTable* acceltable)
Set the accelerator table

ovoid addHotKey(FXHotKey code)
Add a hot key

ovoid remHotKey(FXHotKey code)
Remove a hot key

oFXbool isShell() const
Return true if window is a shell window

oFXbool isChildOf(const FXWindow* window) const
Return true if specified window is this window's parent

oFXbool containsChild(const FXWindow* child) const
Return true if specified window is a child of this window

oFXWindow* getChildAt(FXint x, FXint y) const
Return the child window at specified coordinates

oFXint numChildren() const
Return the number of child windows for this window

oFXint 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

oFXWindow* childAtIndex(FXint index) const
Return the child window at specified index, or NULL if the index is negative or out of range

ostatic FXWindow* commonAncestor(FXWindow* a, FXWindow* b)
Return the common ancestor of window a and window b

ovoid setDefaultCursor(FXCursor* cur)
Set the default cursor for this window

oFXCursor* getDefaultCursor() const
Return the default cursor for this window

ovoid setDragCursor(FXCursor* cur)
Set the drag cursor for this window

oFXCursor* getDragCursor() const
Return the drag cursor for this window

oFXint getCursorPosition(FXint& x, FXint& y, FXuint& buttons) const
Return the cursor position and mouse button-state

oFXint setCursorPosition(FXint x, FXint y)
Warp the cursor to the new position

oFXbool isEnabled() const
Return true if this window is able to receive mouse and keyboard events

oFXbool isActive() const
Return true if the window is active

ovirtual FXbool canFocus() const
Return true if this window is a control capable of receiving the focus

oFXbool hasFocus() const
Return true if this window has the focus

ovirtual void setFocus()
Move the focus to this window

ovirtual void killFocus()
Remove the focus from this window

ovirtual 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.

oFXbool isDefault() const
Return true if this is the default window

ovoid setInitial(FXbool enable=TRUE)
Make this window the initial default window

oFXbool isInitial() const
Return true if this is the initial default window

ovirtual void enable()
Enable the window to receive mouse and keyboard events

ovirtual void disable()
Disable the window from receiving mouse and keyboard events

ovirtual void create()
Create all of the server-side resources for this window

ovirtual void detach()
Detach the server-side resources for this window

ovirtual void destroy()
Destroy the server-side resources for this window

ovirtual void raise()
Raise this window to the top of the stacking order

ovirtual void lower()
Lower this window to the bottom of the stacking order

ovirtual void move(FXint x, FXint y)
Move this window to the specified position in the parent's coordinates

ovirtual void resize(FXint w, FXint h)
Resize this window to the specified width and height

ovirtual void position(FXint x, FXint y, FXint w, FXint h)
Move and resize this window in the parent's coordinates

ovirtual void recalc()
Mark this window's layout as dirty

ovoid forceRefresh()
Force a GUI update of this window and its children

ovirtual void reparent(FXWindow* newparent)
Change the parent for this window

ovoid 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

ovoid update(FXint x, FXint y, FXint w, FXint h)
Mark the specified rectangle dirty, ie. to be repainted

ovoid update()
Mark the entire window client area dirty

ovoid repaint(FXint x, FXint y, FXint w, FXint h)
If marked but not yet painted, paint the given area

ovoid repaint()
If marked but not yet painted, paint the entire window

ovoid 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

ovoid ungrab()
Release the mouse grab

oFXbool grabbed() const
Return true if the window has been grabbed

ovoid grabKeyboard()
Grab keyboard device

ovoid ungrabKeyboard()
Ungrab keyboard device

oFXbool grabbedKeyboard() const
Return true if active grab is in effect

ovirtual void show()
Show this window

ovirtual void hide()
Hide this window

oFXbool shown() const
Return true if the window is shown

ovirtual FXbool isComposite() const
Return true if the window is composite

oFXbool underCursor() const
Return true if the window is under the cursor

oFXbool hasSelection() const
Return true if this window owns the primary selection

oFXbool acquireSelection(const FXDragType* types, FXuint numtypes)
Try to acquire the primary selection, given a list of drag types

oFXbool releaseSelection()
Release the primary selection

oFXbool hasClipboard() const
Return true if this window owns the clipboard

oFXbool acquireClipboard(const FXDragType* types, FXuint numtypes)
Try to acquire the clipboard, given a list of drag types

oFXbool releaseClipboard()
Release the clipboard

ovoid dropEnable()
Enable this window to receive drops

ovoid dropDisable()
Disable this window from receiving drops

oFXbool isDropEnabled() const
Return true if this window is able to receive drops

oFXbool isDragging() const
Return true if a drag operaion has been initiated from this window

oFXbool beginDrag(const FXDragType* types, FXuint numtypes)
Initiate a drag operation with a list of previously registered drag types

oFXbool handleDrag(FXint x, FXint y, FXDragAction action=DRAG_COPY)
When dragging, inform the drop-target of the new position and the drag action

oFXbool endDrag(FXbool drop=TRUE)
Terminate the drag operation with or without actually dropping the data

oFXbool isDropTarget() const
Return true if this window is the target of a drop

ovoid 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

ovoid clearDragRectangle()
When being dragged over, indicate we want to receive SEL_DND_MOTION messages every time the cursor moves

ovoid acceptDrop(FXDragAction action=DRAG_ACCEPT)
When being dragged over, indicate acceptance or rejection of the dragged data

oFXDragAction didAccept() const
The target accepted our drop

oFXbool inquireDNDTypes(FXDNDOrigin origin, FXDragType*& types, FXuint& numtypes)
When being dragged over, inquire the drag types which are being offered

oFXbool offeredDNDType(FXDNDOrigin origin, FXDragType type)
When being dragged over, return true if we are offered the given drag type

oFXDragAction inquireDNDAction() const
When being dragged over, return the drag action

oFXbool 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

oFXbool 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

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

ovoid 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

ovoid 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

ovirtual void setBackColor(FXColor clr)
Set window background color

oFXColor getBackColor() const
Get background color

ovoid linkBefore(FXWindow* sibling)
Relink this window before sibling in the window list

ovoid linkAfter(FXWindow* sibling)
Relink this window after sibling in the window list

ovirtual void save(FXStream& store) const
Save window to stream

ovirtual void load(FXStream& store)
Restore window from stream

ovirtual ~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++.