widget_type.h File Reference

Definitions about widgets. More...

#include "core/bitmath_func.hpp"
#include "strings_type.h"
#include "gfx_type.h"

Go to the source code of this file.

Data Structures

struct  Widget
 Window widget data structure. More...

Defines

#define WIDGETS_END   WWT_LAST, RESIZE_NONE, INVALID_COLOUR, 0, 0, 0, 0, 0, STR_NULL
 Marker for the "end of widgets" in a Window(Desc) widget table.

Enumerations

enum  DisplayFlags {
  RESIZE_NONE = 0, RESIZE_LEFT = 1, RESIZE_RIGHT = 2, RESIZE_TOP = 4,
  RESIZE_BOTTOM = 8, RESIZE_LR = RESIZE_LEFT | RESIZE_RIGHT, RESIZE_RB = RESIZE_RIGHT | RESIZE_BOTTOM, RESIZE_TB = RESIZE_TOP | RESIZE_BOTTOM,
  RESIZE_LRB = RESIZE_LEFT | RESIZE_RIGHT | RESIZE_BOTTOM, RESIZE_LRTB = RESIZE_LEFT | RESIZE_RIGHT | RESIZE_TOP | RESIZE_BOTTOM, RESIZE_RTB = RESIZE_RIGHT | RESIZE_TOP | RESIZE_BOTTOM, WIDG_DISABLED = 4,
  WIDG_HIDDEN = 5, WIDG_LOWERED = 6
}
enum  { WIDGET_LIST_END = -1 }
enum  WidgetType {
  WWT_EMPTY, WWT_PANEL, WWT_INSET, WWT_IMGBTN,
  WWT_IMGBTN_2, WWT_TEXTBTN, WWT_TEXTBTN_2, WWT_LABEL,
  WWT_TEXT, WWT_MATRIX, WWT_SCROLLBAR, WWT_FRAME,
  WWT_CAPTION, WWT_HSCROLLBAR, WWT_STICKYBOX, WWT_SCROLL2BAR,
  WWT_RESIZEBOX, WWT_CLOSEBOX, WWT_DROPDOWN, WWT_DROPDOWNIN,
  WWT_EDITBOX, WWT_LAST, WWT_MASK = 0x1F, WWB_PUSHBUTTON = 1 << 5,
  WWB_MASK = 0xE0, WWT_PUSHBTN = WWT_PANEL | WWB_PUSHBUTTON, WWT_PUSHTXTBTN = WWT_TEXTBTN | WWB_PUSHBUTTON, WWT_PUSHIMGBTN = WWT_IMGBTN | WWB_PUSHBUTTON
}
 Window widget types. More...

Functions

 DECLARE_ENUM_AS_BIT_SET (DisplayFlags)


Detailed Description

Definitions about widgets.

Definition in file widget_type.h.


Define Documentation

#define WIDGETS_END   WWT_LAST, RESIZE_NONE, INVALID_COLOUR, 0, 0, 0, 0, 0, STR_NULL

Marker for the "end of widgets" in a Window(Desc) widget table.

Definition at line 109 of file widget_type.h.


Enumeration Type Documentation

anonymous enum

Enumerator:
WIDGET_LIST_END  indicate the end of widgets' list for vararg functions

Definition at line 64 of file widget_type.h.

Enumerator:
RESIZE_NONE  no resize required
RESIZE_LEFT  left resize flag
RESIZE_RIGHT  rigth resize flag
RESIZE_TOP  top resize flag
RESIZE_BOTTOM  bottom resize flag
RESIZE_LR  combination of left and right resize flags
RESIZE_RB  combination of right and bottom resize flags
RESIZE_TB  combination of top and bottom resize flags
RESIZE_LRB  combination of left, right and bottom resize flags
RESIZE_LRTB  combination of all resize flags
RESIZE_RTB  combination of right, top and bottom resize flag
WIDG_DISABLED  widget is greyed out, not available
WIDG_HIDDEN  widget is made invisible
WIDG_LOWERED  widget is paint lowered, a pressed button in fact

Definition at line 39 of file widget_type.h.

enum WidgetType

Window widget types.

Enumerator:
WWT_EMPTY  Empty widget, place holder to reserve space in widget array.
WWT_PANEL  Simple depressed panel.
WWT_INSET  Pressed (inset) panel, most commonly used as combo box _text_ area.
WWT_IMGBTN  Button with image.
WWT_IMGBTN_2  Button with diff image when clicked.
WWT_TEXTBTN  Button with text.
WWT_TEXTBTN_2  Button with diff text when clicked.
WWT_LABEL  Centered label.
WWT_TEXT  Pure simple text.
WWT_MATRIX  List of items underneath each other.
WWT_SCROLLBAR  Vertical scrollbar.
WWT_FRAME  Frame.
WWT_CAPTION  Window caption (window title between closebox and stickybox).
WWT_HSCROLLBAR  Horizontal scrollbar.
WWT_STICKYBOX  Sticky box (normally at top-right of a window).
WWT_SCROLL2BAR  2nd vertical scrollbar
WWT_RESIZEBOX  Resize box (normally at bottom-right of a window).
WWT_CLOSEBOX  Close box (at top-left of a window).
WWT_DROPDOWN  Raised drop down list (regular).
WWT_DROPDOWNIN  Inset drop down list (used on game options only).
WWT_EDITBOX  a textbox for typing
WWT_LAST  Last Item. use WIDGETS_END to fill up padding!!

Definition at line 71 of file widget_type.h.


Generated on Wed Apr 1 14:38:29 2009 for OpenTTD by  doxygen 1.5.6