Main Page | Modules | Alphabetical List | Data Structures | File List | Data Fields | Globals | Related Pages

dll/drawstring.c File Reference


Detailed Description

Draws a line-wrapped string with tab support.

Rules for setting tab stops:
setTabStops takes a variable number of arguments, the first of which is the number of tabs to use. All arguments must be of type int, and the first tab stop is always at 0 (that way, a tab which crosses onto a new line starts at the beginning of the next line.)

Definition in file drawstring.c.

#include "crogue.h"
#include "dll.h"

Go to the source code of this file.

Functions

int StringWidth (const char *str)
void clear_string (int x, int y, int width, int height)
void setTabStops (int num,...)
int findTab (int pos)
void draw_string (const char *string, draw_string_info *start_state, short x, short y, short width, short height, short wrap)

Variables

int numTabStops = 1
uchar tabStops [16] = {0}


Function Documentation

void clear_string int  x,
int  y,
int  width,
int  height
 

Definition at line 47 of file drawstring.c.

References FontHeight(), and Graph_ClearRect().

Referenced by draw_string(), and UI_MF_clear().

void draw_string const char *  string,
draw_string_info start_state,
short  x,
short  y,
short  width,
short  height,
short  wrap
 

Definition at line 89 of file drawstring.c.

References clear_string(), draw_string_info::curRow, draw_string_info::curX, findTab(), FontHeight(), FontWidth(), Graph_DrawChar(), Graph_DrawStr(), read_char(), and StringWidth().

Referenced by char_info(), display_scores(), list_discoveries(), UI_Dialog_Display(), UI_Menu_Redraw(), UI_MF_history(), and UI_MF_sendmsg().

int findTab int  pos  )  [static]
 

Definition at line 70 of file drawstring.c.

References numTabStops, SCREEN_WIDTH, and tabStops.

Referenced by draw_string().

void setTabStops int  num,
... 
 

Definition at line 57 of file drawstring.c.

References numTabStops, and tabStops.

Referenced by actions_menu(), cast_spell(), char_info(), display_scores(), help(), items_menu(), list_discoveries(), options_menu(), and study_book().

int StringWidth const char *  str  )  [static]
 

Definition at line 33 of file drawstring.c.

References FontWidth(), and uint.

Referenced by draw_string().


Variable Documentation

int numTabStops = 1 [static]
 

Definition at line 53 of file drawstring.c.

Referenced by findTab(), and setTabStops().

uchar tabStops[16] = {0} [static]
 

Definition at line 54 of file drawstring.c.

Referenced by findTab(), and setTabStops().


Generated on Thu May 20 13:12:12 2004 for CalcRogue by doxygen 1.3.6