25 #include "FXDrawable.h" 39 class FXComposeContext;
46 LAYOUT_SIDE_BOTTOM = 0x00000001,
47 LAYOUT_SIDE_LEFT = 0x00000002,
48 LAYOUT_SIDE_RIGHT = LAYOUT_SIDE_LEFT|LAYOUT_SIDE_BOTTOM,
49 LAYOUT_FILL_COLUMN = 0x00000001,
50 LAYOUT_FILL_ROW = 0x00000002,
52 LAYOUT_RIGHT = 0x00000004,
53 LAYOUT_CENTER_X = 0x00000008,
54 LAYOUT_FIX_X = LAYOUT_RIGHT|LAYOUT_CENTER_X,
56 LAYOUT_BOTTOM = 0x00000010,
57 LAYOUT_CENTER_Y = 0x00000020,
58 LAYOUT_FIX_Y = LAYOUT_BOTTOM|LAYOUT_CENTER_Y,
60 LAYOUT_DOCK_NEXT = 0x00000040,
61 LAYOUT_RESERVED_1 = 0x00000080,
62 LAYOUT_FIX_WIDTH = 0x00000100,
63 LAYOUT_FIX_HEIGHT = 0x00000200,
65 LAYOUT_MIN_HEIGHT = 0,
66 LAYOUT_FILL_X = 0x00000400,
67 LAYOUT_FILL_Y = 0x00000800,
68 LAYOUT_FILL = LAYOUT_FILL_X|LAYOUT_FILL_Y,
69 LAYOUT_EXPLICIT = LAYOUT_FIX_X|LAYOUT_FIX_Y|LAYOUT_FIX_WIDTH|LAYOUT_FIX_HEIGHT
76 FRAME_SUNKEN = 0x00001000,
77 FRAME_RAISED = 0x00002000,
78 FRAME_THICK = 0x00004000,
79 FRAME_GROOVE = FRAME_THICK,
80 FRAME_RIDGE = FRAME_THICK|FRAME_RAISED|FRAME_SUNKEN,
81 FRAME_LINE = FRAME_RAISED|FRAME_SUNKEN,
82 FRAME_NORMAL = FRAME_SUNKEN|FRAME_THICK
89 PACK_UNIFORM_HEIGHT = 0x00008000,
90 PACK_UNIFORM_WIDTH = 0x00010000
156 static FXDragType octetType;
157 static FXDragType deleteType;
158 static FXDragType textType;
159 static FXDragType colorType;
160 static FXDragType urilistType;
161 static FXDragType utf8Type;
162 static FXDragType utf16Type;
163 static FXDragType actionType;
164 static const FXDragType stringType;
165 static const FXDragType imageType;
167 virtual FXbool doesOverrideRedirect()
const;
170 virtual FXID GetDC()
const;
171 virtual int ReleaseDC(FXID)
const;
172 virtual const void* GetClass()
const;
174 void addColormapWindows();
175 void remColormapWindows();
188 FLAG_SHOWN = 0x00000001,
189 FLAG_ENABLED = 0x00000002,
190 FLAG_UPDATE = 0x00000004,
191 FLAG_DROPTARGET = 0x00000008,
192 FLAG_FOCUSED = 0x00000010,
193 FLAG_DIRTY = 0x00000020,
194 FLAG_RECALC = 0x00000040,
195 FLAG_TIP = 0x00000080,
196 FLAG_HELP = 0x00000100,
197 FLAG_DEFAULT = 0x00000200,
198 FLAG_INITIAL = 0x00000400,
199 FLAG_SHELL = 0x00000800,
200 FLAG_ACTIVE = 0x00001000,
201 FLAG_PRESSED = 0x00002000,
202 FLAG_KEY = 0x00004000,
203 FLAG_CARET = 0x00008000,
204 FLAG_CHANGED = 0x00010000,
205 FLAG_LASSO = 0x00020000,
206 FLAG_TRYDRAG = 0x00040000,
207 FLAG_DODRAG = 0x00080000,
208 FLAG_SCROLLINSIDE = 0x00100000,
209 FLAG_SCROLLING = 0x00200000,
210 FLAG_OWNED = 0x00400000,
211 FLAG_CURSOR = 0x00800000
235 long onPaint(
FXObject*,FXSelector,
void*);
236 long onMap(
FXObject*,FXSelector,
void*);
237 long onUnmap(
FXObject*,FXSelector,
void*);
238 long onConfigure(
FXObject*,FXSelector,
void*);
239 long onUpdate(
FXObject*,FXSelector,
void*);
240 long onMotion(
FXObject*,FXSelector,
void*);
241 long onMouseWheel(
FXObject*,FXSelector,
void*);
242 long onEnter(
FXObject*,FXSelector,
void*);
243 long onLeave(
FXObject*,FXSelector,
void*);
244 long onLeftBtnPress(
FXObject*,FXSelector,
void*);
245 long onLeftBtnRelease(
FXObject*,FXSelector,
void*);
246 long onMiddleBtnPress(
FXObject*,FXSelector,
void*);
247 long onMiddleBtnRelease(
FXObject*,FXSelector,
void*);
248 long onRightBtnPress(
FXObject*,FXSelector,
void*);
249 long onRightBtnRelease(
FXObject*,FXSelector,
void*);
250 long onSpaceBallMotion(
FXObject*,FXSelector,
void*);
251 long onSpaceBallButtonPress(
FXObject*,FXSelector,
void*);
252 long onSpaceBallButtonRelease(
FXObject*,FXSelector,
void*);
253 long onBeginDrag(
FXObject*,FXSelector,
void*);
254 long onEndDrag(
FXObject*,FXSelector,
void*);
255 long onDragged(
FXObject*,FXSelector,
void*);
256 long onKeyPress(
FXObject*,FXSelector,
void*);
257 long onKeyRelease(
FXObject*,FXSelector,
void*);
258 long onUngrabbed(
FXObject*,FXSelector,
void*);
259 long onDestroy(
FXObject*,FXSelector,
void*);
260 long onFocusSelf(
FXObject*,FXSelector,
void*);
261 long onFocusIn(
FXObject*,FXSelector,
void*);
262 long onFocusOut(
FXObject*,FXSelector,
void*);
263 long onSelectionLost(
FXObject*,FXSelector,
void*);
264 long onSelectionGained(
FXObject*,FXSelector,
void*);
265 long onSelectionRequest(
FXObject*,FXSelector,
void*);
266 long onClipboardLost(
FXObject*,FXSelector,
void*);
267 long onClipboardGained(
FXObject*,FXSelector,
void*);
268 long onClipboardRequest(
FXObject*,FXSelector,
void*);
269 long onDNDEnter(
FXObject*,FXSelector,
void*);
270 long onDNDLeave(
FXObject*,FXSelector,
void*);
271 long onDNDMotion(
FXObject*,FXSelector,
void*);
272 long onDNDDrop(
FXObject*,FXSelector,
void*);
273 long onDNDRequest(
FXObject*,FXSelector,
void*);
274 long onQueryHelp(
FXObject*,FXSelector,
void*);
275 long onQueryTip(
FXObject*,FXSelector,
void*);
276 long onCmdShow(
FXObject*,FXSelector,
void*);
277 long onCmdHide(
FXObject*,FXSelector,
void*);
278 long onUpdToggleShown(
FXObject*,FXSelector,
void*);
279 long onCmdToggleShown(
FXObject*,FXSelector,
void*);
280 long onCmdRaise(
FXObject*,FXSelector,
void*);
281 long onCmdLower(
FXObject*,FXSelector,
void*);
282 long onCmdEnable(
FXObject*,FXSelector,
void*);
283 long onCmdDisable(
FXObject*,FXSelector,
void*);
284 long onUpdToggleEnabled(
FXObject*,FXSelector,
void*);
285 long onCmdToggleEnabled(
FXObject*,FXSelector,
void*);
286 long onCmdUpdate(
FXObject*,FXSelector,
void*);
287 long onUpdYes(
FXObject*,FXSelector,
void*);
288 long onCmdDelete(
FXObject*,FXSelector,
void*);
330 ID_MDI_TILEHORIZONTAL,
349 static const FXchar octetTypeName[];
350 static const FXchar deleteTypeName[];
351 static const FXchar textTypeName[];
352 static const FXchar colorTypeName[];
353 static const FXchar urilistTypeName[];
354 static const FXchar utf8TypeName[];
355 static const FXchar utf16TypeName[];
356 static const FXchar actionTypeName[];
361 FXWindow(FXComposite* p,FXuint opts=0,FXint x=0,FXint y=0,FXint w=0,FXint h=0);
391 virtual WindowClass getWindowClass()
const;
400 FXWindow* getChildWithKey(FXuint k)
const;
415 FXint
getX()
const {
return xpos; }
418 FXint
getY()
const {
return ypos; }
421 virtual FXint getDefaultWidth();
424 virtual FXint getDefaultHeight();
427 virtual FXint getWidthForHeight(FXint givenheight);
430 virtual FXint getHeightForWidth(FXint givenwidth);
443 void setWidth(FXint w);
450 void setHeight(FXint h);
453 void setLayoutHints(FXuint lout);
456 FXuint getLayoutHints()
const;
465 void addHotKey(FXHotKey code);
468 void remHotKey(FXHotKey code);
477 FXbool isShell()
const;
480 FXbool isOwnerOf(
const FXWindow* window)
const;
483 FXbool isChildOf(
const FXWindow* window)
const;
486 FXbool containsChild(
const FXWindow* child)
const;
489 FXWindow* getChildAt(FXint x,FXint y)
const;
492 FXint numChildren()
const;
498 FXint indexOfChild(
const FXWindow *window)
const;
504 FXWindow* childAtIndex(FXint index)
const;
519 void createComposeContext();
522 void destroyComposeContext();
525 FXbool cursorShown()
const;
528 void showCursor(FXbool flag=
true);
531 void setDefaultCursor(
FXCursor* cur);
543 FXbool getCursorPosition(FXint& x,FXint& y,FXuint& buttons)
const;
546 FXbool setCursorPosition(FXint x,FXint y);
549 FXbool isActive()
const;
552 virtual FXbool canFocus()
const;
555 FXbool hasFocus()
const;
558 FXbool inFocusChain()
const;
561 virtual void setFocus();
564 virtual void killFocus();
567 FXbool isDefault()
const;
576 virtual void setDefault(FXuchar flag=
true);
582 FXbool isInitial()
const;
585 void setInitial(FXbool flag=
true);
591 FXbool isEnabled()
const;
594 virtual void enable();
597 virtual void disable();
600 virtual void create();
603 virtual void attach(FXID w);
606 virtual void detach();
609 virtual void destroy();
612 virtual void setShape(
const FXRegion& region);
615 virtual void setShape(
FXBitmap* bitmap);
618 virtual void setShape(
FXIcon* icon);
621 virtual void clearShape();
624 virtual void raise();
627 virtual void lower();
634 virtual void move(FXint x,FXint y);
641 virtual void resize(FXint w,FXint h);
648 virtual void position(FXint x,FXint y,FXint w,FXint h);
651 virtual void recalc();
654 virtual void layout();
663 void scroll(FXint x,FXint y,FXint w,FXint h,FXint dx,FXint dy)
const;
666 void update(FXint x,FXint y,FXint w,FXint h)
const;
672 void repaint(FXint x,FXint y,FXint w,FXint h)
const;
675 void repaint()
const;
678 FXbool grabbed()
const;
690 FXbool grabbedKeyboard()
const;
696 void ungrabKeyboard();
699 FXbool shown()
const;
708 virtual FXbool isComposite()
const;
711 FXbool underCursor()
const;
714 FXbool hasSelection()
const;
717 FXbool acquireSelection(
const FXDragType *types,FXuint numtypes);
720 FXbool releaseSelection();
723 FXbool hasClipboard()
const;
726 FXbool acquireClipboard(
const FXDragType *types,FXuint numtypes);
729 FXbool releaseClipboard();
732 FXbool isDropEnabled()
const;
735 virtual void dropEnable();
738 virtual void dropDisable();
741 FXbool isDragging()
const;
744 FXbool beginDrag(
const FXDragType *types,FXuint numtypes);
750 FXbool handleDrag(FXint x,FXint y,FXDragAction action=DRAG_COPY);
756 FXDragAction endDrag(FXbool drop=
true);
759 FXbool isDropTarget()
const;
765 void setDragRectangle(FXint x,FXint y,FXint w,FXint h,FXbool wantupdates=
true)
const;
771 void clearDragRectangle()
const;
774 void acceptDrop(FXDragAction action=DRAG_ACCEPT)
const;
777 FXDragAction didAccept()
const;
790 void dropFinished(FXDragAction action=DRAG_REJECT)
const;
793 FXbool inquireDNDTypes(FXDNDOrigin origin,FXDragType*& types,FXuint& numtypes)
const;
796 FXbool offeredDNDType(FXDNDOrigin origin,FXDragType type)
const;
799 FXDragAction inquireDNDAction()
const;
805 FXbool setDNDData(FXDNDOrigin origin,FXDragType type,FXuchar* data,FXuint size)
const;
810 FXbool setDNDData(FXDNDOrigin origin,FXDragType type,
const FXString&
string)
const;
816 FXbool getDNDData(FXDNDOrigin origin,FXDragType type,FXuchar*& data,FXuint& size)
const;
821 FXbool getDNDData(FXDNDOrigin origin,FXDragType type,
FXString&
string)
const;
824 virtual FXbool contains(FXint parentx,FXint parenty)
const;
827 void translateCoordinatesFrom(FXint& tox,FXint& toy,
const FXWindow* fromwindow,FXint fromx,FXint fromy)
const;
830 void translateCoordinatesTo(FXint& tox,FXint& toy,
const FXWindow* towindow,FXint fromx,FXint fromy)
const;
833 virtual void setBackColor(FXColor clr);
839 virtual FXbool doesSaveUnder()
const;
849 virtual const FXchar* tr(
const FXchar* text,
const FXchar* hint=
nullptr,FXint count=-1) const FX_FORMAT(2) ;
852 virtual
void save(
FXStream& store) const;
Special child window.
Definition: FXWindow.h:221
Notify window.
Definition: FXWindow.h:230
FXWindow * getFocus() const
Return a pointer to the currently focused child window.
Definition: FXWindow.h:382
A Bitmap is a rectangular array of pixels.
Definition: FXBitmap.h:55
Window is the base class for all widgets in FOX.
Definition: FXWindow.h:130
FXAccelTable * getAccelTable() const
Return a pointer to the accelerator table.
Definition: FXWindow.h:459
Main application window.
Definition: FXWindow.h:226
FXComposeContext * getComposeContext() const
Return compose context.
Definition: FXWindow.h:516
FXWindow * getLast() const
Return a pointer to this window's last child window, if any.
Definition: FXWindow.h:379
The accelerator table sends a message to a specific target object when the indicated key and modifier...
Definition: FXAccelTable.h:36
FXWindow * getParent() const
Return a pointer to the parent window.
Definition: FXWindow.h:364
Graphics child window.
Definition: FXWindow.h:220
Tooltip window.
Definition: FXWindow.h:225
FXuint getKey() const
Return window key.
Definition: FXWindow.h:397
The Application object is the central point of a FOX user-interface.
Definition: FXApp.h:134
void setSelector(FXSelector sel)
Set the message identifier for this window.
Definition: FXWindow.h:409
FXWindow * getFirst() const
Return a pointer to this window's first child window , if any.
Definition: FXWindow.h:376
Popup window.
Definition: FXWindow.h:224
FXWindow * getPrev() const
Return a pointer to the previous (sibling) window , if any.
Definition: FXWindow.h:373
A stream is a way to serialize data and objects into a byte stream.
Definition: FXStream.h:81
FXWindow * getOwner() const
Return a pointer to the owner window.
Definition: FXWindow.h:367
void setTarget(FXObject *t)
Set the message target object for this window.
Definition: FXWindow.h:403
Root window.
Definition: FXWindow.h:222
void setKey(FXuint k)
Change window key.
Definition: FXWindow.h:394
Splash window.
Definition: FXWindow.h:229
Definition: FX4Splitter.h:28
An Icon is an image with two additional server-side resources: a shape bitmap, which is used to mask ...
Definition: FXIcon.h:42
FXObject * getTarget() const
Get the message target object for this window, if any.
Definition: FXWindow.h:406
Shell window.
Definition: FXWindow.h:223
Compose Context manages the state of an input method if input method support is enabled.
Definition: FXComposeContext.h:39
Normal child window.
Definition: FXWindow.h:219
Cursor class.
Definition: FXCursor.h:52
Visual describes pixel format of a drawable.
Definition: FXVisual.h:58
FXSelector getSelector() const
Get the message identifier for this window.
Definition: FXWindow.h:412
FXint getX() const
Get this window's x-coordinate, in the parent's coordinate system.
Definition: FXWindow.h:415
FXColor getBackColor() const
Get background color.
Definition: FXWindow.h:836
FXint getY() const
Get this window's y-coordinate, in the parent's coordinate system.
Definition: FXWindow.h:418
Object is the base class for all objects in FOX; in order to receive messages from the user interface...
Definition: FXObject.h:134
Region.
Definition: FXRegion.h:28
FXWindow * getNext() const
Return a pointer to the next (sibling) window, if any.
Definition: FXWindow.h:370
FXCursor * getDragCursor() const
Return the drag cursor for this window.
Definition: FXWindow.h:540
const FXString & getHelpTag() const
Get the help tag for this widget.
Definition: FXWindow.h:474
void setHelpTag(const FXString &text)
Change help tag for this widget.
Definition: FXWindow.h:471
Dialog box window.
Definition: FXWindow.h:227
WindowClass
Window classes.
Definition: FXWindow.h:217
FXCursor * getDefaultCursor() const
Return the default cursor for this window.
Definition: FXWindow.h:534
void setAccelTable(FXAccelTable *acceltable)
Set the accelerator table.
Definition: FXWindow.h:462
Toolbar window.
Definition: FXWindow.h:228
FXString provides essential string manipulation capabilities in FOX.
Definition: FXString.h:42
Drawable is an abstract base class for any surface that can be drawn upon, such as a FXWindow...
Definition: FXDrawable.h:38