src/window.h
branchcpp_gui
changeset 6251 cd413fa2e252
parent 6250 5135b200b376
child 6254 abc6ad7c035c
--- a/src/window.h	Tue Feb 13 23:07:54 2007 +0000
+++ b/src/window.h	Tue Feb 13 23:49:01 2007 +0000
@@ -446,11 +446,18 @@
 	/*inline*/ void DisableWidget(byte widget_index);
 	/*inline*/ void EnableWidget(byte widget_index);
 	/*inline*/ bool IsWidgetDisabled(byte widget_index) const;
+
 	/*inline*/ void SetWidgetHiddenState(byte widget_index, bool hidden_stat);
 	/*inline*/ void HideWidget(byte widget_index);
 	/*inline*/ void ShowWidget(byte widget_index);
 	/*inline*/ bool IsWidgetHidden(byte widget_index) const;
 
+	/*inline*/ void SetWidgetLoweredState(byte widget_index, bool lowered_stat);
+	/*inline*/ void ToggleWidgetLoweredState(byte widget_index);
+	/*inline*/ void LowerWidget(byte widget_index);
+	/*inline*/ void RaiseWidget(byte widget_index);
+	/*inline*/ bool IsWidgetLowered(byte widget_index) const;
+
 	//int32 AddRef()
 	//{
 	//	const char *name = NULL;
@@ -881,10 +888,10 @@
  * @param widget_index : index of this widget in the window
  * @param hidden_stat : status to use ie: lowered = true, raised = false
  */
-static inline void SetWindowWidgetLoweredState(Window *w, byte widget_index, bool lowered_stat)
+inline void Window::SetWidgetLoweredState(byte widget_index, bool lowered_stat)
 {
-	assert(widget_index < w->widget_count);
-	SB(w->widget[widget_index].display_flags, WIDG_LOWERED, 1, !!lowered_stat);
+	assert(widget_index < widget_count);
+	SB(widget[widget_index].display_flags, WIDG_LOWERED, 1, !!lowered_stat);
 }
 
 /**
@@ -892,10 +899,10 @@
  * @param w : Window on which the widget is located
  * @param widget_index : index of this widget in the window
  */
-static inline void ToggleWidgetLoweredState(Window *w, byte widget_index)
+inline void Window::ToggleWidgetLoweredState(byte widget_index)
 {
-	assert(widget_index < w->widget_count);
-	TOGGLEBIT(w->widget[widget_index].display_flags, WIDG_LOWERED);
+	assert(widget_index < widget_count);
+	TOGGLEBIT(widget[widget_index].display_flags, WIDG_LOWERED);
 }
 
 /**
@@ -903,9 +910,9 @@
  * @param w : Window on which the widget is located
  * @param widget_index : index of this widget in the window
  */
-static inline void LowerWindowWidget(Window *w, byte widget_index)
+inline void Window::LowerWidget(byte widget_index)
 {
-	SetWindowWidgetLoweredState(w, widget_index, true);
+	SetWidgetLoweredState(widget_index, true);
 }
 
 /**
@@ -913,9 +920,9 @@
  * @param w : Window on which the widget is located
  * @param widget_index : index of this widget in the window
  */
-static inline void RaiseWindowWidget(Window *w, byte widget_index)
+inline void Window::RaiseWidget(byte widget_index)
 {
-	SetWindowWidgetLoweredState(w, widget_index, false);
+	SetWidgetLoweredState(widget_index, false);
 }
 
 /**
@@ -924,10 +931,10 @@
  * @param widget_index : index of this widget in the window
  * @return status of the widget ie: lowered = true, raised= false
  */
-static inline bool IsWindowWidgetLowered(const Window *w, byte widget_index)
+inline bool Window::IsWidgetLowered(byte widget_index) const
 {
-	assert(widget_index < w->widget_count);
-	return HASBIT(w->widget[widget_index].display_flags, WIDG_LOWERED);
+	assert(widget_index < widget_count);
+	return HASBIT(widget[widget_index].display_flags, WIDG_LOWERED);
 }
 
 void InitWindowSystem(void);