280 byte custom[WINDOW_CUSTOM_SIZE]; |
280 byte custom[WINDOW_CUSTOM_SIZE]; |
281 |
281 |
282 void SetWidgetDisabledState(byte widget_index, bool disab_stat); |
282 void SetWidgetDisabledState(byte widget_index, bool disab_stat); |
283 void DisableWidget(byte widget_index); |
283 void DisableWidget(byte widget_index); |
284 void EnableWidget(byte widget_index); |
284 void EnableWidget(byte widget_index); |
285 bool IsWidgetDisabled(byte widget_index); |
285 bool IsWidgetDisabled(byte widget_index) const; |
286 void SetWidgetHiddenState(byte widget_index, bool hidden_stat); |
286 void SetWidgetHiddenState(byte widget_index, bool hidden_stat); |
287 void HideWidget(byte widget_index); |
287 void HideWidget(byte widget_index); |
288 void ShowWidget(byte widget_index); |
288 void ShowWidget(byte widget_index); |
289 bool IsWidgetHidden(byte widget_index); |
289 bool IsWidgetHidden(byte widget_index) const; |
290 void SetWidgetLoweredState(byte widget_index, bool lowered_stat); |
290 void SetWidgetLoweredState(byte widget_index, bool lowered_stat); |
291 void ToggleLoweredState(byte widget_index); |
291 void ToggleLoweredState(byte widget_index); |
292 void LowerWidget(byte widget_index); |
292 void LowerWidget(byte widget_index); |
293 void RaiseWidget(byte widget_index); |
293 void RaiseWidget(byte widget_index); |
294 bool IsWidgetLowered(byte widget_index); |
294 bool IsWidgetLowered(byte widget_index) const; |
295 |
295 |
296 void RaiseButtons(); |
296 void RaiseButtons(); |
297 void CDECL SetWidgetsDisabledState(bool disab_stat, int widgets, ...); |
297 void CDECL SetWidgetsDisabledState(bool disab_stat, int widgets, ...); |
298 void CDECL SetWidgetsHiddenState(bool hidden_stat, int widgets, ...); |
298 void CDECL SetWidgetsHiddenState(bool hidden_stat, int widgets, ...); |
299 void CDECL SetWidgetsLoweredState(bool lowered_stat, int widgets, ...); |
299 void CDECL SetWidgetsLoweredState(bool lowered_stat, int widgets, ...); |
863 |
863 |
864 /** |
864 /** |
865 * Sets a widget to Enabled. |
865 * Sets a widget to Enabled. |
866 * @param widget_index : index of this widget in the window |
866 * @param widget_index : index of this widget in the window |
867 */ |
867 */ |
868 inline void Window::EnableWidget(byte widget_index) { SetWidgetDisabledState(widget_index, false); } |
868 inline void Window::EnableWidget(byte widget_index) |
|
869 { |
|
870 SetWidgetDisabledState(widget_index, false); |
|
871 } |
869 |
872 |
870 /** |
873 /** |
871 * Gets the enabled/disabled status of a widget. |
874 * Gets the enabled/disabled status of a widget. |
872 * @param widget_index : index of this widget in the window |
875 * @param widget_index : index of this widget in the window |
873 * @return status of the widget ie: disabled = true, enabled = false |
876 * @return status of the widget ie: disabled = true, enabled = false |
874 */ |
877 */ |
875 inline bool Window::IsWidgetDisabled(byte widget_index) |
878 inline bool Window::IsWidgetDisabled(byte widget_index) const |
876 { |
879 { |
877 assert(widget_index < this->widget_count); |
880 assert(widget_index < this->widget_count); |
878 return HasBit(this->widget[widget_index].display_flags, WIDG_DISABLED); |
881 return HasBit(this->widget[widget_index].display_flags, WIDG_DISABLED); |
879 } |
882 } |
880 |
883 |
912 /** |
915 /** |
913 * Gets the visibility of a widget. |
916 * Gets the visibility of a widget. |
914 * @param widget_index : index of this widget in the window |
917 * @param widget_index : index of this widget in the window |
915 * @return status of the widget ie: hidden = true, visible = false |
918 * @return status of the widget ie: hidden = true, visible = false |
916 */ |
919 */ |
917 inline bool Window::IsWidgetHidden(byte widget_index) |
920 inline bool Window::IsWidgetHidden(byte widget_index) const |
918 { |
921 { |
919 assert(widget_index < this->widget_count); |
922 assert(widget_index < this->widget_count); |
920 return HasBit(this->widget[widget_index].display_flags, WIDG_HIDDEN); |
923 return HasBit(this->widget[widget_index].display_flags, WIDG_HIDDEN); |
921 } |
924 } |
922 |
925 |
962 /** |
965 /** |
963 * Gets the lowered state of a widget. |
966 * Gets the lowered state of a widget. |
964 * @param widget_index : index of this widget in the window |
967 * @param widget_index : index of this widget in the window |
965 * @return status of the widget ie: lowered = true, raised= false |
968 * @return status of the widget ie: lowered = true, raised= false |
966 */ |
969 */ |
967 inline bool Window::IsWidgetLowered(byte widget_index) |
970 inline bool Window::IsWidgetLowered(byte widget_index) const |
968 { |
971 { |
969 assert(widget_index < this->widget_count); |
972 assert(widget_index < this->widget_count); |
970 return HasBit(this->widget[widget_index].display_flags, WIDG_LOWERED); |
973 return HasBit(this->widget[widget_index].display_flags, WIDG_LOWERED); |
971 } |
974 } |
972 |
975 |