File diff r9081:ef978dca9443 → r9082:63eb44b1f81c
src/window_gui.h
Show inline comments
 
@@ -288,12 +288,18 @@ struct WindowMessage {
 
};
 

	
 
/**
 
 * Data structure for an opened window
 
 */
 
struct Window : ZeroedMemoryAllocator {
 
private:
 
	WindowProc *wndproc;   ///< Event handler function for the window. Do not use directly, call HandleWindowEvent() instead.
 

	
 
public:
 
	Window(WindowProc *proc) : wndproc(proc) {}
 

	
 
	uint16 flags4;              ///< Window flags, @see WindowFlags
 
	WindowClass window_class;   ///< Window class
 
	WindowNumber window_number; ///< Window number within the window class
 

	
 
	int left;   ///< x position of left edge of the window
 
	int top;    ///< y position of top edge of the window
 
@@ -304,13 +310,12 @@ struct Window : ZeroedMemoryAllocator {
 
	Scrollbar vscroll;  ///< First vertical scroll bar
 
	Scrollbar vscroll2; ///< Second vertical scroll bar
 
	ResizeInfo resize;  ///< Resize information
 

	
 
	byte caption_color; ///< Background color of the window caption, contains PlayerID
 

	
 
	WindowProc *wndproc;   ///< Event handler function for the window
 
	ViewPort *viewport;    ///< Pointer to viewport, if present
 
	const Widget *original_widget; ///< Original widget layout, copied from WindowDesc
 
	Widget *widget;        ///< Widgets of the window
 
	uint widget_count;     ///< Number of widgets of the window
 
	uint32 desc_flags;     ///< Window/widgets default flags setting, @see WindowDefaultFlag
 

	
 
@@ -336,12 +341,14 @@ struct Window : ZeroedMemoryAllocator {
 

	
 
	void RaiseButtons();
 
	void CDECL SetWidgetsDisabledState(bool disab_stat, int widgets, ...);
 
	void CDECL SetWidgetsHiddenState(bool hidden_stat, int widgets, ...);
 
	void CDECL SetWidgetsLoweredState(bool lowered_stat, int widgets, ...);
 
	void InvalidateWidget(byte widget_index) const;
 

	
 
	virtual void HandleWindowEvent(WindowEvent *e);
 
};
 

	
 
struct menu_d {
 
	byte item_count;      ///< follow_vehicle
 
	byte sel_index;       ///< scrollpos_x
 
	byte main_button;     ///< scrollpos_y