--- a/src/window.h Tue Feb 13 19:35:55 2007 +0000
+++ b/src/window.h Tue Feb 13 22:09:37 2007 +0000
@@ -350,7 +350,7 @@
}
};
-class Window : public CountedObject {
+struct Window : public CountedObject {
public:
static WindowList s_list;
@@ -437,6 +437,8 @@
void ScrollbarClickHandler(const Widget *wi, int x, int y);
public:
+ void SetWidgetDisabledState(byte widget_index, bool disab_stat);
+
//int32 AddRef()
//{
// const char *name = NULL;
@@ -777,10 +779,10 @@
* @param widget_index : index of this widget in the window
* @param disab_stat : status to use ie: disabled = true, enabled = false
*/
-static inline void SetWindowWidgetDisabledState(Window *w, byte widget_index, bool disab_stat)
+inline void Window::SetWidgetDisabledState(byte widget_index, bool disab_stat)
{
- assert(widget_index < w->widget_count);
- SB(w->widget[widget_index].display_flags, WIDG_DISABLED, 1, !!disab_stat);
+ assert(widget_index < widget_count);
+ SB(widget[widget_index].display_flags, WIDG_DISABLED, 1, !!disab_stat);
}
/**
@@ -790,7 +792,7 @@
*/
static inline void DisableWindowWidget(Window *w, byte widget_index)
{
- SetWindowWidgetDisabledState(w, widget_index, true);
+ w->SetWidgetDisabledState(widget_index, true);
}
/**
@@ -800,7 +802,7 @@
*/
static inline void EnableWindowWidget(Window *w, byte widget_index)
{
- SetWindowWidgetDisabledState(w, widget_index, false);
+ w->SetWidgetDisabledState(widget_index, false);
}
/**