10 #define WINGS_H_VERSION 20000521
15 #endif /* __cplusplus */
21 typedef unsigned long WMPixel
;
40 /* WMRange was moved in WUtil.h */
42 #define ClientMessageMask (1L<<30)
45 /* window stacking level */
47 WMNormalWindowLevel
= 0,
48 WMFloatingWindowLevel
= 3,
49 WMDockWindowLevel
= 5,
50 WMSubmenuWindowLevel
= 10,
51 WMMainMenuWindowLevel
= 20
54 /* window attributes */
56 WMBorderlessWindowMask
= 0,
57 WMTitledWindowMask
= 1,
58 WMClosableWindowMask
= 2,
59 WMMiniaturizableWindowMask
= 4,
60 WMResizableWindowMask
= 8
66 /* 0 is reserved for internal use */
72 WBTMomentaryChange
= 6,
77 /* button behaviour masks */
79 WBBSpringLoadedMask
= (1 << 0),
80 WBBPushInMask
= (1 << 1),
81 WBBPushChangeMask
= (1 << 2),
82 WBBPushLightMask
= (1 << 3),
83 WBBStateLightMask
= (1 << 5),
84 WBBStateChangeMask
= (1 << 6),
85 WBBStatePushMask
= (1 << 7)
89 /* frame title positions */
113 /* alignment types */
118 WAJustified
/* not valid for textfields */
134 /* scroller arrow position */
139 } WMScrollArrowPosition
;
154 /* usable scroller parts */
159 } WMUsableScrollerParts
;
171 WTTopTabsBevelBorder
,
178 /* text movement types */
180 WMIllegalTextMovement
,
181 WMReturnTextMovement
,
182 WMEscapeTextMovement
,
184 WMBacktabTextMovement
,
191 /* text field special events */
199 WLNotFound
= -1 /* element was not found in WMList */
203 /* drag operations */
211 } WMDragOperationType
;
215 WMGrayModeColorPanel
= 1,
216 WMRGBModeColorPanel
= 2,
217 WMCMYKModeColorPanel
= 3,
218 WMHSBModeColorPanel
= 4,
219 WMCustomPaletteModeColorPanel
= 5,
220 WMColorListModeColorPanel
= 6,
221 WMWheelModeColorPanel
= 7
227 #define WSIReturnArrow 1
228 #define WSIHighlightedReturnArrow 2
229 #define WSIScrollerDimple 3
230 #define WSIArrowLeft 4
231 #define WSIHighlightedArrowLeft 5
232 #define WSIArrowRight 6
233 #define WSIHighlightedArrowRight 7
235 #define WSIHighlightedArrowUp 9
236 #define WSIArrowDown 10
237 #define WSIHighlightedArrowDown 11
238 #define WSICheckMark 12
241 WLDSSelected
= (1 << 16),
242 WLDSDisabled
= (1 << 17),
243 WLDSFocused
= (1 << 18),
244 WLDSIsBranch
= (1 << 19)
247 /* alert panel return values */
257 /* types of input observers */
259 WIReadMask
= (1 << 0),
260 WIWriteMask
= (1 << 1),
261 WIExceptMask
= (1 << 2)
281 WC_Matrix
= 12, /* not ready */
284 WC_ProgressIndicator
= 15,
290 /* All widgets must start with the following structure
291 * in that order. Used for typecasting to get some generic data */
292 typedef struct W_WidgetType
{
299 #define WMWidgetClass(widget) (((W_WidgetType*)(widget))->widgetClass)
300 #define WMWidgetView(widget) (((W_WidgetType*)(widget))->view)
305 typedef void WMWidget
;
307 typedef struct W_Pixmap WMPixmap
;
308 typedef struct W_Font WMFont
;
309 typedef struct W_Color WMColor
;
311 typedef struct W_Screen WMScreen
;
313 typedef struct W_View WMView
;
315 typedef struct W_Window WMWindow
;
316 typedef struct W_Frame WMFrame
;
317 typedef struct W_Button WMButton
;
318 typedef struct W_Label WMLabel
;
319 typedef struct W_TextField WMTextField
;
320 typedef struct W_Scroller WMScroller
;
321 typedef struct W_ScrollView WMScrollView
;
322 typedef struct W_List WMList
;
323 typedef struct W_Browser WMBrowser
;
324 typedef struct W_PopUpButton WMPopUpButton
;
325 typedef struct W_ProgressIndicator WMProgressIndicator
;
326 typedef struct W_ColorWell WMColorWell
;
327 typedef struct W_Slider WMSlider
;
328 typedef struct W_Matrix WMMatrix
; /* not ready */
329 typedef struct W_SplitView WMSplitView
;
330 typedef struct W_TabView WMTabView
;
331 typedef struct W_Ruler WMRuler
;
332 typedef struct W_Text WMText
;
336 typedef struct W_TabViewItem WMTabViewItem
;
337 typedef struct W_MenuItem WMMenuItem
;
340 typedef struct W_FilePanel WMFilePanel
;
341 typedef WMFilePanel WMOpenPanel
;
342 typedef WMFilePanel WMSavePanel
;
344 typedef struct W_FontPanel WMFontPanel
;
346 typedef struct W_ColorPanel WMColorPanel
;
349 /* item for WMList */
350 typedef struct WMListItem
{
352 void *clientData
; /* ptr for user clientdata. */
354 unsigned int uflags
:16; /* flags for the user */
355 unsigned int selected
:1;
356 unsigned int disabled
:1;
357 unsigned int isBranch
:1;
358 unsigned int loaded
:1;
361 /* struct for message panel */
362 typedef struct WMAlertPanel
{
363 WMWindow
*win
; /* window */
364 WMButton
*defBtn
; /* default button */
365 WMButton
*altBtn
; /* alternative button */
366 WMButton
*othBtn
; /* other button */
367 WMLabel
*iLbl
; /* icon label */
368 WMLabel
*tLbl
; /* title label */
369 WMLabel
*mLbl
; /* message label */
370 WMFrame
*line
; /* separator */
371 short result
; /* button that was pushed */
379 typedef struct WMInputPanel
{
380 WMWindow
*win
; /* window */
381 WMButton
*defBtn
; /* default button */
382 WMButton
*altBtn
; /* alternative button */
383 WMLabel
*tLbl
; /* title label */
384 WMLabel
*mLbl
; /* message label */
385 WMTextField
*text
; /* text field */
386 short result
; /* button that was pushed */
398 WMArray
*tabs
; /* a growable array of tabstops */
399 unsigned short left
; /* left margin marker */
400 unsigned short right
; /* right margin marker */
401 unsigned short first
; /* indentation marker for first line only */
402 unsigned short body
; /* body indentation marker */
403 unsigned short retainCount
;
405 /* All indentation and tab markers are _relative_ to the left margin marker */
408 typedef void *WMHandlerID
;
410 typedef void WMInputProc(int fd
, int mask
, void *clientData
);
412 typedef void WMEventProc(XEvent
*event
, void *clientData
);
414 typedef void WMEventHook(XEvent
*event
);
416 /* self is set to the widget from where the callback is being called and
417 * clientData to the data set to with WMSetClientData() */
418 typedef void WMAction(WMWidget
*self
, void *clientData
);
420 /* same as WMAction, but for stuff that arent widgets */
421 typedef void WMAction2(void *self
, void *clientData
);
424 typedef void WMCallback(void *data
);
426 typedef void WMDropDataCallback(WMView
*view
, WMData
*data
);
428 /* delegate method like stuff */
429 typedef void WMListDrawProc(WMList
*lPtr
, int index
, Drawable d
, char *text
,
430 int state
, WMRect
*rect
);
433 typedef void WMSplitViewResizeSubviewsProc(WMSplitView *sPtr,
434 unsigned int oldWidth,
435 unsigned int oldHeight);
438 typedef void WMSplitViewConstrainProc(WMSplitView
*sPtr
, int dividerIndex
,
439 int *minSize
, int *maxSize
);
441 typedef WMWidget
*WMMatrixCreateCellProc(WMMatrix
*mPtr
);
446 typedef struct WMBrowserDelegate
{
449 void (*createRowsForColumn
)(struct WMBrowserDelegate
*self
,
450 WMBrowser
*sender
, int column
, WMList
*list
);
452 char* (*titleOfColumn
)(struct WMBrowserDelegate
*self
, WMBrowser
*sender
,
455 void (*didScroll
)(struct WMBrowserDelegate
*self
, WMBrowser
*sender
);
457 void (*willScroll
)(struct WMBrowserDelegate
*self
, WMBrowser
*sender
);
461 typedef struct WMTextFieldDelegate
{
464 void (*didBeginEditing
)(struct WMTextFieldDelegate
*self
,
465 WMNotification
*notif
);
467 void (*didChange
)(struct WMTextFieldDelegate
*self
,
468 WMNotification
*notif
);
470 void (*didEndEditing
)(struct WMTextFieldDelegate
*self
,
471 WMNotification
*notif
);
473 Bool (*shouldBeginEditing
)(struct WMTextFieldDelegate
*self
,
476 Bool (*shouldEndEditing
)(struct WMTextFieldDelegate
*self
,
478 } WMTextFieldDelegate
;
481 typedef struct WMTextDelegate
{
484 void (*didBeginEditing
)(struct WMTextDelegate
*self
,
485 WMNotification
*notif
);
487 void (*didChange
)(struct WMTextDelegate
*self
,
488 WMNotification
*notif
);
490 void (*didEndEditing
)(struct WMTextDelegate
*self
,
491 WMNotification
*notif
);
493 Bool (*shouldBeginEditing
)(struct WMTextDelegate
*self
,
496 Bool (*shouldEndEditing
)(struct WMTextDelegate
*self
,
502 typedef struct WMTabViewDelegate
{
505 void (*didChangeNumberOfItems
)(struct WMTabViewDelegate
*self
,
508 void (*didSelectItem
)(struct WMTabViewDelegate
*self
, WMTabView
*tabView
,
509 WMTabViewItem
*item
);
511 Bool (*shouldSelectItem
)(struct WMTabViewDelegate
*self
, WMTabView
*tabView
,
512 WMTabViewItem
*item
);
514 void (*willSelectItem
)(struct WMTabViewDelegate
*self
, WMTabView
*tabView
,
515 WMTabViewItem
*item
);
521 typedef void WMSelectionCallback(WMView
*view
, Atom selection
, Atom target
,
522 Time timestamp
, void *cdata
, WMData
*data
);
525 typedef struct WMSelectionProcs
{
526 WMData
* (*convertSelection
)(WMView
*view
, Atom selection
, Atom target
,
527 void *cdata
, Atom
*type
);
528 void (*selectionLost
)(WMView
*view
, Atom selection
, void *cdata
);
529 void (*selectionDone
)(WMView
*view
, Atom selection
, Atom target
,
534 typedef struct W_DraggingInfo WMDraggingInfo
;
537 typedef struct W_DragSourceProcs
{
538 unsigned (*draggingSourceOperation
)(WMView
*self
, Bool local
);
539 void (*beganDragImage
)(WMView
*self
, WMPixmap
*image
, WMPoint point
);
540 void (*endedDragImage
)(WMView
*self
, WMPixmap
*image
, WMPoint point
,
542 WMData
* (*fetchDragData
)(WMView
*self
, char *type
);
543 /* Bool (*ignoreModifierKeysWhileDragging)(WMView *view);*/
548 typedef struct W_DragDestinationProcs
{
549 unsigned (*draggingEntered
)(WMView
*self
, WMDraggingInfo
*info
);
550 unsigned (*draggingUpdated
)(WMView
*self
, WMDraggingInfo
*info
);
551 void (*draggingExited
)(WMView
*self
, WMDraggingInfo
*info
);
552 Bool (*prepareForDragOperation
)(WMView
*self
, WMDraggingInfo
*info
);
553 Bool (*performDragOperation
)(WMView
*self
, WMDraggingInfo
*info
);
554 void (*concludeDragOperation
)(WMView
*self
, WMDraggingInfo
*info
);
555 } WMDragDestinationProcs
;
559 /* ...................................................................... */
562 WMRange
wmkrange(int start
, int count
);
564 WMPoint
wmkpoint(int x
, int y
);
566 WMSize
wmksize(unsigned int width
, unsigned int height
);
569 /* ....................................................................... */
573 void WMInitializeApplication(char *applicationName
, int *argc
, char **argv
);
575 void WMSetResourcePath(char *path
);
577 /* don't free the returned string */
578 char *WMGetApplicationName();
580 /* Try to locate resource file. ext may be NULL */
581 char *WMPathForResourceOfType(char *resource
, char *ext
);
583 WMScreen
*WMCreateScreenWithRContext(Display
*display
, int screen
,
586 WMScreen
*WMCreateScreen(Display
*display
, int screen
);
588 WMScreen
*WMCreateSimpleApplicationScreen(Display
*display
);
590 void WMScreenMainLoop(WMScreen
*scr
);
593 RContext
*WMScreenRContext(WMScreen
*scr
);
595 Display
*WMScreenDisplay(WMScreen
*scr
);
597 int WMScreenDepth(WMScreen
*scr
);
601 void WMSetApplicationIconImage(WMScreen
*app
, WMPixmap
*icon
);
603 WMPixmap
*WMGetApplicationIconImage(WMScreen
*app
);
605 void WMSetApplicationIconWindow(WMScreen
*scr
, Window window
);
607 void WMSetFocusToWidget(WMWidget
*widget
);
609 WMEventHook
*WMHookEventHandler(WMEventHook
*handler
);
611 int WMHandleEvent(XEvent
*event
);
613 Bool
WMScreenPending(WMScreen
*scr
);
615 void WMCreateEventHandler(WMView
*view
, unsigned long mask
,
616 WMEventProc
*eventProc
, void *clientData
);
618 void WMDeleteEventHandler(WMView
*view
, unsigned long mask
,
619 WMEventProc
*eventProc
, void *clientData
);
621 int WMIsDoubleClick(XEvent
*event
);
623 int WMIsTripleClick(XEvent
*event
);
625 void WMNextEvent(Display
*dpy
, XEvent
*event
);
627 void WMMaskEvent(Display
*dpy
, long mask
, XEvent
*event
);
629 WMHandlerID
WMAddTimerHandler(int milliseconds
, WMCallback
*callback
,
632 void WMDeleteTimerWithClientData(void *cdata
);
634 void WMDeleteTimerHandler(WMHandlerID handlerID
);
636 WMHandlerID
WMAddIdleHandler(WMCallback
*callback
, void *cdata
);
638 void WMDeleteIdleHandler(WMHandlerID handlerID
);
640 WMHandlerID
WMAddInputHandler(int fd
, int condition
, WMInputProc
*proc
,
643 void WMDeleteInputHandler(WMHandlerID handlerID
);
647 Bool
WMCreateSelectionHandler(WMView
*view
, Atom selection
, Time timestamp
,
648 WMSelectionProcs
*procs
, void *cdata
);
650 void WMDeleteSelectionHandler(WMView
*view
, Atom selection
, Time timestamp
);
652 Bool
WMRequestSelection(WMView
*view
, Atom selection
, Atom target
,
653 Time timestamp
, WMSelectionCallback
*callback
,
657 /* ....................................................................... */
659 void WMSetViewDragSourceProcs(WMView
*view
, WMDragSourceProcs
*procs
);
661 void WMDragImageFromView(WMView
*view
, WMPixmap
*image
, char *dataTypes
[],
662 WMPoint atLocation
, WMSize mouseOffset
, XEvent
*event
,
665 void WMRegisterViewForDraggedTypes(WMView
*view
, char *acceptedTypes
[]);
667 void WMUnregisterViewDraggedTypes(WMView
*view
);
669 void WMSetViewDragDestinationProcs(WMView
*view
, WMDragDestinationProcs
*procs
);
672 WMPoint
WMGetDraggingInfoImageLocation(WMDraggingInfo
*info
);
674 /* ....................................................................... */
676 WMFont
*WMCreateFontSet(WMScreen
*scrPtr
, char *fontName
);
678 WMFont
*WMCreateNormalFont(WMScreen
*scrPtr
, char *fontName
);
680 WMFont
*WMCreateFont(WMScreen
*scrPtr
, char *fontName
);
682 WMFont
*WMRetainFont(WMFont
*font
);
684 void WMReleaseFont(WMFont
*font
);
686 unsigned int WMFontHeight(WMFont
*font
);
689 WMFont *WMUserFontOfSize(WMScreen *scrPtr, int size);
691 WMFont *WMUserFixedPitchFontOfSize(WMScreen *scrPtr, int size);
695 void WMSetWidgetDefaultFont(WMScreen
*scr
, WMFont
*font
);
697 void WMSetWidgetDefaultBoldFont(WMScreen
*scr
, WMFont
*font
);
699 WMFont
*WMSystemFontOfSize(WMScreen
*scrPtr
, int size
);
701 WMFont
*WMBoldSystemFontOfSize(WMScreen
*scrPtr
, int size
);
703 XFontSet
WMGetFontFontSet(WMFont
*font
);
705 WMFont
* WMConvertFontToPlain(WMScreen
*scr
, WMFont
*font
);
706 WMFont
* WMConvertFontToBold(WMScreen
*scr
, WMFont
*font
);
707 WMFont
* WMConvertFontToItalic(WMScreen
*scr
, WMFont
*font
);
708 WMFont
* WMGetFontOfSize(WMScreen
*scr
, WMFont
*font
, int size
);
710 /* ....................................................................... */
712 WMPixmap
*WMRetainPixmap(WMPixmap
*pixmap
);
714 void WMReleasePixmap(WMPixmap
*pixmap
);
716 WMPixmap
*WMCreatePixmap(WMScreen
*scrPtr
, int width
, int height
, int depth
,
719 WMPixmap
*WMCreatePixmapFromXPixmaps(WMScreen
*scrPtr
, Pixmap pixmap
,
720 Pixmap mask
, int width
, int height
,
723 WMPixmap
*WMCreatePixmapFromRImage(WMScreen
*scrPtr
, RImage
*image
,
726 WMPixmap
*WMCreatePixmapFromXPMData(WMScreen
*scrPtr
, char **data
);
728 WMSize
WMGetPixmapSize(WMPixmap
*pixmap
);
730 WMPixmap
*WMCreatePixmapFromFile(WMScreen
*scrPtr
, char *fileName
);
732 WMPixmap
*WMCreateBlendedPixmapFromFile(WMScreen
*scrPtr
, char *fileName
,
735 void WMDrawPixmap(WMPixmap
*pixmap
, Drawable d
, int x
, int y
);
737 Pixmap
WMGetPixmapXID(WMPixmap
*pixmap
);
739 Pixmap
WMGetPixmapMaskXID(WMPixmap
*pixmap
);
741 WMPixmap
*WMGetSystemPixmap(WMScreen
*scr
, int image
);
743 /* ....................................................................... */
746 WMColor
*WMDarkGrayColor(WMScreen
*scr
);
748 WMColor
*WMGrayColor(WMScreen
*scr
);
750 WMColor
*WMBlackColor(WMScreen
*scr
);
752 WMColor
*WMWhiteColor(WMScreen
*scr
);
754 void WMSetColorInGC(WMColor
*color
, GC gc
);
756 GC
WMColorGC(WMColor
*color
);
758 WMPixel
WMColorPixel(WMColor
*color
);
760 void WMPaintColorSwatch(WMColor
*color
, Drawable d
, int x
, int y
,
761 unsigned int width
, unsigned int height
);
763 void WMReleaseColor(WMColor
*color
);
765 WMColor
*WMRetainColor(WMColor
*color
);
767 WMColor
*WMCreateRGBColor(WMScreen
*scr
, unsigned short red
,
768 unsigned short green
, unsigned short blue
,
771 WMColor
*WMCreateNamedColor(WMScreen
*scr
, char *name
, Bool exact
);
773 unsigned short WMRedComponentOfColor(WMColor
*color
);
775 unsigned short WMGreenComponentOfColor(WMColor
*color
);
777 unsigned short WMBlueComponentOfColor(WMColor
*color
);
779 char *WMGetColorRGBDescription(WMColor
*color
);
781 /* ....................................................................... */
784 void WMDrawString(WMScreen
*scr
, Drawable d
, GC gc
, WMFont
*font
, int x
,
785 int y
, char *text
, int length
);
787 void WMDrawImageString(WMScreen
*scr
, Drawable d
, GC gc
, WMFont
*font
, int x
,
788 int y
, char *text
, int length
);
790 int WMWidthOfString(WMFont
*font
, char *text
, int length
);
794 /* ....................................................................... */
796 WMScreen
*WMWidgetScreen(WMWidget
*w
);
798 unsigned int WMScreenWidth(WMScreen
*scr
);
800 unsigned int WMScreenHeight(WMScreen
*scr
);
802 void WMUnmapWidget(WMWidget
*w
);
804 void WMMapWidget(WMWidget
*w
);
806 Bool
WMWidgetIsMapped(WMWidget
*w
);
808 void WMRaiseWidget(WMWidget
*w
);
810 void WMLowerWidget(WMWidget
*w
);
812 void WMMoveWidget(WMWidget
*w
, int x
, int y
);
814 void WMResizeWidget(WMWidget
*w
, unsigned int width
, unsigned int height
);
816 void WMSetWidgetBackgroundColor(WMWidget
*w
, WMColor
*color
);
818 void WMMapSubwidgets(WMWidget
*w
);
820 void WMUnmapSubwidgets(WMWidget
*w
);
822 void WMRealizeWidget(WMWidget
*w
);
824 void WMDestroyWidget(WMWidget
*widget
);
826 void WMHangData(WMWidget
*widget
, void *data
);
828 void *WMGetHangedData(WMWidget
*widget
);
830 unsigned int WMWidgetWidth(WMWidget
*w
);
832 unsigned int WMWidgetHeight(WMWidget
*w
);
834 Window
WMWidgetXID(WMWidget
*w
);
836 Window
WMViewXID(WMView
*view
);
838 void WMRedisplayWidget(WMWidget
*w
);
840 void WMSetViewNotifySizeChanges(WMView
*view
, Bool flag
);
842 WMSize
WMGetViewSize(WMView
*view
);
844 WMPoint
WMGetViewPosition(WMView
*view
);
846 WMPoint
WMGetViewScreenPosition(WMView
*view
);
848 WMWidget
*WMWidgetOfView(WMView
*view
);
851 extern char *WMViewSizeDidChangeNotification
;
853 extern char *WMViewRealizedNotification
;
855 extern char *WMFontPanelDidChangeNotification
;
858 /* ....................................................................... */
860 void WMSetBalloonTextForView(char *text
, WMView
*view
);
862 void WMSetBalloonTextAlignment(WMScreen
*scr
, WMAlignment alignment
);
864 void WMSetBalloonFont(WMScreen
*scr
, WMFont
*font
);
866 void WMSetBalloonTextColor(WMScreen
*scr
, WMColor
*color
);
868 void WMSetBalloonDelay(WMScreen
*scr
, int delay
);
870 void WMSetBalloonEnabled(WMScreen
*scr
, Bool flag
);
873 /* ....................................................................... */
875 WMWindow
*WMCreateWindow(WMScreen
*screen
, char *name
);
877 WMWindow
*WMCreateWindowWithStyle(WMScreen
*screen
, char *name
, int style
);
879 WMWindow
*WMCreatePanelWithStyleForWindow(WMWindow
*owner
, char *name
,
882 WMWindow
*WMCreatePanelForWindow(WMWindow
*owner
, char *name
);
884 void WMChangePanelOwner(WMWindow
*win
, WMWindow
*newOwner
);
886 void WMSetWindowTitle(WMWindow
*wPtr
, char *title
);
888 void WMSetWindowMiniwindowTitle(WMWindow
*win
, char *title
);
890 void WMSetWindowMiniwindowImage(WMWindow
*win
, WMPixmap
*pixmap
);
892 void WMSetWindowCloseAction(WMWindow
*win
, WMAction
*action
, void *clientData
);
894 void WMSetWindowInitialPosition(WMWindow
*win
, int x
, int y
);
896 void WMSetWindowUserPosition(WMWindow
*win
, int x
, int y
);
898 void WMSetWindowAspectRatio(WMWindow
*win
, int minX
, int minY
,
901 void WMSetWindowMaxSize(WMWindow
*win
, unsigned width
, unsigned height
);
903 void WMSetWindowMinSize(WMWindow
*win
, unsigned width
, unsigned height
);
905 void WMSetWindowBaseSize(WMWindow
*win
, unsigned width
, unsigned height
);
907 void WMSetWindowResizeIncrements(WMWindow
*win
, unsigned wIncr
, unsigned hIncr
);
909 void WMSetWindowLevel(WMWindow
*win
, int level
);
911 void WMSetWindowDocumentEdited(WMWindow
*win
, Bool flag
);
913 void WMCloseWindow(WMWindow
*win
);
915 /* ....................................................................... */
917 void WMSetButtonAction(WMButton
*bPtr
, WMAction
*action
, void *clientData
);
919 #define WMCreateCommandButton(parent) \
920 WMCreateCustomButton((parent), WBBSpringLoadedMask\
925 #define WMCreateRadioButton(parent) \
926 WMCreateButton((parent), WBTRadio)
928 #define WMCreateSwitchButton(parent) \
929 WMCreateButton((parent), WBTSwitch)
931 WMButton
*WMCreateButton(WMWidget
*parent
, WMButtonType type
);
933 WMButton
*WMCreateCustomButton(WMWidget
*parent
, int behaviourMask
);
935 void WMSetButtonImageDefault(WMButton
*bPtr
);
937 void WMSetButtonImage(WMButton
*bPtr
, WMPixmap
*image
);
939 void WMSetButtonAltImage(WMButton
*bPtr
, WMPixmap
*image
);
941 void WMSetButtonImagePosition(WMButton
*bPtr
, WMImagePosition position
);
943 void WMSetButtonFont(WMButton
*bPtr
, WMFont
*font
);
945 void WMSetButtonTextAlignment(WMButton
*bPtr
, WMAlignment alignment
);
947 void WMSetButtonText(WMButton
*bPtr
, char *text
);
949 void WMSetButtonAltText(WMButton
*bPtr
, char *text
);
951 void WMSetButtonTextColor(WMButton
*bPtr
, WMColor
*color
);
953 void WMSetButtonAltTextColor(WMButton
*bPtr
, WMColor
*color
);
955 void WMSetButtonDisabledTextColor(WMButton
*bPtr
, WMColor
*color
);
957 void WMSetButtonSelected(WMButton
*bPtr
, int isSelected
);
959 int WMGetButtonSelected(WMButton
*bPtr
);
961 void WMSetButtonBordered(WMButton
*bPtr
, int isBordered
);
963 void WMSetButtonEnabled(WMButton
*bPtr
, Bool flag
);
965 void WMSetButtonImageDimsWhenDisabled(WMButton
*bPtr
, Bool flag
);
967 void WMSetButtonTag(WMButton
*bPtr
, int tag
);
969 void WMGroupButtons(WMButton
*bPtr
, WMButton
*newMember
);
971 void WMPerformButtonClick(WMButton
*bPtr
);
973 void WMSetButtonContinuous(WMButton
*bPtr
, Bool flag
);
975 void WMSetButtonPeriodicDelay(WMButton
*bPtr
, float delay
, float interval
);
977 /* ....................................................................... */
979 WMLabel
*WMCreateLabel(WMWidget
*parent
);
981 void WMSetLabelWraps(WMLabel
*lPtr
, Bool flag
);
983 void WMSetLabelImage(WMLabel
*lPtr
, WMPixmap
*image
);
985 WMPixmap
*WMGetLabelImage(WMLabel
*lPtr
);
987 void WMSetLabelImagePosition(WMLabel
*lPtr
, WMImagePosition position
);
989 void WMSetLabelTextAlignment(WMLabel
*lPtr
, WMAlignment alignment
);
991 void WMSetLabelRelief(WMLabel
*lPtr
, WMReliefType relief
);
993 void WMSetLabelText(WMLabel
*lPtr
, char *text
);
995 void WMSetLabelFont(WMLabel
*lPtr
, WMFont
*font
);
997 void WMSetLabelTextColor(WMLabel
*lPtr
, WMColor
*color
);
999 /* ....................................................................... */
1001 WMFrame
*WMCreateFrame(WMWidget
*parent
);
1003 void WMSetFrameTitlePosition(WMFrame
*fPtr
, WMTitlePosition position
);
1005 void WMSetFrameRelief(WMFrame
*fPtr
, WMReliefType relief
);
1007 void WMSetFrameTitle(WMFrame
*fPtr
, char *title
);
1009 /* ....................................................................... */
1011 WMTextField
*WMCreateTextField(WMWidget
*parent
);
1013 void WMInsertTextFieldText(WMTextField
*tPtr
, char *text
, int position
);
1015 void WMDeleteTextFieldRange(WMTextField
*tPtr
, WMRange range
);
1017 /* you can free the returned string */
1018 char *WMGetTextFieldText(WMTextField
*tPtr
);
1020 void WMSetTextFieldText(WMTextField
*tPtr
, char *text
);
1022 void WMSetTextFieldAlignment(WMTextField
*tPtr
, WMAlignment alignment
);
1024 void WMSetTextFieldFont(WMTextField
*tPtr
, WMFont
*font
);
1026 WMFont
*WMGetTextFieldFont(WMTextField
*tPtr
);
1028 void WMSetTextFieldBordered(WMTextField
*tPtr
, Bool bordered
);
1030 void WMSetTextFieldBeveled(WMTextField
*tPtr
, Bool flag
);
1032 Bool
WMGetTextFieldEditable(WMTextField
*tPtr
);
1034 void WMSetTextFieldEditable(WMTextField
*tPtr
, Bool flag
);
1036 void WMSetTextFieldSecure(WMTextField
*tPtr
, Bool flag
);
1038 void WMSelectTextFieldRange(WMTextField
*tPtr
, WMRange range
);
1040 void WMSetTextFieldCursorPosition(WMTextField
*tPtr
, unsigned int position
);
1042 void WMSetTextFieldNextTextField(WMTextField
*tPtr
, WMTextField
*next
);
1044 void WMSetTextFieldPrevTextField(WMTextField
*tPtr
, WMTextField
*prev
);
1046 void WMSetTextFieldDelegate(WMTextField
*tPtr
, WMTextFieldDelegate
*delegate
);
1049 extern char *WMTextDidChangeNotification
;
1050 extern char *WMTextDidBeginEditingNotification
;
1051 extern char *WMTextDidEndEditingNotification
;
1053 /* ....................................................................... */
1055 WMScroller
*WMCreateScroller(WMWidget
*parent
);
1057 void WMSetScrollerParameters(WMScroller
*sPtr
, float floatValue
,
1058 float knobProportion
);
1060 float WMGetScrollerKnobProportion(WMScroller
*sPtr
);
1062 float WMGetScrollerValue(WMScroller
*sPtr
);
1064 WMScrollerPart
WMGetScrollerHitPart(WMScroller
*sPtr
);
1066 void WMSetScrollerAction(WMScroller
*sPtr
, WMAction
*action
, void *clientData
);
1068 void WMSetScrollerArrowsPosition(WMScroller
*sPtr
,
1069 WMScrollArrowPosition position
);
1071 /* ....................................................................... */
1073 WMList
*WMCreateList(WMWidget
*parent
);
1075 void WMSetListAllowMultipleSelection(WMList
*lPtr
, Bool flag
);
1077 void WMSetListAllowEmptySelection(WMList
*lPtr
, Bool flag
);
1079 #define WMAddListItem(lPtr, text) WMInsertListItem((lPtr), -1, (text))
1081 WMListItem
*WMInsertListItem(WMList
*lPtr
, int row
, char *text
);
1083 void WMSortListItems(WMList
*lPtr
);
1085 void WMSortListItemsWithComparer(WMList
*lPtr
, WMCompareDataProc
*func
);
1087 int WMFindRowOfListItemWithTitle(WMList
*lPtr
, char *title
);
1089 WMListItem
*WMGetListItem(WMList
*lPtr
, int row
);
1091 WMArray
*WMGetListItems(WMList
*lPtr
);
1093 void WMRemoveListItem(WMList
*lPtr
, int row
);
1095 void WMSelectListItem(WMList
*lPtr
, int row
);
1097 void WMUnselectListItem(WMList
*lPtr
, int row
);
1099 /* This will select all items in range, and deselect all the others */
1100 void WMSetListSelectionToRange(WMList
*lPtr
, WMRange range
);
1102 /* This will select all items in range, leaving the others as they are */
1103 void WMSelectListItemsInRange(WMList
*lPtr
, WMRange range
);
1105 void WMSelectAllListItems(WMList
*lPtr
);
1107 void WMUnselectAllListItems(WMList
*lPtr
);
1109 void WMSetListUserDrawProc(WMList
*lPtr
, WMListDrawProc
*proc
);
1111 void WMSetListUserDrawItemHeight(WMList
*lPtr
, unsigned short height
);
1113 int WMGetListItemHeight(WMList
*lPtr
);
1115 /* don't free the returned data */
1116 WMArray
* WMGetListSelectedItems(WMList
*lPtr
);
1119 * For the following 2 functions, in case WMList allows multiple selection,
1120 * the first item in the list of selected items, respective its row number,
1124 /* don't free the returned data */
1125 WMListItem
* WMGetListSelectedItem(WMList
*lPtr
);
1127 int WMGetListSelectedItemRow(WMList
*lPtr
);
1129 void WMSetListAction(WMList
*lPtr
, WMAction
*action
, void *clientData
);
1131 void WMSetListDoubleAction(WMList
*lPtr
, WMAction
*action
, void *clientData
);
1133 void WMClearList(WMList
*lPtr
);
1135 int WMGetListNumberOfRows(WMList
*lPtr
);
1137 void WMSetListPosition(WMList
*lPtr
, int row
);
1139 void WMSetListBottomPosition(WMList
*lPtr
, int row
);
1141 int WMGetListPosition(WMList
*lPtr
);
1143 Bool
WMListAllowsMultipleSelection(WMList
*lPtr
);
1145 Bool
WMListAllowsEmptySelection(WMList
*lPtr
);
1148 extern char *WMListDidScrollNotification
;
1149 extern char *WMListSelectionDidChangeNotification
;
1151 /* ....................................................................... */
1153 WMBrowser
*WMCreateBrowser(WMWidget
*parent
);
1155 void WMSetBrowserAllowMultipleSelection(WMBrowser
*bPtr
, Bool flag
);
1157 void WMSetBrowserAllowEmptySelection(WMBrowser
*bPtr
, Bool flag
);
1159 void WMSetBrowserPathSeparator(WMBrowser
*bPtr
, char *separator
);
1161 void WMSetBrowserTitled(WMBrowser
*bPtr
, Bool flag
);
1163 void WMLoadBrowserColumnZero(WMBrowser
*bPtr
);
1165 int WMAddBrowserColumn(WMBrowser
*bPtr
);
1167 void WMRemoveBrowserItem(WMBrowser
*bPtr
, int column
, int row
);
1169 void WMSetBrowserMaxVisibleColumns(WMBrowser
*bPtr
, int columns
);
1171 void WMSetBrowserColumnTitle(WMBrowser
*bPtr
, int column
, char *title
);
1173 WMListItem
*WMInsertBrowserItem(WMBrowser
*bPtr
, int column
, int row
, char *text
, Bool isBranch
);
1175 void WMSortBrowserColumn(WMBrowser
*bPtr
, int column
);
1177 void WMSortBrowserColumnWithComparer(WMBrowser
*bPtr
, int column
,
1178 WMCompareDataProc
*func
);
1180 /* Don't free the returned string. */
1181 char* WMSetBrowserPath(WMBrowser
*bPtr
, char *path
);
1183 /* free the returned string */
1184 char *WMGetBrowserPath(WMBrowser
*bPtr
);
1185 /* free the returned string */
1186 char *WMGetBrowserPathToColumn(WMBrowser
*bPtr
, int column
);
1188 void WMSetBrowserAction(WMBrowser
*bPtr
, WMAction
*action
, void *clientData
);
1190 void WMSetBrowserDoubleAction(WMBrowser
*bPtr
, WMAction
*action
,
1193 WMListItem
*WMGetBrowserSelectedItemInColumn(WMBrowser
*bPtr
, int column
);
1195 int WMGetBrowserFirstVisibleColumn(WMBrowser
*bPtr
);
1197 int WMGetBrowserSelectedColumn(WMBrowser
*bPtr
);
1199 int WMGetBrowserSelectedRowInColumn(WMBrowser
*bPtr
, int column
);
1201 int WMGetBrowserNumberOfColumns(WMBrowser
*bPtr
);
1203 int WMGetBrowserMaxVisibleColumns(WMBrowser
*bPtr
);
1205 WMList
*WMGetBrowserListInColumn(WMBrowser
*bPtr
, int column
);
1207 void WMSetBrowserDelegate(WMBrowser
*bPtr
, WMBrowserDelegate
*delegate
);
1209 Bool
WMBrowserAllowsMultipleSelection(WMBrowser
*bPtr
);
1211 Bool
WMBrowserAllowsEmptySelection(WMBrowser
*bPtr
);
1214 /* ....................................................................... */
1217 Bool
WMMenuItemIsSeparator(WMMenuItem
*item
);
1219 WMMenuItem
*WMCreateMenuItem(void);
1221 void WMDestroyMenuItem(WMMenuItem
*item
);
1223 Bool
WMGetMenuItemEnabled(WMMenuItem
*item
);
1225 void WMSetMenuItemEnabled(WMMenuItem
*item
, Bool flag
);
1227 char *WMGetMenuItemShortcut(WMMenuItem
*item
);
1229 unsigned WMGetMenuItemShortcutModifierMask(WMMenuItem
*item
);
1231 void WMSetMenuItemShortcut(WMMenuItem
*item
, char *shortcut
);
1233 void WMSetMenuItemShortcutModifierMask(WMMenuItem
*item
, unsigned mask
);
1235 void *WMGetMenuItemRepresentedObject(WMMenuItem
*item
);
1237 void WMSetMenuItemRepresentedObject(WMMenuItem
*item
, void *object
);
1239 void WMSetMenuItemAction(WMMenuItem
*item
, WMAction
*action
, void *data
);
1241 WMAction
*WMGetMenuItemAction(WMMenuItem
*item
);
1243 void *WMGetMenuItemData(WMMenuItem
*item
);
1245 void WMSetMenuItemTitle(WMMenuItem
*item
, char *title
);
1247 char *WMGetMenuItemTitle(WMMenuItem
*item
);
1249 void WMSetMenuItemState(WMMenuItem
*item
, int state
);
1251 int WMGetMenuItemState(WMMenuItem
*item
);
1253 void WMSetMenuItemPixmap(WMMenuItem
*item
, WMPixmap
*pixmap
);
1255 WMPixmap
*WMGetMenuItemPixmap(WMMenuItem
*item
);
1257 void WMSetMenuItemOnStatePixmap(WMMenuItem
*item
, WMPixmap
*pixmap
);
1259 WMPixmap
*WMGetMenuItemOnStatePixmap(WMMenuItem
*item
);
1261 void WMSetMenuItemOffStatePixmap(WMMenuItem
*item
, WMPixmap
*pixmap
);
1263 WMPixmap
*WMGetMenuItemOffStatePixmap(WMMenuItem
*item
);
1265 void WMSetMenuItemMixedStatePixmap(WMMenuItem
*item
, WMPixmap
*pixmap
);
1267 WMPixmap
*WMGetMenuItemMixedStatePixmap(WMMenuItem
*item
);
1269 /*void WMSetMenuItemSubmenu(WMMenuItem *item, WMMenu *submenu);
1272 WMMenu *WMGetMenuItemSubmenu(WMMenuItem *item);
1274 Bool WMGetMenuItemHasSubmenu(WMMenuItem *item);
1277 /* ....................................................................... */
1279 WMPopUpButton
*WMCreatePopUpButton(WMWidget
*parent
);
1281 void WMSetPopUpButtonAction(WMPopUpButton
*sPtr
, WMAction
*action
,
1284 void WMSetPopUpButtonPullsDown(WMPopUpButton
*bPtr
, Bool flag
);
1286 WMMenuItem
*WMAddPopUpButtonItem(WMPopUpButton
*bPtr
, char *title
);
1288 WMMenuItem
*WMInsertPopUpButtonItem(WMPopUpButton
*bPtr
, int index
,
1291 void WMRemovePopUpButtonItem(WMPopUpButton
*bPtr
, int index
);
1293 void WMSetPopUpButtonItemEnabled(WMPopUpButton
*bPtr
, int index
, Bool flag
);
1295 Bool
WMGetPopUpButtonItemEnabled(WMPopUpButton
*bPtr
, int index
);
1297 void WMSetPopUpButtonSelectedItem(WMPopUpButton
*bPtr
, int index
);
1299 int WMGetPopUpButtonSelectedItem(WMPopUpButton
*bPtr
);
1301 void WMSetPopUpButtonText(WMPopUpButton
*bPtr
, char *text
);
1303 /* don't free the returned data */
1304 char *WMGetPopUpButtonItem(WMPopUpButton
*bPtr
, int index
);
1306 WMMenuItem
*WMGetPopUpButtonMenuItem(WMPopUpButton
*bPtr
, int index
);
1309 int WMGetPopUpButtonNumberOfItems(WMPopUpButton
*bPtr
);
1311 void WMSetPopUpButtonEnabled(WMPopUpButton
*bPtr
, Bool flag
);
1313 Bool
WMGetPopUpButtonEnabled(WMPopUpButton
*bPtr
);
1315 /* ....................................................................... */
1317 WMProgressIndicator
*WMCreateProgressIndicator(WMWidget
*parent
);
1319 void WMSetProgressIndicatorMinValue(WMProgressIndicator
*progressindicator
, int value
);
1321 void WMSetProgressIndicatorMaxValue(WMProgressIndicator
*progressindicator
, int value
);
1323 void WMSetProgressIndicatorValue(WMProgressIndicator
*progressindicator
, int value
);
1325 int WMGetProgressIndicatorMinValue(WMProgressIndicator
*progressindicator
);
1327 int WMGetProgressIndicatorMaxValue(WMProgressIndicator
*progressindicator
);
1329 int WMGetProgressIndicatorValue(WMProgressIndicator
*progressindicator
);
1332 /* ....................................................................... */
1334 WMColorPanel
*WMGetColorPanel(WMScreen
*scrPtr
);
1336 void WMFreeColorPanel(WMColorPanel
*panel
);
1338 void WMShowColorPanel(WMColorPanel
*panel
);
1340 void WMCloseColorPanel(WMColorPanel
*panel
);
1342 void WMSetColorPanelColor(WMColorPanel
*panel
, WMColor
*color
);
1344 WMColor
*WMGetColorPanelColor(WMColorPanel
*panel
);
1346 void WMSetColorPanelPickerMode(WMColorPanel
*panel
, WMColorPanelMode mode
);
1348 void WMSetColorPanelAction(WMColorPanel
*panel
, WMAction2
*action
, void *data
);
1350 extern char *WMColorPanelColorChangedNotification
;
1352 /* ....................................................................... */
1354 WMColorWell
*WMCreateColorWell(WMWidget
*parent
);
1356 void WMSetColorWellColor(WMColorWell
*cPtr
, WMColor
*color
);
1358 WMColor
*WMGetColorWellColor(WMColorWell
*cPtr
);
1360 void WSetColorWellBordered(WMColorWell
*cPtr
, Bool flag
);
1363 extern char *WMColorWellDidChangeNotification
;
1366 /* ...................................................................... */
1368 WMScrollView
*WMCreateScrollView(WMWidget
*parent
);
1370 void WMResizeScrollViewContent(WMScrollView
*sPtr
, unsigned int width
,
1371 unsigned int height
);
1373 void WMSetScrollViewHasHorizontalScroller(WMScrollView
*sPtr
, Bool flag
);
1375 void WMSetScrollViewHasVerticalScroller(WMScrollView
*sPtr
, Bool flag
);
1377 void WMSetScrollViewContentView(WMScrollView
*sPtr
, WMView
*view
);
1379 void WMSetScrollViewRelief(WMScrollView
*sPtr
, WMReliefType type
);
1381 void WMSetScrollViewContentView(WMScrollView
*sPtr
, WMView
*view
);
1383 WMScroller
*WMGetScrollViewHorizontalScroller(WMScrollView
*sPtr
);
1385 WMScroller
*WMGetScrollViewVerticalScroller(WMScrollView
*sPtr
);
1387 void WMSetScrollViewLineScroll(WMScrollView
*sPtr
, int amount
);
1389 void WMSetScrollViewPageScroll(WMScrollView
*sPtr
, int amount
);
1391 /* ....................................................................... */
1393 WMSlider
*WMCreateSlider(WMWidget
*parent
);
1395 int WMGetSliderMinValue(WMSlider
*slider
);
1397 int WMGetSliderMaxValue(WMSlider
*slider
);
1399 int WMGetSliderValue(WMSlider
*slider
);
1401 void WMSetSliderMinValue(WMSlider
*slider
, int value
);
1403 void WMSetSliderMaxValue(WMSlider
*slider
, int value
);
1405 void WMSetSliderValue(WMSlider
*slider
, int value
);
1407 void WMSetSliderContinuous(WMSlider
*slider
, Bool flag
);
1409 void WMSetSliderAction(WMSlider
*slider
, WMAction
*action
, void *data
);
1411 void WMSetSliderKnobThickness(WMSlider
*sPtr
, int thickness
);
1413 void WMSetSliderImage(WMSlider
*sPtr
, WMPixmap
*pixmap
);
1415 /* ....................................................................... */
1418 WMSplitView
*WMCreateSplitView(WMWidget
*parent
);
1419 Bool
WMGetSplitViewVertical(WMSplitView
*sPtr
);
1420 void WMSetSplitViewVertical(WMSplitView
*sPtr
, Bool flag
);
1422 int WMGetSplitViewSubviewsCount(WMSplitView
*sPtr
); /* ??? remove ??? */
1424 WMView
*WMGetSplitViewSubviewAt(WMSplitView
*sPtr
, int index
);
1426 /* remove the first subview == view */
1427 void WMRemoveSplitViewSubview(WMSplitView
*sPtr
, WMView
*view
);
1429 void WMRemoveSplitViewSubviewAt(WMSplitView
*sPtr
, int index
);
1432 void WMAddSplitViewSubview(WMSplitView
*sPtr
, WMView
*subview
);
1434 void WMAdjustSplitViewSubviews(WMSplitView
*sPtr
);
1436 void WMSetSplitViewConstrainProc(WMSplitView
*sPtr
,
1437 WMSplitViewConstrainProc
*proc
);
1440 void WMSetSplitViewResizeSubviewsProc(WMSplitView *sPtr,
1441 WMSplitViewResizeSubviewsProc *proc);
1444 int WMGetSplitViewDividerThickness(WMSplitView
*sPtr
);
1446 /* ...................................................................... */
1448 WMRuler
*WMCreateRuler (WMWidget
*parent
);
1450 WMRulerMargins
*WMGetRulerMargins(WMRuler
*rPtr
);
1452 void WMSetRulerMargins(WMRuler
*rPtr
, WMRulerMargins margins
);
1454 Bool
WMIsMarginEqualToMargin(WMRulerMargins
*aMargin
,
1455 WMRulerMargins
*anotherMargin
);
1457 int WMGetGrabbedRulerMargin(WMRuler
*rPtr
);
1459 int WMGetReleasedRulerMargin(WMRuler
*rPtr
);
1461 int WMGetRulerOffset(WMRuler
*rPtr
);
1463 void WMSetRulerOffset(WMRuler
*rPtr
, int pixels
);
1465 void WMSetRulerMoveAction(WMRuler
*rPtr
, WMAction
*action
, void *clientData
);
1467 void WMSetRulerReleaseAction(WMRuler
*rPtr
, WMAction
*action
, void *clientData
);
1469 /* ....................................................................... */
1471 WMText
*WMCreateText(WMWidget
*parent
);
1473 void WMRefreshText(WMText
*tPtr
, int vpos
, int hpos
);
1475 void WMFreezeText(WMText
*tPtr
);
1477 void WMThawText(WMText
*tPtr
);
1479 int WMScrollText(WMText
*tPtr
, int amount
);
1481 int WMPageText(WMText
*tPtr
, Bool direction
);
1483 void WMSetTextHasHorizontalScroller(WMText
*tPtr
, Bool shouldhave
);
1485 void WMSetTextHasVerticalScroller(WMText
*tPtr
, Bool shouldhave
);
1487 void WMSetTextHasRuler(WMText
*tPtr
, Bool shouldhave
);
1489 void WMShowTextRuler(WMText
*tPtr
, Bool show
);
1491 int WMGetTextRulerShown(WMText
*tPtr
);
1493 void WMSetTextEditable(WMText
*tPtr
, Bool editable
);
1495 int WMGetTextEditable(WMText
*tPtr
);
1497 void WMSetTextUsesMonoFont(WMText
*tPtr
, Bool mono
);
1499 int WMGetTextUsesMonoFont(WMText
*tPtr
);
1501 void WMSetTextIgnoresNewline(WMText
*tPtr
, Bool ignore
);
1503 int WMGetTextIgnoresNewline(WMText
*tPtr
);
1505 void WMSetTextDefaultFont(WMText
*tPtr
, WMFont
*font
);
1507 WMFont
* WMGetTextDefaultFont(WMText
*tPtr
);
1509 void WMSetTextRelief(WMText
*tPtr
, WMReliefType relief
);
1511 void WMSetTextForegroundColor(WMText
*tPtr
, WMColor
*color
);
1513 void WMSetTextBackgroundColor(WMText
*tPtr
, WMColor
*color
);
1515 void WMPrependTextStream(WMText
*tPtr
, char *text
);
1517 void WMAppendTextStream(WMText
*tPtr
, char *text
);
1520 char * WMGetTextStream(WMText
*tPtr
);
1523 char * WMGetTextSelected(WMText
*tPtr
);
1525 /* destroy the array */
1526 WMArray
* WMGetTextStreamObjects(WMText
*tPtr
);
1528 /* destroy the array */
1529 WMArray
* WMGetTextSelectedObjects(WMText
*tPtr
);
1531 void WMSetTextSelectionColor(WMText
*tPtr
, WMColor
*color
);
1533 void WMSetTextSelectionFont(WMText
*tPtr
, WMFont
*font
);
1535 void WMSetTextAlignment(WMText
*tPtr
, WMAlignment alignment
);
1537 Bool
WMFindInTextStream(WMText
*tPtr
, char *needle
, Bool direction
,
1538 Bool caseSensitive
);
1540 /* parser related stuff... use only if implementing a new parser */
1542 void WMSetTextParser(WMText
*tPtr
, WMAction
*parser
);
1544 void WMSetTextWriter(WMText
*tPtr
, WMAction
*writer
);
1546 void *WMCreateTextBlockWithObject(WMText
*tPtr
, WMWidget
*w
, char *description
,
1547 WMColor
*color
, unsigned short first
, unsigned short extraInfo
);
1549 void *WMCreateTextBlockWithPixmap(WMText
*tPtr
, WMPixmap
*p
, char *description
,
1550 WMColor
*color
, unsigned short first
, unsigned short extraInfo
);
1552 void *WMCreateTextBlockWithText(WMText
*tPtr
, char *text
, WMFont
*font
,
1553 WMColor
*color
, unsigned short first
, unsigned short length
);
1555 void WMSetTextBlockProperties(WMText
*tPtr
, void *vtb
, unsigned int first
,
1556 unsigned int kanji
, unsigned int underlined
, int script
,
1557 WMRulerMargins
*margins
);
1559 /* do NOT free the margins */
1560 void WMGetTextBlockProperties(WMText
*tPtr
, void *vtb
, unsigned int *first
,
1561 unsigned int *kanji
, unsigned int *underlined
, int *script
,
1562 WMRulerMargins
*margins
);
1564 int WMGetTextInsertType(WMText
*tPtr
);
1566 int WMGetTextBlocks(WMText
*tPtr
);
1568 void WMSetCurrentTextBlock(WMText
*tPtr
, int current
);
1570 int WMGetCurrentTextBlock(WMText
*tPtr
);
1572 void WMPrependTextBlock(WMText
*tPtr
, void *vtb
);
1574 void WMAppendTextBlock(WMText
*tPtr
, void *vtb
);
1576 void *WMRemoveTextBlock(WMText
*tPtr
);
1578 void WMDestroyTextBlock(WMText
*tPtr
, void *vtb
);
1580 /* ....................................................................... */
1583 WMTabView
*WMCreateTabView(WMWidget
*parent
);
1585 void WMSetTabViewFont(WMTabView
*tPtr
, WMFont
*font
);
1587 void WMAddItemInTabView(WMTabView
*tPtr
, WMTabViewItem
*item
);
1589 void WMInsertItemInTabView(WMTabView
*tPtr
, int index
, WMTabViewItem
*item
);
1591 void WMRemoveTabViewItem(WMTabView
*tPtr
, WMTabViewItem
*item
);
1593 WMTabViewItem
*WMTabViewItemAtPoint(WMTabView
*tPtr
, int x
, int y
);
1595 void WMSelectFirstTabViewItem(WMTabView
*tPtr
);
1597 void WMSelectLastTabViewItem(WMTabView
*tPtr
);
1599 void WMSelectNextTabViewItem(WMTabView
*tPtr
);
1601 void WMSelectPreviousTabViewItem(WMTabView
*tPtr
);
1603 WMTabViewItem
*WMGetSelectedTabViewItem(WMTabView
*tPtr
);
1605 void WMSelectTabViewItem(WMTabView
*tPtr
, WMTabViewItem
*item
);
1607 void WMSelectTabViewItemAtIndex(WMTabView
*tPtr
, int index
);
1609 void WMSetTabViewDelegate(WMTabView
*tPtr
, WMTabViewDelegate
*delegate
);
1612 WMTabViewItem
*WMCreateTabViewItemWithIdentifier(int identifier
);
1614 int WMGetTabViewItemIdentifier(WMTabViewItem
*item
);
1616 void WMSetTabViewItemLabel(WMTabViewItem
*item
, char *label
);
1618 char *WMGetTabViewItemLabel(WMTabViewItem
*item
);
1620 void WMSetTabViewItemView(WMTabViewItem
*item
, WMView
*view
);
1622 WMView
*WMGetTabViewItemView(WMTabViewItem
*item
);
1624 void WMDestroyTabViewItem(WMTabViewItem
*item
);
1626 /* ....................................................................... */
1628 int WMRunAlertPanel(WMScreen
*app
, WMWindow
*owner
, char *title
, char *msg
,
1629 char *defaultButton
, char *alternateButton
,
1632 /* you can free the returned string */
1633 char *WMRunInputPanel(WMScreen
*app
, WMWindow
*owner
, char *title
, char *msg
,
1634 char *defaultText
, char *okButton
, char *cancelButton
);
1636 WMAlertPanel
*WMCreateAlertPanel(WMScreen
*app
, WMWindow
*owner
, char *title
,
1637 char *msg
, char *defaultButton
,
1638 char *alternateButton
, char *otherButton
);
1640 WMInputPanel
*WMCreateInputPanel(WMScreen
*app
, WMWindow
*owner
, char *title
,
1641 char *msg
, char *defaultText
, char *okButton
,
1642 char *cancelButton
);
1644 void WMDestroyAlertPanel(WMAlertPanel
*panel
);
1646 void WMDestroyInputPanel(WMInputPanel
*panel
);
1648 /* ....................................................................... */
1650 /* only 1 instance per WMScreen */
1651 WMOpenPanel
*WMGetOpenPanel(WMScreen
*scrPtr
);
1653 WMSavePanel
*WMGetSavePanel(WMScreen
*scrPtr
);
1655 void WMSetFilePanelCanChooseDirectories(WMFilePanel
*panel
, Bool flag
);
1657 void WMSetFilePanelCanChooseFiles(WMFilePanel
*panel
, Bool flag
);
1659 void WMSetFilePanelAutoCompletion(WMFilePanel
*panel
, Bool flag
);
1661 void WMSetFilePanelDirectory(WMFilePanel
*panel
, char *path
);
1663 /* you can free the returned string */
1664 char *WMGetFilePanelFileName(WMFilePanel
*panel
);
1666 void WMFreeFilePanel(WMFilePanel
*panel
);
1668 int WMRunModalFilePanelForDirectory(WMFilePanel
*panel
, WMWindow
*owner
,
1669 char *path
, char *name
, char **fileTypes
);
1671 void WMSetFilePanelAccessoryView(WMFilePanel
*panel
, WMView
*view
);
1673 WMView
*WMGetFilePanelAccessoryView(WMFilePanel
*panel
);
1676 /* ...................................................................... */
1678 /* only 1 instance per WMScreen */
1679 WMFontPanel
*WMGetFontPanel(WMScreen
*scr
);
1681 void WMShowFontPanel(WMFontPanel
*panel
);
1683 void WMHideFontPanel(WMFontPanel
*panel
);
1685 void WMSetFontPanelFont(WMFontPanel
*panel
, WMFont
*font
);
1687 /* you can free the returned string */
1688 char *WMGetFontPanelFontName(WMFontPanel
*panel
);
1690 WMFont
*WMGetFontPanelFont(WMFontPanel
*panel
);
1694 #endif /* __cplusplus */