Main Page | Alphabetical List | Class List | File List | Class Members | File Members

editor/properties.c File Reference

#include "editor.h"

Go to the source code of this file.

Defines

#define PROPERTIES_X   10
#define PROPERTIES_Y   20
#define PROPERTIES_WIDTH   140
#define PROPERTIES_HEIGHT   70
#define LABEL_WIDTH   35
#define PROPERTY_MAX_LENGTH   64
#define NUM_WIDGETS   4

Functions

void enter_properties_state (void)
void redraw_properties (void)
void properties_state (int key)
void apply_property_changes (void)
void switch_focus (int focus)
void key_textbox (struct widget *this, int key)
void draw_textbox (struct widget *this)

Variables

char property_name [PROPERTY_MAX_LENGTH]
char property_author [PROPERTY_MAX_LENGTH]
char property_hint [PROPERTY_MAX_LENGTH]
char property_congrat [PROPERTY_MAX_LENGTH]
widget widgets [NUM_WIDGETS]
int current_widget = 0


Define Documentation

#define LABEL_WIDTH   35
 

Definition at line 7 of file properties.c.

Referenced by draw_textbox().

#define NUM_WIDGETS   4
 

Definition at line 15 of file properties.c.

Referenced by properties_state(), and redraw_properties().

#define PROPERTIES_HEIGHT   70
 

Definition at line 6 of file properties.c.

Referenced by enter_properties_state().

#define PROPERTIES_WIDTH   140
 

Definition at line 5 of file properties.c.

Referenced by enter_properties_state().

#define PROPERTIES_X   10
 

Definition at line 3 of file properties.c.

Referenced by draw_textbox(), and enter_properties_state().

#define PROPERTIES_Y   20
 

Definition at line 4 of file properties.c.

Referenced by draw_textbox(), and enter_properties_state().

#define PROPERTY_MAX_LENGTH   64
 

Definition at line 9 of file properties.c.

Referenced by key_textbox().


Function Documentation

void apply_property_changes void   ) 
 

Definition at line 73 of file properties.c.

References engine_map::author, engine_map::congrat, current_map, engine_map::hint, engine_map::name, property_author, property_congrat, property_hint, and property_name.

Referenced by properties_state().

void draw_textbox struct widget this  ) 
 

Definition at line 111 of file properties.c.

References clear_rect(), widget::content, draw_rect(), draw_string(), widget::height, widget::label, LABEL_WIDTH, PROPERTIES_X, PROPERTIES_Y, widget::width, widget::x, xor_rect(), and widget::y.

Referenced by key_textbox().

void enter_properties_state void   ) 
 

Definition at line 25 of file properties.c.

References engine_map::author, engine_map::congrat, current_map, current_widget, draw_current_map(), draw_line(), draw_rect(), draw_string(), widget::focused, engine_map::hint, input_state, engine_map::name, PROPERTIES_HEIGHT, properties_state(), PROPERTIES_WIDTH, PROPERTIES_X, PROPERTIES_Y, property_author, property_congrat, property_hint, property_name, redraw_properties(), and widgets.

Referenced by map_properties().

void key_textbox struct widget this,
int  key
 

Definition at line 93 of file properties.c.

References draw_textbox(), and PROPERTY_MAX_LENGTH.

void properties_state int  key  ) 
 

Definition at line 51 of file properties.c.

References apply_property_changes(), current_widget, enter_edit_state(), widget::focused, widget::key, NUM_WIDGETS, switch_focus(), and widgets.

Referenced by enter_properties_state().

void redraw_properties void   ) 
 

Definition at line 43 of file properties.c.

References widget::draw, NUM_WIDGETS, and widgets.

Referenced by enter_properties_state().

void switch_focus int  focus  ) 
 

Definition at line 83 of file properties.c.

References current_widget, widget::draw, widget::focused, and widgets.

Referenced by properties_state().


Variable Documentation

int current_widget = 0
 

Definition at line 22 of file properties.c.

Referenced by enter_properties_state(), properties_state(), and switch_focus().

char property_author[PROPERTY_MAX_LENGTH]
 

Definition at line 11 of file properties.c.

Referenced by apply_property_changes(), and enter_properties_state().

char property_congrat[PROPERTY_MAX_LENGTH]
 

Definition at line 13 of file properties.c.

Referenced by apply_property_changes(), and enter_properties_state().

char property_hint[PROPERTY_MAX_LENGTH]
 

Definition at line 12 of file properties.c.

Referenced by apply_property_changes(), and enter_properties_state().

char property_name[PROPERTY_MAX_LENGTH]
 

Definition at line 10 of file properties.c.

Referenced by apply_property_changes(), and enter_properties_state().

struct widget widgets[NUM_WIDGETS]
 

Initial value:

 {
    { 2, 14, 135, 9, 0, draw_textbox, key_textbox, "Name",    property_name },
    { 2, 24, 135, 9, 0, draw_textbox, key_textbox, "Author",  property_author},
    { 2, 34, 135, 9, 0, draw_textbox, key_textbox, "Hint",    property_hint  },
    { 2, 44, 135, 9, 0, draw_textbox, key_textbox, "Congrats",property_congrat},
    }

Definition at line 16 of file properties.c.

Referenced by enter_properties_state(), properties_state(), redraw_properties(), and switch_focus().


Generated on Thu Apr 22 14:06:33 2004 for SKye by doxygen 1.3.6