(svn r6669) -Add: vararg functions to set hidden/disabled/lowered state of multiple widgets in one call

This commit is contained in:
glx
2006-10-06 21:10:14 +00:00
parent 3d821bb328
commit 8f5c6ff3a1
2 changed files with 51 additions and 0 deletions

View File

@@ -62,6 +62,11 @@ enum ResizeFlags {
WIDG_LOWERED = 6, // widget is paint lowered, a pressed button in fact
} ResizeFlag;
/* used to indicate the end of widgets' list for vararg functions */
enum {
WIDGET_LIST_END = -1,
};
typedef struct Widget {
byte type; ///< Widget type, see @WindowWidgetTypes
byte display_flags; ///< Resize direction, alignment, etc. during resizing, see @ResizeFlags
@@ -783,6 +788,9 @@ void InvalidateWindowData(WindowClass cls, WindowNumber number);
void RaiseWindowButtons(Window *w);
void RelocateAllWindows(int neww, int newh);
int PositionMainToolbar(Window *w);
void CDECL SetWindowWidgetsDisabledState(Window *w, bool disab_stat, int widgets, ...);
void CDECL SetWindowWidgetsHiddenState(Window *w, bool hidden_stat, int widgets, ...);
void CDECL SetWindowWidgetsLoweredState(Window *w, bool lowered_stat, int widgets, ...);
/* misc_gui.c*/
void GuiShowTooltips(StringID string_id);