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

GTaskCellRendererBasic


Data Structures

struct  _GTaskBasicInfo
struct  _GTaskCellRendererBasic
struct  _GTaskCellRendererBasicClass
struct  _GTaskCellRendererBasicPrivate

Defines

#define PADDING   6
#define ELLIPSIS   "..."
#define GTASK_CELL_RENDERER_BASIC_TYPE   (gtask_cell_renderer_basic_get_type())
#define GTASK_CELL_RENDERER_BASIC(obj)
#define GTASK_CELL_RENDERER_BASIC_CLASS(klass)
#define GTASK_IS_CELL_RENDERER_BASIC(obj)
#define GTASK_IS_CELL_RENDERER_BASIC_CLASS(klass)
#define GTASK_CELL_RENDERER_BASIC_GET_CLASS(obj)

Typedefs

typedef _GTaskBasicInfo GTaskBasicInfo
typedef _GTaskCellRendererBasic GTaskCellRendererBasic
typedef _GTaskCellRendererBasicClass GTaskCellRendererBasicClass
typedef _GTaskCellRendererBasicPrivate GTaskCellRendererBasicPrivate

Enumerations

enum  {
  PROP_0, C_PROP_PROGRESS, C_PROP_TITLE, C_PROP_STATUS_MESSAGE,
  C_PROP_ACTIVITY_STATE, C_PROP_TIME_LEFT, C_PROP_PREVIEW, C_PROP_PREVIEW_IS_THUMB,
  C_PROP_THUMBNAIL_FRAME
}

Functions

GTaskBasicInfogtask_cell_renderer_basic_get_sizing_info (GTaskCellRendererBasic *cell, GtkWidget *widget, guint x, guint y)
void gtask_cell_renderer_basic_fill_text_info (GTaskCellRendererBasic *cell, GTaskBasicInfo *info, GtkWidget *widget, gint center_size)
void gtask_basic_info_free (GTaskBasicInfo *info)
void gtask_cell_renderer_basic_init (GTaskCellRendererBasic *cell)
void gtask_cell_renderer_basic_class_init (GTaskCellRendererBasicClass *klass)
void gtask_cell_renderer_basic_finalize (GObject *object)
void gtask_cell_renderer_basic_get_property (GObject *object, guint param_id, GValue *value, GParamSpec *pspec)
void gtask_cell_renderer_basic_set_property (GObject *object, guint param_id, const GValue *value, GParamSpec *pspec)
void gtask_cell_renderer_basic_get_size (GtkCellRenderer *cell, GtkWidget *widget, GdkRectangle *cell_area, gint *x_offset, gint *y_offset, gint *width, gint *height)
void gtask_cell_renderer_basic_render (GtkCellRenderer *cell, GdkWindow *window, GtkWidget *widget, GdkRectangle *background_area, GdkRectangle *cell_area, GdkRectangle *expose_area, guint flags)
GtkType gtask_cell_renderer_basic_get_type ()
int measure_string_width (const char *string, PangoLayout *layout)
void compute_character_widths (const char *format_string, const char *string, PangoLayout *layout, int *char_len_return, int **widths_return, int **cuts_return)
char * eel_string_ellipsize_end (const char *format_string, const char *string, PangoLayout *layout, int width)
GtkCellRenderer * gtask_cell_renderer_basic_new (void)

Variables

gpointer parent_class

Define Documentation

#define ELLIPSIS   "..."
 

Definition at line 339 of file gtask-cell-renderer-basic.c.

Referenced by eel_string_ellipsize_end().

#define GTASK_CELL_RENDERER_BASIC obj   ) 
 

Value:

(G_TYPE_CHECK_INSTANCE_CAST( (obj), \
                                           GTASK_CELL_RENDERER_BASIC_TYPE, \
                                           GTaskCellRendererBasic ))
casts the passed in object to a GTaskCellRendererBasic

Definition at line 20 of file gtask-cell-renderer-basic.h.

Referenced by gtask_cell_renderer_basic_finalize(), gtask_cell_renderer_basic_get_property(), gtask_cell_renderer_basic_get_size(), gtask_cell_renderer_basic_render(), and gtask_cell_renderer_basic_set_property().

#define GTASK_CELL_RENDERER_BASIC_CLASS klass   ) 
 

Value:

(G_TYPE_CHECK_CLASS_CAST( (klass), \
                                           GTASK_CELL_RENDERER_BASIC_TYPE, \
                                           GTaskCellRendererBasicClass ))
casts the passed in object to a GTaskCellRendererBasicClass

Definition at line 25 of file gtask-cell-renderer-basic.h.

#define GTASK_CELL_RENDERER_BASIC_GET_CLASS obj   ) 
 

Value:

(G_TYPE_INSTANCE_GET_CLASS( (obj), \
                                           GTASK_CELL_RENDERER_BASIC_TYPE, \
                                           GTaskCellRendererBasicClass ))

Definition at line 45 of file gtask-cell-renderer-basic.h.

#define GTASK_CELL_RENDERER_BASIC_TYPE   (gtask_cell_renderer_basic_get_type())
 

returns the GType of GTaskCellRendererBasic

Definition at line 17 of file gtask-cell-renderer-basic.h.

Referenced by gtask_cell_renderer_basic_new().

#define GTASK_IS_CELL_RENDERER_BASIC obj   ) 
 

Value:

(G_TYPE_CHECK_INSTANCE_TYPE( (obj), \
                                           GTASK_CELL_RENDERER_BASIC_TYPE ))
returns TRUE if the passed in object is a GTaskCellRenderer FALSE otherwise

Definition at line 34 of file gtask-cell-renderer-basic.h.

#define GTASK_IS_CELL_RENDERER_BASIC_CLASS klass   ) 
 

Value:

(G_TYPE_CHECK_CLASS_TYPE( (klass), \
                                           GTASK_CELL_RENDERER_BASIC_TYPE ))
returns TRUE if the passed in object is a GTaskCellRendererBasicClass FALSE otherwise

Definition at line 41 of file gtask-cell-renderer-basic.h.

#define PADDING   6
 

Definition at line 17 of file gtask-cell-renderer-basic.c.

Referenced by gtask_cell_renderer_basic_get_size(), gtask_cell_renderer_basic_get_sizing_info(), and gtask_cell_renderer_basic_render().


Typedef Documentation

typedef struct _GTaskBasicInfo GTaskBasicInfo
 

Referenced by gtask_basic_info_free(), gtask_cell_renderer_basic_fill_text_info(), gtask_cell_renderer_basic_get_size(), gtask_cell_renderer_basic_get_sizing_info(), and gtask_cell_renderer_basic_render().

typedef struct _GTaskCellRendererBasic GTaskCellRendererBasic
 

Definition at line 12 of file gtask-cell-renderer-basic.h.

Referenced by gtask_cell_renderer_basic_fill_text_info(), gtask_cell_renderer_basic_finalize(), gtask_cell_renderer_basic_get_property(), gtask_cell_renderer_basic_get_size(), gtask_cell_renderer_basic_get_sizing_info(), gtask_cell_renderer_basic_get_type(), gtask_cell_renderer_basic_init(), gtask_cell_renderer_basic_render(), and gtask_cell_renderer_basic_set_property().

typedef struct _GTaskCellRendererBasicClass GTaskCellRendererBasicClass
 

Definition at line 13 of file gtask-cell-renderer-basic.h.

Referenced by gtask_cell_renderer_basic_class_init(), and gtask_cell_renderer_basic_get_type().

typedef struct _GTaskCellRendererBasicPrivate GTaskCellRendererBasicPrivate
 

Definition at line 14 of file gtask-cell-renderer-basic.h.

Referenced by gtask_cell_renderer_basic_fill_text_info(), gtask_cell_renderer_basic_get_property(), gtask_cell_renderer_basic_get_sizing_info(), gtask_cell_renderer_basic_init(), gtask_cell_renderer_basic_render(), and gtask_cell_renderer_basic_set_property().


Enumeration Type Documentation

anonymous enum
 

Enumeration values:
PROP_0 
C_PROP_PROGRESS 
C_PROP_TITLE 
C_PROP_STATUS_MESSAGE 
C_PROP_ACTIVITY_STATE 
C_PROP_TIME_LEFT 
C_PROP_PREVIEW 
C_PROP_PREVIEW_IS_THUMB 
C_PROP_THUMBNAIL_FRAME 

Definition at line 19 of file gtask-cell-renderer-basic.c.


Function Documentation

void compute_character_widths const char *  format_string,
const char *  string,
PangoLayout *  layout,
int *  char_len_return,
int **  widths_return,
int **  cuts_return
[static]
 

Definition at line 356 of file gtask-cell-renderer-basic.c.

Referenced by eel_string_ellipsize_end().

char* eel_string_ellipsize_end const char *  format_string,
const char *  string,
PangoLayout *  layout,
int  width
[static]
 

Definition at line 450 of file gtask-cell-renderer-basic.c.

References compute_character_widths(), ELLIPSIS, and measure_string_width().

Referenced by gtask_cell_renderer_basic_fill_text_info().

void gtask_basic_info_free GTaskBasicInfo info  )  [static]
 

Definition at line 648 of file gtask-cell-renderer-basic.c.

References _GTaskBasicInfo::actions_layout, GTaskBasicInfo, _GTaskBasicInfo::status, _GTaskBasicInfo::status_prefix, _GTaskBasicInfo::time, _GTaskBasicInfo::time_prefix, and _GTaskBasicInfo::title.

Referenced by gtask_cell_renderer_basic_get_size(), and gtask_cell_renderer_basic_render().

void gtask_cell_renderer_basic_class_init GTaskCellRendererBasicClass klass  )  [static]
 

Definition at line 175 of file gtask-cell-renderer-basic.c.

References C_PROP_ACTIVITY_STATE, C_PROP_PREVIEW, C_PROP_PREVIEW_IS_THUMB, C_PROP_PROGRESS, C_PROP_STATUS_MESSAGE, C_PROP_THUMBNAIL_FRAME, C_PROP_TIME_LEFT, C_PROP_TITLE, gtask_cell_renderer_basic_finalize(), gtask_cell_renderer_basic_get_property(), gtask_cell_renderer_basic_get_size(), gtask_cell_renderer_basic_render(), gtask_cell_renderer_basic_set_property(), GTaskCellRendererBasicClass, and parent_class.

Referenced by gtask_cell_renderer_basic_get_type().

void gtask_cell_renderer_basic_fill_text_info GTaskCellRendererBasic cell,
GTaskBasicInfo info,
GtkWidget *  widget,
gint  center_width
[static]
 

Todo:
check if there is an error message set and display that in some error color -- perhaps bold red? -- and Info: should be replaced with Error:

Definition at line 577 of file gtask-cell-renderer-basic.c.

References eel_string_ellipsize_end(), GTaskBasicInfo, GTaskCellRendererBasic, GTaskCellRendererBasicPrivate, _GTaskCellRendererBasic::private, _GTaskBasicInfo::status, _GTaskBasicInfo::status_width, _GTaskBasicInfo::time, _GTaskBasicInfo::time_width, and _GTaskBasicInfo::title.

Referenced by gtask_cell_renderer_basic_render().

void gtask_cell_renderer_basic_finalize GObject *  object  )  [static]
 

Definition at line 879 of file gtask-cell-renderer-basic.c.

References GTASK_CELL_RENDERER_BASIC, GTaskCellRendererBasic, parent_class, and _GTaskCellRendererBasic::private.

Referenced by gtask_cell_renderer_basic_class_init().

void gtask_cell_renderer_basic_get_property GObject *  object,
guint  param_id,
GValue *  value,
GParamSpec *  pspec
[static]
 

Todo:
how will memory management work with this?

Definition at line 254 of file gtask-cell-renderer-basic.c.

References C_PROP_ACTIVITY_STATE, C_PROP_PREVIEW, C_PROP_PREVIEW_IS_THUMB, C_PROP_PROGRESS, C_PROP_STATUS_MESSAGE, C_PROP_TIME_LEFT, C_PROP_TITLE, GTASK_CELL_RENDERER_BASIC, GTaskCellRendererBasic, GTaskCellRendererBasicPrivate, and _GTaskCellRendererBasic::private.

Referenced by gtask_cell_renderer_basic_class_init().

void gtask_cell_renderer_basic_get_size GtkCellRenderer *  cell,
GtkWidget *  widget,
GdkRectangle *  cell_area,
gint *  x_offset,
gint *  y_offset,
gint *  width,
gint *  height
[static]
 

Definition at line 673 of file gtask-cell-renderer-basic.c.

References _GTaskBasicInfo::actions_width, gtask_basic_info_free(), GTASK_CELL_RENDERER_BASIC, gtask_cell_renderer_basic_get_sizing_info(), GTaskBasicInfo, GTaskCellRendererBasic, _GTaskBasicInfo::max_title_width, PADDING, _GTaskBasicInfo::preview_height, _GTaskBasicInfo::preview_width, _GTaskBasicInfo::status_height, _GTaskBasicInfo::text_spacer_height, _GTaskBasicInfo::text_spacer_width, and _GTaskBasicInfo::time_height.

Referenced by gtask_cell_renderer_basic_class_init().

GTaskBasicInfo * gtask_cell_renderer_basic_get_sizing_info GTaskCellRendererBasic cell,
GtkWidget *  widget,
guint  x,
guint  y
[static]
 

Definition at line 511 of file gtask-cell-renderer-basic.c.

References _GTaskBasicInfo::actions_height, _GTaskBasicInfo::actions_layout, _GTaskBasicInfo::actions_width, _GTaskBasicInfo::center_x, GTaskBasicInfo, GTaskCellRendererBasic, GTaskCellRendererBasicPrivate, _GTaskBasicInfo::max_title_width, PADDING, _GTaskBasicInfo::preview, _GTaskBasicInfo::preview_height, _GTaskBasicInfo::preview_width, _GTaskCellRendererBasic::private, _GTaskBasicInfo::right_x, _GTaskBasicInfo::status_height, _GTaskBasicInfo::status_prefix, _GTaskBasicInfo::status_width, _GTaskBasicInfo::text_spacer_height, _GTaskBasicInfo::text_spacer_width, _GTaskBasicInfo::time_height, _GTaskBasicInfo::time_prefix, _GTaskBasicInfo::time_width, _GTaskBasicInfo::title_height, and _GTaskBasicInfo::title_width.

Referenced by gtask_cell_renderer_basic_get_size(), and gtask_cell_renderer_basic_render().

GtkType gtask_cell_renderer_basic_get_type void   ) 
 

Definition at line 119 of file gtask-cell-renderer-basic.c.

References gtask_cell_renderer_basic_class_init(), gtask_cell_renderer_basic_init(), GTaskCellRendererBasic, and GTaskCellRendererBasicClass.

void gtask_cell_renderer_basic_init GTaskCellRendererBasic cell  )  [static]
 

Todo:
should we se our own default thumbnail frame or just let the user set it -- also -- eventually we need to handle frame theming like nautilus seems to do

Definition at line 145 of file gtask-cell-renderer-basic.c.

References GTaskCellRendererBasic, GTaskCellRendererBasicPrivate, and _GTaskCellRendererBasic::private.

Referenced by gtask_cell_renderer_basic_get_type().

GtkCellRenderer * gtask_cell_renderer_basic_new void   ) 
 

Definition at line 708 of file gtask-cell-renderer-basic.c.

References GTASK_CELL_RENDERER_BASIC_TYPE.

Referenced by gtask_view_create_basic_mode().

void gtask_cell_renderer_basic_render GtkCellRenderer *  cell,
GdkWindow *  window,
GtkWidget *  widget,
GdkRectangle *  background_area,
GdkRectangle *  cell_area,
GdkRectangle *  expose_area,
guint  flags
[static]
 

Todo:
the size of the progress bar may grow for larger fonts

cell renderers really need to have some sort of cache data associated with them so when know when we really need to redo this or not

-- do we need to do placement recalcs now?

properly place the progress bar based on it's size right now it's just set to 100

Definition at line 713 of file gtask-cell-renderer-basic.c.

References _GTaskBasicInfo::actions_layout, _GTaskCellRendererBasicPrivate::activity_state, _GTaskBasicInfo::center_x, gtask_basic_info_free(), GTASK_CELL_RENDERER_BASIC, gtask_cell_renderer_basic_fill_text_info(), gtask_cell_renderer_basic_get_sizing_info(), gtask_ui_draw_progressbar(), GTaskBasicInfo, GTaskCellRendererBasic, GTaskCellRendererBasicPrivate, PADDING, _GTaskBasicInfo::preview, _GTaskBasicInfo::preview_width, _GTaskCellRendererBasic::private, _GTaskCellRendererBasicPrivate::progress, _GTaskBasicInfo::status, _GTaskBasicInfo::status_height, _GTaskBasicInfo::status_prefix, _GTaskBasicInfo::status_width, _GTaskBasicInfo::text_spacer_height, _GTaskBasicInfo::time, _GTaskBasicInfo::time_height, _GTaskBasicInfo::time_prefix, _GTaskBasicInfo::time_width, and _GTaskBasicInfo::title.

Referenced by gtask_cell_renderer_basic_class_init().

void gtask_cell_renderer_basic_set_property GObject *  object,
guint  param_id,
const GValue *  value,
GParamSpec *  pspec
[static]
 

Definition at line 291 of file gtask-cell-renderer-basic.c.

References C_PROP_ACTIVITY_STATE, C_PROP_PREVIEW, C_PROP_PREVIEW_IS_THUMB, C_PROP_PROGRESS, C_PROP_STATUS_MESSAGE, C_PROP_TIME_LEFT, C_PROP_TITLE, GTASK_CELL_RENDERER_BASIC, GTaskCellRendererBasic, GTaskCellRendererBasicPrivate, and _GTaskCellRendererBasic::private.

Referenced by gtask_cell_renderer_basic_class_init().

int measure_string_width const char *  string,
PangoLayout *  layout
[static]
 

Definition at line 346 of file gtask-cell-renderer-basic.c.

Referenced by eel_string_ellipsize_end().


Variable Documentation

gpointer parent_class [static]
 

Definition at line 63 of file gtask-cell-renderer-basic.c.

Referenced by gtask_cell_renderer_basic_class_init(), and gtask_cell_renderer_basic_finalize().


Generated on Mon Feb 2 21:33:26 2004 for libgtask-ui by doxygen 1.3.4