Crossfire Client, Trunk  R18666
Enumerations | Functions | Variables
/home/leaf/crossfire/client/trunk/gtk-v2/src/spells.c File Reference
#include <gtk/gtk.h>
#include <glade/glade.h>
#include "client.h"
#include "image.h"
#include "metaserver.h"
#include "main.h"
#include "gtk2proto.h"
Include dependency graph for spells.c:

Go to the source code of this file.

Enumerations

enum  Styles {
  Style_Magical = 0, Style_Cursed, Style_Unpaid, Style_Locked,
  Style_Applied, Style_Last, Style_Attuned, Style_Repelled,
  Style_Denied, Style_Normal, Style_Last
}
enum  {
  LIST_IMAGE, LIST_NAME, LIST_LEVEL, LIST_TIME,
  LIST_COST, LIST_DAMAGE, LIST_SKILL, LIST_PATH,
  LIST_DESCRIPTION, LIST_BACKGROUND, LIST_MAX_SP, LIST_TAG,
  LIST_FOREGROUND, LIST_FONT
}

Functions

void spell_get_styles (void)
void on_spell_window_size_allocate (GtkWidget *widget, gpointer user_data)
void update_spell_information (void)
void on_spells_activate (GtkMenuItem *menuitem, gpointer user_data)
void on_spell_treeview_row_activated (GtkTreeView *treeview, GtkTreePath *path, GtkTreeViewColumn *column, gpointer user_data)
void on_spell_cast_clicked (GtkButton *button, gpointer user_data)
void on_spell_invoke_clicked (GtkButton *button, gpointer user_data)
void on_spell_close_clicked (GtkButton *button, gpointer user_data)

Variables

const char *const rcsid_gtk2_spells_c = "$Id: spells.c 13816 2010-09-15 05:01:57Z kbulgrien $"

Detailed Description

Handles spell related functionality.

Definition in file spells.c.


Enumeration Type Documentation

anonymous enum
Enumerator:
LIST_IMAGE 
LIST_NAME 
LIST_LEVEL 
LIST_TIME 
LIST_COST 
LIST_DAMAGE 
LIST_SKILL 
LIST_PATH 
LIST_DESCRIPTION 
LIST_BACKGROUND 
LIST_MAX_SP 
LIST_TAG 
LIST_FOREGROUND 
LIST_FONT 

Definition at line 54 of file spells.c.

enum Styles
Enumerator:
Style_Magical 
Style_Cursed 
Style_Unpaid 
Style_Locked 
Style_Applied 
Style_Last 
Style_Attuned 
Style_Repelled 
Style_Denied 
Style_Normal 
Style_Last 

Definition at line 44 of file spells.c.


Function Documentation

void on_spell_cast_clicked ( GtkButton *  button,
gpointer  user_data 
)
Parameters:
button
user_data

Definition at line 531 of file spells.c.

Here is the call graph for this function:

Here is the caller graph for this function:

void on_spell_close_clicked ( GtkButton *  button,
gpointer  user_data 
)
Parameters:
button
user_data

Definition at line 587 of file spells.c.

Here is the caller graph for this function:

void on_spell_invoke_clicked ( GtkButton *  button,
gpointer  user_data 
)
Parameters:
button
user_data

Definition at line 559 of file spells.c.

Here is the call graph for this function:

Here is the caller graph for this function:

void on_spell_treeview_row_activated ( GtkTreeView *  treeview,
GtkTreePath *  path,
GtkTreeViewColumn *  column,
gpointer  user_data 
)
Parameters:
treeview
path
column
user_data

Definition at line 501 of file spells.c.

Here is the call graph for this function:

Here is the caller graph for this function:

void on_spell_window_size_allocate ( GtkWidget *  widget,
gpointer  user_data 
)

Adjust the line wrap width used by the spells dialog Description column text renderer and force redraw of the rows to cause row height adjustment. To compute the new wrap width, the widths of all other columns are subtracted from the width of the spells window to determine the available width for the description column. The remaining space is then configured as the new wrap width. Once the new wrap is computed, mark all the rows changed so that the renderer adjusts the row height to expand or contract to fit the reformatted description.

Parameters:
widget
user_data

Definition at line 138 of file spells.c.

Here is the caller graph for this function:

void on_spells_activate ( GtkMenuItem *  menuitem,
gpointer  user_data 
)
Parameters:
menuitem
user_data

Definition at line 288 of file spells.c.

Here is the call graph for this function:

Here is the caller graph for this function:

void spell_get_styles ( void  )

Gets the style information for the inventory windows. This is a separate function because if the user changes styles, it can be nice to re-load the configuration. The style for the inventory/look is a bit special. That is because with gtk, styles are widget wide - all rows in the widget would use the same style. We want to adjust the styles based on other attributes.

Definition at line 81 of file spells.c.

Here is the call graph for this function:

Here is the caller graph for this function:

void update_spell_information ( void  )

When spell information updates, the treeview is cleared and re-populated. The clear/re-populate is easier than "editing" the contents.

Definition at line 201 of file spells.c.

Here is the caller graph for this function:


Variable Documentation

const char* const rcsid_gtk2_spells_c = "$Id: spells.c 13816 2010-09-15 05:01:57Z kbulgrien $"

Definition at line 1 of file spells.c.