mirror of https://github.com/OpenTTD/OpenTTD
(svn r12693) -Documentation: add some documentation to some window related stuff. Based on a patch by Albert.
parent
87ddcb0d5a
commit
2310557716
|
@ -22,8 +22,7 @@
|
||||||
|
|
||||||
#include "table/sprites.h"
|
#include "table/sprites.h"
|
||||||
|
|
||||||
/** delta between mouse cursor and upper left corner of dragged window */
|
static Point _drag_delta; //< delta between mouse cursor and upper left corner of dragged window
|
||||||
static Point _drag_delta;
|
|
||||||
|
|
||||||
static Window _windows[MAX_NUMBER_OF_WINDOWS];
|
static Window _windows[MAX_NUMBER_OF_WINDOWS];
|
||||||
|
|
||||||
|
@ -1047,6 +1046,9 @@ Window *FindWindowFromPt(int x, int y)
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* (re)initialize the windowing system
|
||||||
|
*/
|
||||||
void InitWindowSystem()
|
void InitWindowSystem()
|
||||||
{
|
{
|
||||||
IConsoleClose();
|
IConsoleClose();
|
||||||
|
@ -1057,6 +1059,9 @@ void InitWindowSystem()
|
||||||
_no_scroll = 0;
|
_no_scroll = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Close down the windowing system
|
||||||
|
*/
|
||||||
void UnInitWindowSystem()
|
void UnInitWindowSystem()
|
||||||
{
|
{
|
||||||
Window **wz;
|
Window **wz;
|
||||||
|
@ -1075,6 +1080,9 @@ restart_search:
|
||||||
assert(_last_z_window == _z_windows);
|
assert(_last_z_window == _z_windows);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Reset the windowing system, by means of shutting it down followed by re-initialization
|
||||||
|
*/
|
||||||
void ResetWindowSystem()
|
void ResetWindowSystem()
|
||||||
{
|
{
|
||||||
UnInitWindowSystem();
|
UnInitWindowSystem();
|
||||||
|
|
|
@ -307,7 +307,7 @@ struct Window {
|
||||||
byte caption_color; ///< Background color of the window caption, contains PlayerID
|
byte caption_color; ///< Background color of the window caption, contains PlayerID
|
||||||
|
|
||||||
WindowProc *wndproc; ///< Event handler function for the window
|
WindowProc *wndproc; ///< Event handler function for the window
|
||||||
ViewPort *viewport; ///< Pointer to viewport, if present (structure is part of derived class)
|
ViewPort *viewport; ///< Pointer to viewport, if present
|
||||||
const Widget *original_widget; ///< Original widget layout, copied from WindowDesc
|
const Widget *original_widget; ///< Original widget layout, copied from WindowDesc
|
||||||
Widget *widget; ///< Widgets of the window
|
Widget *widget; ///< Widgets of the window
|
||||||
uint widget_count; ///< Number of widgets of the window
|
uint widget_count; ///< Number of widgets of the window
|
||||||
|
|
|
@ -7,6 +7,9 @@
|
||||||
|
|
||||||
#include "core/enum_type.hpp"
|
#include "core/enum_type.hpp"
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Window classes
|
||||||
|
*/
|
||||||
enum WindowClass {
|
enum WindowClass {
|
||||||
WC_NONE,
|
WC_NONE,
|
||||||
WC_MAIN_WINDOW = WC_NONE,
|
WC_MAIN_WINDOW = WC_NONE,
|
||||||
|
|
Loading…
Reference in New Issue