Atrinik Client 2.5
Data Structures | Defines | Typedefs | Enumerations | Variables
include/widget.h File Reference

Go to the source code of this file.

Data Structures

struct  widgetdata
struct  _widget_container
struct  _widget_label
struct  _widget_bitmap
struct  _widget_container_strip
struct  _menu
struct  _menuitem
struct  widgetevent
struct  widgetmove
struct  widgetresize

Defines

#define WIDGET_REDRAW(__tmp)   __tmp->redraw = 1;
#define WIDGET_REDRAW_ALL(__id)   widget_redraw_all(__id);
#define TEXTWIN(__textwin)   ((textwin_struct *) ((__textwin)->subwidget))
#define CONTAINER(__widget_container)   (_widget_container *) (__widget_container->subwidget)
#define LABEL(__widget_label)   (_widget_label *) (__widget_label->subwidget)
#define BITMAP(__widget_bitmap)   (_widget_bitmap *) (__widget_bitmap->subwidget)
#define CONTAINER_STRIP(__widget_container_strip)   (_widget_container_strip *) ( ((_widget_container *) (__widget_container_strip->subwidget)) ->subcontainer)
#define MENU(__menu)   (_menu *) ( (( ((_widget_container_strip *) ((_widget_container *) (__menu->subwidget)) ->subcontainer)) ->subcontainer_strip))
#define MENUITEM(__menuitem)   (_menuitem *) ( (( ((_widget_container_strip *) ((_widget_container *) (__menuitem->subwidget)) ->subcontainer)) ->subcontainer_strip))

Typedefs

typedef struct widgetdata widgetdata
typedef struct _widget_container _widget_container
typedef struct _widget_label _widget_label
typedef struct _widget_bitmap _widget_bitmap
typedef struct
_widget_container_strip 
_widget_container_strip
typedef struct _menu _menu
typedef struct _menuitem _menuitem
typedef enum WidgetID WidgetID
typedef struct widgetevent widgetevent
typedef struct widgetmove widgetmove
typedef struct widgetresize widgetresize

Enumerations

enum  _MEvent { MOUSE_UP = 1, MOUSE_DOWN, MOUSE_MOVE }
enum  WidgetID {
  MAP_ID, STATS_ID, RESIST_ID, MAIN_LVL_ID,
  SKILL_EXP_ID, REGEN_ID, SKILL_LVL_ID, MENU_B_ID,
  QUICKSLOT_ID, CHATWIN_ID, MSGWIN_ID, PDOLL_ID,
  BELOW_INV_ID, PLAYER_INFO_ID, RANGE_ID, TARGET_ID,
  MAIN_INV_ID, MAPNAME_ID, IN_CONSOLE_ID, IN_NUMBER_ID,
  FPS_ID, MPLAYER_ID, SPELLS_ID, SKILLS_ID,
  PARTY_ID, CONTAINER_ID, LABEL_ID, BITMAP_ID,
  TOTAL_WIDGETS
}
enum  { CONTAINER_STRIP_ID = TOTAL_WIDGETS, MENU_ID, MENUITEM_ID, TOTAL_SUBWIDGETS }
enum  {
  RESIZE_LEFT = 1, RESIZE_TOP = 2, RESIZE_RIGHT = 4, RESIZE_BOTTOM = 8,
  RESIZE_TOPLEFT = RESIZE_TOP | RESIZE_LEFT, RESIZE_TOPRIGHT = RESIZE_TOP | RESIZE_RIGHT, RESIZE_BOTTOMRIGHT = RESIZE_BOTTOM | RESIZE_RIGHT, RESIZE_BOTTOMLEFT = RESIZE_BOTTOM | RESIZE_LEFT
}
enum  { MENU_NORMAL, MENU_SUBMENU, MENU_CHECKBOX, MENU_RADIO }

Variables

widgetdatacur_widget [TOTAL_SUBWIDGETS]
widgetevent widget_mouse_event

Detailed Description

Widget header file.

Definition in file widget.h.


Define Documentation

#define TEXTWIN (   __textwin)    ((textwin_struct *) ((__textwin)->subwidget))

Macros to grab extended widget attributes. This works similar to inheritance.

Definition at line 349 of file widget.h.

#define WIDGET_REDRAW (   __tmp)    __tmp->redraw = 1;

Macro to redraw widget using the array.

Definition at line 343 of file widget.h.


Typedef Documentation

typedef struct _menu _menu

A menu. This is a special strip container that contains the menuitems inside.

typedef struct _menuitem _menuitem

A menuitem that holds the pointer to the function that is called when it is clicked on. It is a special strip container that contains the string inside. This allows the menu to detect how long the string is so that it can resize itself to fit it on the fly.

Information about a widget container. Containers can hold widgets inside them.

A more specialized kind of container, where widgets snap into it when inserted, and where widgets are sorted into rows and columns.

typedef struct widgetdata widgetdata

Information about a widget.

typedef struct widgetevent widgetevent

Used for mouse button/move events

typedef enum WidgetID WidgetID

The widget type IDs.

typedef struct widgetmove widgetmove

This is used when moving a widget with the mouse.

typedef struct widgetresize widgetresize

This is used when resizing a widget with the mouse.


Enumeration Type Documentation

anonymous enum

The widget subtype IDs. These are derived from base widgets.

Enumerator:
CONTAINER_STRIP_ID 

First element must be equal to TOTAL_WIDGETS.

TOTAL_SUBWIDGETS 

The total number of subwidgets.

Definition at line 267 of file widget.h.

anonymous enum

Widget resize flags.

Definition at line 279 of file widget.h.

anonymous enum

Menu types.

Definition at line 292 of file widget.h.

enum _MEvent

A mouse event.

Definition at line 223 of file widget.h.

enum WidgetID

The widget type IDs.

Enumerator:
TOTAL_WIDGETS 

The total number of widgets.

Definition at line 231 of file widget.h.


Variable Documentation

widgetdata* cur_widget[TOTAL_SUBWIDGETS]

The head and foot node for each widget type. The nodes in this linked list do not change until a node is deleted.

Definition at line 102 of file widget.c.

Determines which widget has mouse focus This value is determined in the mouse routines for the widgets

Definition at line 108 of file widget.c.