1 #ifndef BGUI_BGUI_MACROS_H
2 #define BGUI_BGUI_MACROS_H
6 * $VER: libraries/bgui_macros.h 41.10 (19.1.97)
9 * (C) Copyright 1998 Manuel Lemos.
10 * (C) Copyright 1996-1997 Ian J. Einman.
11 * (C) Copyright 1993-1996 Jaba Development.
12 * (C) Copyright 1993-1996 Jan van den Baard.
13 * All Rights Reserved.
16 * Revision 42.6 2003/01/18 19:10:21 chodorowski
17 * Instead of using the _AROS or __AROS preprocessor symbols, use __AROS__.
19 * Revision 42.5 2000/08/08 20:57:28 chodorowski
20 * Minor fixes to build on Amiga.
22 * Revision 42.4 2000/08/08 14:03:07 chodorowski
23 * Removed all REGFUNC, REGPARAM and REG macros (not needed here).
25 * Revision 42.3 2000/08/07 21:51:05 stegerg
26 * fixed/activated REGFUNC/REGPARAM macros.
28 * Revision 42.2 2000/05/29 00:40:25 bergers
29 * Update to compile with AROS now. Should also still compile with SASC etc since I only made changes that test the define __AROS__. The compilation is still very noisy but it does the trick for the main directory. Maybe members of the BGUI team should also have a look at the compiler warnings because some could also cause problems on other systems... (Comparison always TRUE due to datatype (or something like that)). And please compile it on an Amiga to see whether it still works... Thanks.
31 * Revision 42.1 2000/05/15 19:28:20 stegerg
32 * REG() macro replacementes
34 * Revision 42.0 2000/05/09 22:23:17 mlemos
35 * Bumped to revision 42.0 before handing BGUI to AROS team
37 * Revision 41.11 2000/05/09 20:01:52 mlemos
38 * Merged with the branch Manuel_Lemos_fixes.
40 * Revision 41.10.2.3 1999/08/13 04:36:26 mlemos
41 * Changed the pre-processor define to denote that this file was included.
43 * Revision 41.10.2.2 1999/02/19 05:00:57 mlemos
44 * Added support for Storm C.
46 * Revision 41.10.2.1 1998/10/12 01:42:27 mlemos
47 * Made the definition of compiler specific macros conditionally dependeing on
48 * wether the macros are already defined.
50 * Revision 41.10 1998/02/25 21:13:54 mlemos
53 * Revision 1.1 1998/02/25 17:15:59 mlemos
59 #ifndef LIBRARIES_BGUI_H
60 #include <libraries/bgui.h>
61 #endif /* LIBRARIES_BGUI_H */
63 #ifndef CLIB_ALIB_PROTOS_H
65 #include <proto/alib.h>
67 #include <clib/alib_protos.h>
69 #endif /* CLIB_ALIB_PROTOS_H */
72 /*****************************************************************************
74 * General object creation macros.
76 #define LabelObject BGUI_NewObject(BGUI_LABEL_IMAGE
77 #define FrameObject BGUI_NewObject(BGUI_FRAME_IMAGE
78 #define VectorObject BGUI_NewObject(BGUI_VECTOR_IMAGE
80 #define HGroupObject BGUI_NewObject(BGUI_GROUP_GADGET
81 #define VGroupObject BGUI_NewObject(BGUI_GROUP_GADGET, GROUP_Style, GRSTYLE_VERTICAL
82 #define ButtonObject BGUI_NewObject(BGUI_BUTTON_GADGET
83 #define ToggleObject BGUI_NewObject(BGUI_BUTTON_GADGET, GA_ToggleSelect, TRUE
84 #define CycleObject BGUI_NewObject(BGUI_CYCLE_GADGET
85 #define CheckBoxObject BGUI_NewObject(BGUI_CHECKBOX_GADGET
86 #define InfoObject BGUI_NewObject(BGUI_INFO_GADGET
87 #define StringObject BGUI_NewObject(BGUI_STRING_GADGET
88 #define PropObject BGUI_NewObject(BGUI_PROP_GADGET
89 #define IndicatorObject BGUI_NewObject(BGUI_INDICATOR_GADGET
90 #define ProgressObject BGUI_NewObject(BGUI_PROGRESS_GADGET
91 #define SliderObject BGUI_NewObject(BGUI_SLIDER_GADGET
92 #define PageObject BGUI_NewObject(BGUI_PAGE_GADGET
93 #define MxObject BGUI_NewObject(BGUI_MX_GADGET
94 #define ListviewObject BGUI_NewObject(BGUI_LISTVIEW_GADGET
95 #define ExternalObject BGUI_NewObject(BGUI_EXTERNAL_GADGET, GA_Left, 0, GA_Top, 0, GA_Width, 0, GA_Height, 0
96 #define SeparatorObject BGUI_NewObject(BGUI_SEPARATOR_GADGET
97 #define AreaObject BGUI_NewObject(BGUI_AREA_GADGET
98 #define ViewObject BGUI_NewObject(BGUI_VIEW_GADGET
99 #define PaletteObject BGUI_NewObject(BGUI_PALETTE_GADGET
100 #define PopButtonObject BGUI_NewObject(BGUI_POPBUTTON_GADGET
102 #define WindowObject BGUI_NewObject(BGUI_WINDOW_OBJECT
103 #define FileReqObject BGUI_NewObject(BGUI_FILEREQ_OBJECT
104 #define FontReqObject BGUI_NewObject(BGUI_FONTREQ_OBJECT
105 #define ScreenReqObject BGUI_NewObject(BGUI_SCREENREQ_OBJECT
106 #define CommodityObject BGUI_NewObject(BGUI_COMMODITY_OBJECT
107 #define ARexxObject BGUI_NewObject(BGUI_AREXX_OBJECT
109 #define EndObject TAG_END)
112 #define SeperatorObject SeparatorObject
114 /*****************************************************************************
118 #define Label(l) LAB_Label, l
119 #define UScoreLabel(l,u) LAB_Label, l, LAB_Underscore, u
120 #define Style(s) LAB_Style, s
121 #define Place(p) LAB_Place, p
123 /*****************************************************************************
127 #define ButtonFrame FRM_Type, FRTYPE_BUTTON
128 #define RidgeFrame FRM_Type, FRTYPE_RIDGE
129 #define DropBoxFrame FRM_Type, FRTYPE_DROPBOX
130 #define NeXTFrame FRM_Type, FRTYPE_NEXT
131 #define RadioFrame FRM_Type, FRTYPE_RADIOBUTTON
132 #define XenFrame FRM_Type, FRTYPE_XEN_BUTTON
133 #define TabAboveFrame FRM_Type, FRTYPE_TAB_ABOVE
134 #define TabBelowFrame FRM_Type, FRTYPE_TAB_BELOW
135 #define BorderFrame FRM_Type, FRTYPE_BORDER
136 #define FuzzButtonFrame FRM_Type, FRTYPE_FUZZ_BUTTON
137 #define FuzzRidgeFrame FRM_Type, FRTYPE_FUZZ_RIDGE
138 #define NoFrame FRM_Type, FRTYPE_NONE
139 #define DefaultFrame FRM_Type, FRTYPE_DEFAULT
142 #define StringFrame RidgeFrame
143 #define MxFrame RadioFrame
145 #define FrameTitle(t) FRM_Title, t
147 /* Built-in back fills */
148 #define ShineRaster FRM_BackFill, SHINE_RASTER
149 #define ShadowRaster FRM_BackFill, SHADOW_RASTER
150 #define ShineShadowRaster FRM_BackFill, SHINE_SHADOW_RASTER
151 #define FillRaster FRM_BackFill, FILL_RASTER
152 #define ShineFillRaster FRM_BackFill, SHINE_FILL_RASTER
153 #define ShadowFillRaster FRM_BackFill, SHADOW_FILL_RASTER
154 #define ShineBlock FRM_BackFill, SHINE_BLOCK
155 #define ShadowBlock FRM_BackFill, SHADOW_BLOCK
157 /*****************************************************************************
161 #define GetPath VIT_BuiltIn, BUILTIN_GETPATH
162 #define GetFile VIT_BuiltIn, BUILTIN_GETFILE
163 #define CheckMark VIT_BuiltIn, BUILTIN_CHECKMARK
164 #define PopUp VIT_BuiltIn, BUILTIN_POPUP
165 #define ArrowUp VIT_BuiltIn, BUILTIN_ARROW_UP
166 #define ArrowDown VIT_BuiltIn, BUILTIN_ARROW_DOWN
167 #define ArrowLeft VIT_BuiltIn, BUILTIN_ARROW_LEFT
168 #define ArrowRight VIT_BuiltIn, BUILTIN_ARROW_RIGHT
170 /*****************************************************************************
172 * Group class macros.
174 #define StartMember GROUP_Member
175 #define EndMember TAG_END, 0
176 #define Spacing(p) GROUP_Spacing, p
177 #define Offset(p) GROUP_Offset, p
178 #define HOffset(p) GROUP_HorizOffset, p
179 #define VOffset(p) GROUP_VertOffset, p
180 #define LOffset(p) GROUP_LeftOffset, p
181 #define ROffset(p) GROUP_RightOffset, p
182 #define TOffset(p) GROUP_TopOffset, p
183 #define BOffset(p) GROUP_BottomOffset, p
184 #define VarSpace(w) GROUP_SpaceObject, w
185 #define EqualWidth GROUP_EqualWidth, TRUE
186 #define EqualHeight GROUP_EqualHeight, TRUE
187 #define Rows(n) GROUP_Rows, n
188 #define Columns(n) GROUP_Columns, n
190 #define NormalSpacing GROUP_Spacing, GRSPACE_NORMAL
191 #define NormalHOffset GROUP_HorizOffset, GRSPACE_NORMAL
192 #define NormalVOffset GROUP_VertOffset, GRSPACE_NORMAL
193 #define NarrowSpacing GROUP_Spacing, GRSPACE_NARROW
194 #define NarrowHOffset GROUP_HorizOffset, GRSPACE_NARROW
195 #define NarrowVOffset GROUP_VertOffset, GRSPACE_NARROW
196 #define WideSpacing GROUP_Spacing, GRSPACE_WIDE
197 #define WideHOffset GROUP_HorizOffset, GRSPACE_WIDE
198 #define WideVOffset GROUP_VertOffset, GRSPACE_WIDE
199 #define NormalOffset NormalHOffset, NormalVOffset
201 /*****************************************************************************
205 #define FixMinWidth LGO_FixMinWidth, TRUE
206 #define FixMinHeight LGO_FixMinHeight, TRUE
207 #define Weight(w) LGO_Weight, w
208 #define FixWidth(w) LGO_FixWidth, w
209 #define FixHeight(h) LGO_FixHeight, h
210 #define Align LGO_Align, TRUE
211 #define AlignTop LGO_VAlign, GRALIGN_TOP
212 #define AlignBottom LGO_VAlign, GRALIGN_BOTTOM
213 #define AlignCenterV LGO_VAlign, GRALIGN_CENTER
214 #define AlignLeft LGO_HAlign, GRALIGN_LEFT
215 #define AlignRight LGO_HAlign, GRALIGN_RIGHT
216 #define AlignCenterH LGO_HAlign, GRALIGN_CENTER
217 #define FixMinSize FixMinWidth, FixMinHeight
218 #define FixSize(w,h) FixWidth(w), FixHeight(h)
219 #define NoAlign LGO_NoAlign, TRUE
220 #define FixAspect(x,y) LGO_FixAspect, ((x) << 16) | (y)
222 /*****************************************************************************
226 #define PageMember PAGE_Member
228 /*****************************************************************************
230 * "Quick" button creation macros.
232 #define PrefButton(label,id)\
238 #define Button(label,id)\
246 #define PrefToggle(label,state,id)\
253 #define Toggle(label,state,id)\
261 #define XenButton(label,id)\
268 #define XenToggle(label,state,id)\
276 #define KeyButton Button
277 #define KeyToggle Toggle
278 #define XenKeyButton XenButton
279 #define XenKeyToggle XenToggle
281 /*****************************************************************************
283 * "Quick" cycle creation macros.
285 #define PrefCycle(label,labels,active,id)\
293 #define Cycle(label,labels,active,id)\
303 #define XenCycle(label,labels,active,id)\
313 #define PopCycle(label,labels,active,id)\
323 #define XenPopCycle(label,labels,active,id)\
333 #define KeyCycle Cycle
334 #define XenKeyCycle XenCycle
335 #define KeyPopCycle PopCycle
336 #define XenKeyPopCycle XenPopCycle
338 /*****************************************************************************
340 * "Quick" checkbox creation macros.
342 #define PrefCheckBoxNF(label,state,id)\
349 #define CheckBoxNF(label,state,id)\
357 #define XenCheckBoxNF(label,state,id)\
365 #define PrefCheckBox(label,state,id) PrefCheckBoxNF(label,state,id), FixMinSize
366 #define CheckBox(label,state,id) CheckBoxNF(label,state,id), FixMinSize
367 #define XenCheckBox(label,state,id) XenCheckBoxNF(label,state,id), FixMinSize
369 #define KeyCheckBoxNF CheckBoxNF
370 #define XenKeyCheckBoxNF XenCheckBoxNF
371 #define KeyCheckBox CheckBox
372 #define XenKeyCheckBox XenCheckBox
374 /*****************************************************************************
376 * "Quick" info object creation macros.
378 #define PrefInfoFixed(label,text,args,numlines)\
382 INFO_TextFormat, text,\
384 INFO_MinLines, numlines,\
385 INFO_FixTextWidth, TRUE,\
388 #define PrefInfo(label,text,args,numlines)\
392 INFO_TextFormat, text,\
394 INFO_MinLines, numlines,\
397 #define InfoFixed(label,text,args,numlines)\
401 FRM_Flags, FRF_RECESSED,\
402 INFO_TextFormat, text,\
404 INFO_MinLines, numlines,\
405 INFO_FixTextWidth, TRUE,\
408 #define InfoObj(label,text,args,numlines)\
412 FRM_Flags, FRF_RECESSED,\
413 INFO_TextFormat, text,\
415 INFO_MinLines, numlines,\
418 /*****************************************************************************
420 * "Quick" string/integer creation macros.
422 #define PrefString(label,contents,maxchars,id)\
425 STRINGA_TextVal, contents,\
426 STRINGA_MaxChars, maxchars,\
431 #define String(label,contents,maxchars,id)\
435 STRINGA_TextVal, contents,\
436 STRINGA_MaxChars, maxchars,\
440 #define TabString(label,contents,maxchars,id)\
444 STRINGA_TextVal, contents,\
445 STRINGA_MaxChars, maxchars,\
450 #define PrefInteger(label,contents,maxchars,id)\
453 STRINGA_LongVal, contents,\
454 STRINGA_MaxChars, maxchars,\
459 #define Integer(label,contents,maxchars,id)\
463 STRINGA_LongVal, contents,\
464 STRINGA_MaxChars, maxchars,\
468 #define TabInteger(label,contents,maxchars,id)\
472 STRINGA_LongVal, contents,\
473 STRINGA_MaxChars, maxchars,\
478 #define KeyString String
479 #define TabKeyString TabString
480 #define KeyInteger Integer
481 #define TabKeyInteger TabInteger
484 * STRINGA_Pens & STRINGA_ActivePens pen-pack macro.
486 #define PACKPENS(a,b) (((b<<8)&0xFF00)|((a)&0x00FF))
488 /*****************************************************************************
490 * "Quick" scroller creation macros.
492 #define HorizScroller(label,top,total,visible,id)\
497 PGA_Visible, visible,\
498 PGA_Freedom, FREEHORIZ,\
503 #define VertScroller(label,top,total,visible,id)\
508 PGA_Visible, visible,\
513 #define KeyHorizScroller HorizScroller
514 #define KeyVertScroller VertScroller
516 /*****************************************************************************
518 * "Quick" indicator creation macros.
520 #define Indicator(min,max,level,just)\
525 INDIC_Justification, just,\
528 #define IndicatorFormat(min,max,level,just,format)\
533 INDIC_Justification, just,\
534 INDIC_FormatString, format,\
537 /*****************************************************************************
539 * "Quick" progress creation macros.
541 #define HorizProgress(label,min,max,done)\
545 FRM_Flags, FRF_RECESSED,\
548 PROGRESS_Done, done,\
551 #define VertProgress(label,min,max,done)\
555 FRM_Flags, FRF_RECESSED,\
558 PROGRESS_Done, done,\
559 PROGRESS_Vertical, TRUE,\
562 #define HorizProgressFS(label,min,max,done,fstr)\
566 FRM_Flags, FRF_RECESSED,\
569 PROGRESS_Done, done,\
570 PROGRESS_FormatString, fstr,\
573 #define VertProgressFS(label,min,max,done,fstr)\
577 FRM_Flags, FRF_RECESSED,\
580 PROGRESS_Done, done,\
581 PROGRESS_Vertical, TRUE,\
582 PROGRESS_FormatString, fstr,\
585 /*****************************************************************************
587 * "Quick" slider creation macros.
589 #define HorizSlider(label,min,max,level,id)\
594 SLIDER_Level, level,\
598 #define VertSlider(label,min,max,level,id)\
603 SLIDER_Level, level,\
604 PGA_Freedom, FREEVERT,\
608 #define KeyHorizSlider HorizSlider
609 #define KeyVertSlider VertSlider
611 /*****************************************************************************
613 * "Quick" mx creation macros.
615 #define PrefMx(label,labels,active,id)\
617 GROUP_Style, GRSTYLE_VERTICAL,\
622 EndObject, FixMinSize
624 #define RightMx(label,labels,active,id)\
626 GROUP_Style, GRSTYLE_VERTICAL,\
630 MX_LabelPlace, PLACE_RIGHT,\
632 EndObject, FixMinSize
634 #define LeftMx(label,labels,active,id)\
636 GROUP_Style, GRSTYLE_VERTICAL,\
640 MX_LabelPlace, PLACE_LEFT,\
642 EndObject, FixMinSize
644 #define Tabs(label,labels,active,id)\
646 MX_TabsObject, TRUE,\
651 EndObject, FixMinHeight
654 #define TabsEqual(label,labels,active,id)\
656 GROUP_EqualWidth, TRUE,\
657 MX_TabsObject, TRUE,\
662 EndObject, FixMinHeight
664 #define USDTabs(label,labels,active,id)\
666 MX_TabsObject, TRUE,\
670 MX_TabsUpsideDown, TRUE,\
672 EndObject, FixMinHeight
674 #define USDTabsEqual(label,labels,active,id)\
676 GROUP_EqualWidth, TRUE,\
677 MX_TabsObject, TRUE,\
681 MX_TabsUpsideDown, TRUE,\
683 EndObject, FixMinHeight
685 #define RightMxKey RightMx
686 #define LeftMxKey LeftMx
688 #define TabsEqualKey TabsEqual
689 #define USDTabsKey USDTabs
690 #define USDTabsEqualKey USDTabsEqual
692 /*****************************************************************************
694 * "Quick" listview creation macros.
696 #define StrListview(label,strings,id)\
700 LISTV_EntryArray, strings,\
703 #define StrListviewSorted(label,strings,id)\
707 LISTV_EntryArray, strings,\
708 LISTV_SortEntryArray, TRUE,\
711 #define ReadStrListview(label,strings)\
714 LISTV_EntryArray, strings,\
715 LISTV_ReadOnly, TRUE,\
718 #define ReadStrListviewSorted(label,strings)\
721 LISTV_EntryArray, strings,\
722 LISTV_SortEntryArray, TRUE,\
723 LISTV_ReadOnly, TRUE,\
726 #define MultiStrListview(label,strings,id)\
730 LISTV_EntryArray, strings,\
731 LISTV_MultiSelect, TRUE,\
734 #define MultiStrListviewSorted(label,strings,id)\
738 LISTV_EntryArray, strings,\
739 LISTV_SortEntryArray, TRUE,\
740 LISTV_MultiSelect, TRUE,\
743 /*****************************************************************************
745 * "Quick" separator bar creation macros.
747 #define VertSeparator\
749 EndObject, FixMinWidth
751 #define VertThinSeparator\
754 EndObject, FixMinWidth
756 #define HorizSeparator\
759 EndObject, FixMinHeight
761 #define TitleSeparator(t)\
765 EndObject, FixMinHeight
767 #define HTitleSeparator(t)\
771 SEP_Highlight, TRUE,\
772 EndObject, FixMinHeight
774 #define CTitleSeparator(t)\
778 SEP_CenterTitle, TRUE,\
779 EndObject, FixMinHeight
781 #define CHTitleSeparator(t)\
785 SEP_Highlight, TRUE,\
786 SEP_CenterTitle, TRUE,\
787 EndObject, FixMinHeight
789 #define TitleSeparatorLeft(t)\
793 SEP_TitleLeft, TRUE,\
794 EndObject, FixMinHeight
796 #define HTitleSeparatorLeft(t)\
800 SEP_Highlight, TRUE,\
801 SEP_TitleLeft, TRUE,\
802 EndObject, FixMinHeight
804 #define CTitleSeparatorLeft(t)\
808 SEP_CenterTitle, TRUE,\
809 SEP_TitleLeft, TRUE,\
810 EndObject, FixMinHeight
812 #define CHTitleSeparatorLeft(t)\
816 SEP_Highlight, TRUE,\
817 SEP_CenterTitle, TRUE,\
818 SEP_TitleLeft, TRUE,\
819 EndObject, FixMinHeight
822 #define VertSeperator VertSeparator
823 #define VertThinSeperator VertThinSeparator
824 #define HorizSeperator HorizSeparator
825 #define TitleSeperator TitleSeparator
826 #define HTitleSeperator HTitleSeparator
827 #define CTitleSeperator CTitleSeparator
828 #define CHTitleSeperator CHTitleSeparator
830 /*****************************************************************************
832 * Some simple menu macros.
835 { NM_TITLE, t, NULL, 0, 0, NULL }
837 { NM_ITEM, t, s, 0, 0, (APTR)i }
839 { NM_ITEM, NM_BARLABEL, NULL, 0, 0, NULL }
840 #define SubItem(t,s,i)\
841 { NM_SUB, t, s, 0, 0, (APTR)i }
843 { NM_SUB, NM_BARLABEL, NULL, 0, 0, NULL }
845 { NM_END, NULL, NULL, 0, 0, NULL }
847 /*****************************************************************************
849 * Base class method macros.
851 #define AddMap(object,target,map)\
852 DoMethod( object, BASE_ADDMAP, target, map )
854 #define AddCondit(object,target,ttag,tdat,ftag,fdat,stag,sdat)\
855 DoMethod( object, BASE_ADDCONDITIONAL, target,\
860 #define AddHook(object,hook)\
861 DoMethod( object, BASE_ADDHOOK, hook )
863 #define RemMap(object,target)\
864 DoMethod( object, BASE_REMMAP, target )
866 #define RemCondit(object,target)\
867 DoMethod( object, BASE_REMCONDITIONAL, target )
869 #define RemHook( object,hook)\
870 DoMethod( object, BASE_REMHOOK, hook )
872 /*****************************************************************************
874 * Listview class method macros.
876 #define AddEntry(window,object,entry,how)\
877 BGUI_DoGadgetMethod( object, window, NULL, LVM_ADDSINGLE,\
878 NULL, entry, how, 0L )
880 #define AddEntryVisible(window,object,entry,how)\
881 BGUI_DoGadgetMethod( object, window, NULL, LVM_ADDSINGLE,\
882 NULL, entry, how, LVASF_MAKEVISIBLE )
884 #define AddEntrySelect(window,object,entry,how)\
885 BGUI_DoGadgetMethod( object, window, NULL, LVM_ADDSINGLE,\
886 NULL, entry, how, LVASF_SELECT )
888 #define InsertEntry(window,object,entry,where)\
889 BGUI_DoGadgetMethod( object, window, NULL, LVM_INSERTSINGLE,\
890 NULL, where, entry, 0L )
892 #define InsertEntryVisible(window,object,entry,where)\
893 BGUI_DoGadgetMethod( object, window, NULL, LVM_INSERTSINGLE,\
894 NULL, where, entry, LVASF_MAKEVISIBLE )
896 #define InsertEntrySelect(window,object,entry,where)\
897 BGUI_DoGadgetMethod( object, window, NULL, LVM_INSERTSINGLE,\
898 NULL, where, entry, LVASF_SELECT )
900 #define ClearList(window,object)\
901 BGUI_DoGadgetMethod( object, window, NULL, LVM_CLEAR, NULL )
903 #define FirstEntry(object)\
904 DoMethod( object, LVM_FIRSTENTRY, NULL, 0L )
906 #define FirstSelected(object)\
907 DoMethod( object, LVM_FIRSTENTRY, NULL, LVGEF_SELECTED )
909 #define LastEntry(object)\
910 DoMethod( object, LVM_LASTENTRY, NULL, 0L )
912 #define LastSelected(object)\
913 DoMethod( object, LVM_LASTENTRY, NULL, LVGEF_SELECTED )
915 #define NextEntry(object,last)\
916 DoMethod( object, LVM_NEXTENTRY, last, 0L )
918 #define NextSelected(object,last)\
919 DoMethod( object, LVM_NEXTENTRY, last, LVGEF_SELECTED )
921 #define PrevEntry(object,last)\
922 DoMethod( object, LVM_PREVENTRY, last, 0L )
924 #define PrevSelected(object,last)\
925 DoMethod( object, LVM_PREVENTRY, last, LVGEF_SELECTED )
927 #define RemoveEntry(object,entry)\
928 DoMethod( object, LVM_REMENTRY, NULL, entry )
930 #define RemoveEntryVisible(window,object,entry)\
931 BGUI_DoGadgetMethod( object, window, NULL, LVM_REMENTRY, NULL, entry )
933 #define RefreshList(window,object)\
934 BGUI_DoGadgetMethod( object, window, NULL, LVM_REFRESH, NULL )
936 #define RedrawList(window,object)\
937 BGUI_DoGadgetMethod( object, window, NULL, LVM_REDRAW, NULL )
939 #define SortList(window,object)\
940 BGUI_DoGadgetMethod( object, window, NULL, LVM_SORT, NULL )
942 #define LockList(object)\
943 DoMethod( object, LVM_LOCKLIST, NULL )
945 #define UnlockList(window,object)\
946 BGUI_DoGadgetMethod( object, window, NULL, LVM_UNLOCKLIST, NULL )
948 #define MoveEntry(window,object,entry,dir)\
949 BGUI_DoGadgetMethod( object, window, NULL, LVM_MOVE, NULL,\
952 #define MoveSelectedEntry(window,object,dir)\
953 BGUI_DoGadgetMethod( object, window, NULL, LVM_MOVE, NULL,\
956 #define ReplaceEntry(window,object,old,new)\
957 BGUI_DoGadgetMethod( object, window, NULL, LVM_REPLACE, NULL,\
960 #define RemoveSelected(window,object)\
961 BGUI_DoGadgetMethod( object, window, NULL, LVM_REMSELECTED, NULL )
963 /*****************************************************************************
965 * Window class method macros.
967 #define GadgetKey(wobj,gobj,key)\
968 DoMethod( wobj, WM_GADGETKEY, NULL, gobj, key )
970 #define WindowOpen(wobj)\
971 ({struct Window *win = (struct Window *)DoMethod( wobj, WM_OPEN );win;})
973 #define WindowClose(wobj)\
974 DoMethod( wobj, WM_CLOSE )
976 #define WindowBusy(wobj)\
977 DoMethod( wobj, WM_SLEEP )
979 #define WindowReady(wobj)\
980 DoMethod( wobj, WM_WAKEUP )
982 #define HandleEvent(wobj)\
983 DoMethod( wobj, WM_HANDLEIDCMP )
985 #define DisableMenu(wobj,id,set)\
986 DoMethod( wobj, WM_DISABLEMENU, id, set )
988 #define CheckItem(wobj,id,set)\
989 DoMethod( wobj, WM_CHECKITEM, id, set )
991 #define MenuDisabled(wobj,id)\
992 DoMethod( wobj, WM_MENUDISABLED, id )
994 #define ItemChecked(wobj,id)\
995 DoMethod( wobj, WM_ITEMCHECKED, id )
997 #define GetAppMsg(wobj)\
998 ( struct AppMessage * )DoMethod( wobj, WM_GETAPPMSG )
1000 #define AddUpdate(wobj,id,target,map)\
1001 DoMethod( wobj, WM_ADDUPDATE, id, target, map )
1003 #define GetSignalWindow(wobj)\
1004 ( struct Window * )DoMethod( wobj, WM_GET_SIGNAL_WINDOW )
1006 /*****************************************************************************
1008 * Commodity class method macros.
1010 #define AddHotkey(broker,desc,id,flags)\
1011 DoMethod( broker, CM_ADDHOTKEY, desc, id, flags )
1013 #define RemHotkey(broker,id)\
1014 DoMethod( broker, CM_REMHOTKEY, id )
1016 #define DisableHotkey(broker,id)\
1017 DoMethod( broker, CM_DISABLEHOTKEY, id )
1019 #define EnableHotKey(broker,id)\
1020 DoMethod( broker, CM_ENABLEHOTKEY, id )
1022 #define EnableBroker(broker)\
1023 DoMethod( broker, CM_ENABLEBROKER )
1025 #define DisableBroker(broker)\
1026 DoMethod( broker, CM_DISABLEBROKER )
1028 #define MsgInfo(broker,type,id,data)\
1029 DoMethod( broker, CM_MSGINFO,\
1034 /*****************************************************************************
1036 * AslReq class method macros.
1038 #define DoRequest(object)\
1039 DoMethod( object, ASLM_DOREQUEST )
1041 #endif /* BGUI_BGUI_MACROS_H */