Atrinik Client 2.5
Functions | Variables
gui/textwin.c File Reference
#include <global.h>

Go to the source code of this file.

Functions

void textwin_init ()
void textwin_scroll_adjust (widgetdata *widget)
void textwin_readjust (widgetdata *widget)
void draw_info_flags (const char *color, int flags, const char *str)
void draw_info_format (const char *color, char *format,...)
void draw_info (const char *color, const char *str)
void textwin_handle_copy ()
static void show_window (widgetdata *widget, int x, int y, _BLTFX *bltfx)
void textwin_show (int x, int y, int w, int h)
void widget_textwin_show (widgetdata *widget)
void textwin_event (widgetdata *widget, SDL_Event *event)
void menu_textwin_clear (widgetdata *widget, int x, int y)
static void textwin_font_adjust (widgetdata *widget, int adjust)
void menu_textwin_font_inc (widgetdata *widget, int x, int y)
void menu_textwin_font_dec (widgetdata *widget, int x, int y)

Variables

static widgetdataselection_widget = NULL
static Uint32 textwin_border_color
static Uint32 textwin_border_color_selected

Detailed Description

This file handles all text window related functions

Definition in file textwin.c.


Function Documentation

void draw_info ( const char *  color,
const char *  str 
)

Add string to the text window.

Parameters:
flagsVarious flags, like color.
strThe string.

Definition at line 200 of file textwin.c.

void draw_info_format ( const char *  color,
char *  format,
  ... 
)

Draw info with format arguments.

Parameters:
flagsVarious flags, like color.
formatFormat arguments.

Definition at line 184 of file textwin.c.

void menu_textwin_clear ( widgetdata widget,
int  x,
int  y 
)

The 'Clear' menu action for text windows.

Parameters:
widgetThe text window widget.
xX.
yY.

Definition at line 671 of file textwin.c.

void menu_textwin_font_dec ( widgetdata widget,
int  x,
int  y 
)

The 'Decrease Font Size' menu action for text windows.

Parameters:
widgetThe text window widget.
xX.
yY.

Definition at line 722 of file textwin.c.

void menu_textwin_font_inc ( widgetdata widget,
int  x,
int  y 
)

The 'Increase Font Size' menu action for text windows.

Parameters:
widgetThe text window widget.
xX.
yY.

Definition at line 710 of file textwin.c.

static void show_window ( widgetdata widget,
int  x,
int  y,
_BLTFX bltfx 
) [static]

Draw a text window.

Parameters:
actWinThe text window ID.
xX position of the text window.
yY position of the text window.
bltfxThe surface.

Definition at line 271 of file textwin.c.

void textwin_event ( widgetdata widget,
SDL_Event *  event 
)

Handle text window mouse events.

Parameters:
eventSDL event type.
WidgetIDWidget ID.

Definition at line 527 of file textwin.c.

static void textwin_font_adjust ( widgetdata widget,
int  adjust 
) [static]

Adjust the specified text window widget's font size.

Parameters:
widgetThe text window.
adjustHow much to adjust the size by.

Definition at line 689 of file textwin.c.

void textwin_handle_copy ( )

Handle ctrl+C.

Definition at line 207 of file textwin.c.

void textwin_init ( )

Initialize text window variables.

Definition at line 45 of file textwin.c.

void textwin_readjust ( widgetdata widget)

Readjust text window's scroll/entries counts due to a font size change.

Parameters:
widgetText window's widget.

Definition at line 73 of file textwin.c.

void textwin_scroll_adjust ( widgetdata widget)

Makes sure textwin's scroll value is a sane number.

Parameters:
widgetText window's widget.

Definition at line 54 of file textwin.c.

void textwin_show ( int  x,
int  y,
int  w,
int  h 
)

Display the message text window, without handling scrollbar/mouse actions.

Parameters:
xX position.
yY position.
wMaximum width.
hMaximum height.

Definition at line 401 of file textwin.c.

void widget_textwin_show ( widgetdata widget)

Display widget text windows.

Parameters:
widgetThe widget object.

Definition at line 433 of file textwin.c.


Variable Documentation

widgetdata* selection_widget = NULL [static]

The widget that player is making a selection in (or has finished doing so).

Definition at line 35 of file textwin.c.

Uint32 textwin_border_color [static]

Color to use for the text window border.

Definition at line 37 of file textwin.c.

Color to use for the text window border when the mouse is hovering over it.

Definition at line 41 of file textwin.c.