src/window_gui.h
branchnoai
changeset 10294 7798ae816af8
parent 10249 58810805030e
child 10455 22c441f5adf9
equal deleted inserted replaced
10292:7856e972f8aa 10294:7798ae816af8
   547 Window *BringWindowToFrontById(WindowClass cls, WindowNumber number);
   547 Window *BringWindowToFrontById(WindowClass cls, WindowNumber number);
   548 Window *FindWindowFromPt(int x, int y);
   548 Window *FindWindowFromPt(int x, int y);
   549 
   549 
   550 bool IsWindowOfPrototype(const Window *w, const Widget *widget);
   550 bool IsWindowOfPrototype(const Window *w, const Widget *widget);
   551 void AssignWidgetToWindow(Window *w, const Widget *widget);
   551 void AssignWidgetToWindow(Window *w, const Widget *widget);
   552 Window *AllocateWindow(
   552 Window *AllocateWindow(int x, int y, int width, int height,
   553 							int x,
   553 			WindowProc *proc, WindowClass cls, const Widget *widget,
   554 							int y,
   554 			void *data = NULL);
   555 							int width,
       
   556 							int height,
       
   557 							WindowProc *proc,
       
   558 							WindowClass cls,
       
   559 							const Widget *widget,
       
   560 							void *data = NULL);
       
   561 
   555 
   562 Window *AllocateWindowDesc(const WindowDesc *desc, void *data = NULL);
   556 Window *AllocateWindowDesc(const WindowDesc *desc, void *data = NULL);
   563 Window *AllocateWindowDescFront(const WindowDesc *desc, int window_number, void *data = NULL);
   557 Window *AllocateWindowDescFront(const WindowDesc *desc, int window_number, void *data = NULL);
   564 
   558 
   565 void DrawWindowViewport(const Window *w);
   559 void DrawWindowViewport(const Window *w);
   592 };
   586 };
   593 
   587 
   594 void DrawSortButtonState(const Window *w, int widget, SortButtonState state);
   588 void DrawSortButtonState(const Window *w, int widget, SortButtonState state);
   595 
   589 
   596 
   590 
       
   591 
       
   592 /* window.cpp */
       
   593 extern Window *_z_windows[];
       
   594 extern Window **_last_z_window;
       
   595 #define FOR_ALL_WINDOWS(wz) for (wz = _z_windows; wz != _last_z_window; wz++)
       
   596 
       
   597 extern Point _cursorpos_drag_start;
       
   598 
       
   599 extern int _scrollbar_start_pos;
       
   600 extern int _scrollbar_size;
       
   601 extern byte _scroller_click_timeout;
       
   602 
       
   603 extern bool _scrolling_scrollbar;
       
   604 extern bool _scrolling_viewport;
       
   605 extern bool _popup_menu_active;
       
   606 
       
   607 extern byte _special_mouse_mode;
       
   608 enum SpecialMouseMode {
       
   609 	WSM_NONE     = 0,
       
   610 	WSM_DRAGDROP = 1,
       
   611 	WSM_SIZING   = 2,
       
   612 	WSM_PRESIZE  = 3,
       
   613 };
       
   614 
   597 Window *GetCallbackWnd();
   615 Window *GetCallbackWnd();
   598 void DeleteNonVitalWindows();
   616 void DeleteNonVitalWindows();
   599 void DeleteAllNonVitalWindows();
   617 void DeleteAllNonVitalWindows();
   600 void HideVitalWindows();
   618 void HideVitalWindows();
   601 void ShowVitalWindows();
   619 void ShowVitalWindows();
   602 Window **FindWindowZPosition(const Window *w);
   620 Window **FindWindowZPosition(const Window *w);
   603 
   621 
   604 /* window.cpp */
       
   605 extern Window *_z_windows[];
       
   606 extern Window **_last_z_window;
       
   607 #define FOR_ALL_WINDOWS(wz) for (wz = _z_windows; wz != _last_z_window; wz++)
       
   608 
       
   609 extern Point _cursorpos_drag_start;
       
   610 
       
   611 extern int _scrollbar_start_pos;
       
   612 extern int _scrollbar_size;
       
   613 extern byte _scroller_click_timeout;
       
   614 
       
   615 extern bool _scrolling_scrollbar;
       
   616 extern bool _scrolling_viewport;
       
   617 extern bool _popup_menu_active;
       
   618 
       
   619 extern byte _special_mouse_mode;
       
   620 enum SpecialMouseMode {
       
   621 	WSM_NONE     = 0,
       
   622 	WSM_DRAGDROP = 1,
       
   623 	WSM_SIZING   = 2,
       
   624 	WSM_PRESIZE  = 3,
       
   625 };
       
   626 
       
   627 void ScrollbarClickHandler(Window *w, const Widget *wi, int x, int y);
   622 void ScrollbarClickHandler(Window *w, const Widget *wi, int x, int y);
   628 
   623 
   629 void ResizeButtons(Window *w, byte left, byte right);
   624 void ResizeButtons(Window *w, byte left, byte right);
   630 
   625 
   631 void ResizeWindowForWidget(Window *w, int widget, int delta_x, int delta_y);
   626 void ResizeWindowForWidget(Window *w, int widget, int delta_x, int delta_y);