150 extern Window *_focused_window;
290 inline void *
operator new[](
size_t size)
300 inline void operator delete(
void *ptr)
336 template <
class NWID>
337 inline const NWID *
GetWidget(uint widnum)
const;
338 template <
class NWID>
348 virtual const char *
GetCaret()
const;
390 if (this->
nested_array[widget_index] != NULL) this->GetWidget<NWidgetCore>(widget_index)->SetDisabled(disab_stat);
419 return this->GetWidget<NWidgetCore>(widget_index)->IsDisabled();
451 this->GetWidget<NWidgetCore>(widget_index)->SetLowered(lowered_stat);
461 bool lowered_state = this->GetWidget<NWidgetCore>(widget_index)->IsLowered();
462 this->GetWidget<NWidgetCore>(widget_index)->SetLowered(!lowered_state);
491 return this->GetWidget<NWidgetCore>(widget_index)->IsLowered();
498 virtual void InsertTextString(
int wid,
const char *str,
bool marked,
const char *caret,
const char *insert_location,
const char *replacement_end);
501 int GetRowFromWidget(
int clickpos,
int widget,
int padding,
int line_height = -1)
const;
516 void ReInit(
int rx = 0,
int ry = 0);
803 template <
class NWID>
807 NWID *nwid =
dynamic_cast<NWID *
>(this->
nested_array[widnum]);
808 assert(nwid != NULL);
814 inline const NWidgetBase *Window::GetWidget<NWidgetBase>(uint widnum)
const
816 if (widnum >= this->nested_array_size)
return NULL;
817 return this->nested_array[widnum];
826 template <
class NWID>
829 return const_cast<Window *
>(
this)->GetWidget<NWID>(widnum);
858 template <
typename Wcls>
862 if (w != NULL)
return return_existing ? w : NULL;
863 return new Wcls(desc, window_number);
869 enum TooltipCloseCondition {
875 void GuiShowTooltips(
Window *parent,
StringID str, uint paramcount = 0,
const uint64 params[] = NULL, TooltipCloseCondition close_tooltip = TCC_HOVER);
881 #define FOR_ALL_WINDOWS_FROM_BACK_FROM(w, start) for (w = start; w != NULL; w = w->z_front) if (w->window_class != WC_INVALID)
882 #define FOR_ALL_WINDOWS_FROM_FRONT_FROM(w, start) for (w = start; w != NULL; w = w->z_back) if (w->window_class != WC_INVALID)
883 #define FOR_ALL_WINDOWS_FROM_BACK(w) FOR_ALL_WINDOWS_FROM_BACK_FROM(w, _z_back_window)
884 #define FOR_ALL_WINDOWS_FROM_FRONT(w) FOR_ALL_WINDOWS_FROM_FRONT_FROM(w, _z_front_window)
886 extern Point _cursorpos_drag_start;
888 extern int _scrollbar_start_pos;
889 extern int _scrollbar_size;
890 extern byte _scroller_click_timeout;