File diff r8924:b5c89d2d57c4 → r8925:2b882cd5b1b6
src/window_gui.h
Show inline comments
 
/* $Id$ */
 

	
 
/** @file window_gui.h Functions, definitions and such used only by the GUI. */
 

	
 
#ifndef WINDOW_GUI_H
 
#define WINDOW_GUI_H
 

	
 
#include "core/bitmath_func.hpp"
 
#include "vehicle_type.h"
 
#include "viewport_type.h"
 
#include "player_type.h"
 
#include "strings_type.h"
 
#include "core/alloc_type.hpp"
 

	
 
/**
 
 * The maximum number of windows that can be opened.
 
 */
 
static const int MAX_NUMBER_OF_WINDOWS = 25;
 

	
 
typedef void WindowProc(Window *w, WindowEvent *e);
 

	
 
/* How the resize system works:
 
    First, you need to add a WWT_RESIZEBOX to the widgets, and you need
 
     to add the flag WDF_RESIZABLE to the window. Now the window is ready
 
     to resize itself.
 
@@ -280,25 +281,25 @@ struct ResizeInfo {
 
 * Message data structure for messages sent between winodows
 
 * @see SendWindowMessageW()
 
 */
 
struct WindowMessage {
 
	int msg;
 
	int wparam;
 
	int lparam;
 
};
 

	
 
/**
 
 * Data structure for an opened window
 
 */
 
struct Window {
 
struct Window : ZeroedMemoryAllocator {
 
	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
 
	int width;  ///< width of the window (number of pixels to the right in x direction)
 
	int height; ///< Height of the window (number of pixels down in y direction)
 

	
 
	Scrollbar hscroll;  ///< Horizontal scroll bar
 
	Scrollbar vscroll;  ///< First vertical scroll bar
 
	Scrollbar vscroll2; ///< Second vertical scroll bar