Main Page   Alphabetical List   Data Structures   File List   Data Fields   Globals  

gadget_Group.c File Reference

#include <stdlib.h>
#include "debug.h"
#include "classes.h"
#include "Memory.h"
#include "Bases.h"
#include "Module.h"
#include "Common.h"
#include "gadgets/gadget_Group.h"

Include dependency graph for gadget_Group.c:

Include dependency graph

Go to the source code of this file.

Data Structures

struct  _group
struct  gadget_stat

Defines

#define ERR_NOTYPE   "No orientation given"
#define ERR_BADID   "Bad ID given"
#define ERR_BADSIZE   "Bad size given for layout"
#define ERR_DONT_SUGGEST_LARGER_SIZE   "Don't suggest larger size"
#define ERR_BADGADEV   "Bad Gadget_t event arrived"
#define MIN   0
#define MAX   1

Functions

u32 group_add_gadget (Gadget_t *this_gadget, tag *taglist)
u32 group_add_gadget_tail (Gadget_t *this_gadget, tag *taglist)
u32 group_remove_gadget (Gadget_t *this_gadget, tag *taglist)
u32 group_get_gadget (Gadget_t *this_gadget, tag *taglist)
u32 group_resize (Gadget_t *this_gadget, tag *taglist)
u32 group_get_size (Gadget_t *this_gadget, tag *taglist)
u32 group_invalidate_size (Gadget_t *this_gadget, tag *taglist)
 VERSION ("Group.gadget", 1, 0,"Gergely Gati","g.gati @freemail.hu")
void group_real_get_extent (Gadget_t *this, Extent_t *min, Extent_t *max)
void group_get_extent (Gadget_t *this, Extent_t *min, Extent_t *max)
void group_damage (Gadget_t *this, Rect_t *rect)
int group_calculate_layout_sizes (group *this, Rect_t *rect)
void group_suggest_extent (Gadget_t *this, Rect_t *rect)
void group_layout (Gadget_t *this, Rect_t *rect)
int group_input_event_handler (Gadget_t *gad, struct glw_Event *event)
int group_init_gadget (Gadget_t *this, tag *taglist)
void group_delete_gadget (Gadget_t *this)
int group_gadget_event_handler (Gadget_t *this, int event, tag *taglist)
void init_group_class (u32 module)
EXPORT int module_Init (u32 module, bases_Modules_t *bases)

Variables

bases_Modules_tapi
gadget_Method_t methods []
gadget_Binding_t binding []


Define Documentation

#define ERR_BADGADEV   "Bad Gadget_t event arrived"
 

Definition at line 43 of file gadget_Group.c.

#define ERR_BADID   "Bad ID given"
 

Definition at line 40 of file gadget_Group.c.

#define ERR_BADSIZE   "Bad size given for layout"
 

Definition at line 41 of file gadget_Group.c.

#define ERR_DONT_SUGGEST_LARGER_SIZE   "Don't suggest larger size"
 

Definition at line 42 of file gadget_Group.c.

Referenced by group_calculate_layout_sizes.

#define ERR_NOTYPE   "No orientation given"
 

Definition at line 39 of file gadget_Group.c.

#define MAX   1
 

Definition at line 46 of file gadget_Group.c.

Referenced by group_calculate_layout_sizes.

#define MIN   0
 

Definition at line 45 of file gadget_Group.c.

Referenced by group_calculate_layout_sizes.


Function Documentation

u32 group_add_gadget Gadget_t   this_gadget,
tag   taglist
[static]
 

Definition at line 555 of file gadget_Group.c.

References u32.

u32 group_add_gadget_tail Gadget_t   this_gadget,
tag   taglist
[static]
 

Definition at line 550 of file gadget_Group.c.

References u32.

int group_calculate_layout_sizes group   this,
Rect_t   rect
[static]
 

Definition at line 241 of file gadget_Group.c.

References _group::act_rect, Gadget_s::class_data, gadget_stat::counted_rect, gadget_stat::curr, debug_Begin, debug_End, debug_Error, debug_Message, ERR_DONT_SUGGEST_LARGER_SIZE, gadget_ClassData_t::flags, gadget_stat::gad, GAD_INVISIBLE, bases_modules_s::gadget_Call, _group::gadget_count, GADGET_FIRST_CHILD, GADGET_GET_EXTENT, Gadget_s::gadget_id, GADGET_RIGHT_BROTHER, GADGET_SUGGEST_EXTENT, GRP_ORIENTATION_HORIZONTAL, GRP_ORIENTATION_VERTICAL, Extent_t::height, Rect_t::height, gadget_stat::in_race, Rect_t::left, gadget_stat::limit, MAX, gadget_stat::maxsize, mem_malloc, min, MIN, gadget_stat::minsize, NULL, TAG_DONE, TAG_GADGET_MAX, TAG_GADGET_MIN, TAG_GADGET_OBJECT, TAG_GADGET_RECT, Rect_t::top, gadget_stat::weight, Gadget_s::weight, Extent_t::width, and Rect_t::width.

Referenced by group_layout, and group_suggest_extent.

void group_damage Gadget_t   this,
Rect_t   rect
[static]
 

Definition at line 220 of file gadget_Group.c.

References gadget_stat::counted_rect, debug_Begin, debug_End, gadget_stat::gad, _group::gad_stat, bases_modules_s::gadget_Call, _group::gadget_count, GADGET_DAMAGE, GUI_CALCULATEOVERLAP, bases_modules_s::gui_Call, GUI_ISOVERLAP, TAG_DONE, TAG_GADGET_OBJECT, TAG_GADGET_RECT, TAG_GUI_R1, TAG_GUI_R2, and TAG_GUI_R3.

Referenced by group_gadget_event_handler.

void group_delete_gadget Gadget_t   this [static]
 

Definition at line 534 of file gadget_Group.c.

References mem_free, and NULL.

Referenced by group_gadget_event_handler.

int group_gadget_event_handler Gadget_t   this,
int    event,
tag   taglist
[static]
 

Definition at line 604 of file gadget_Group.c.

References debug_Begin, debug_End, GADEV_DAMAGE, GADEV_DELETE_GADGET, GADEV_GET_EXTENT, GADEV_INIT_GADGET, GADEV_LAYOUT, GADEV_RESTORE, GADEV_SAVE, GADEV_SUGGEST_EXTENT, bases_modules_s::glw_Call, group_damage, group_delete_gadget, group_get_extent, group_init_gadget, group_layout, group_suggest_extent, max, mem_malloc, min, NULL, TAG_DONE, TAG_GAD_EXTMAX, TAG_GAD_EXTMIN, TAG_GAD_RECT, TAG_GADGET_MEM, TAG_GADGET_SIZE, tag_GetTagData, u32, and u8.

Referenced by init_group_class.

void group_get_extent Gadget_t   this,
Extent_t   min,
Extent_t   max
[static]
 

Definition at line 192 of file gadget_Group.c.

References debug_Begin, debug_End, debug_Message, Gadget_s::gadget_id, group_real_get_extent, Extent_t::height, max, min, NULL, and Extent_t::width.

Referenced by group_gadget_event_handler.

u32 group_get_gadget Gadget_t   this_gadget,
tag   taglist
[static]
 

Definition at line 573 of file gadget_Group.c.

References u32.

u32 group_get_size Gadget_t   this_gadget,
tag   taglist
[static]
 

Definition at line 592 of file gadget_Group.c.

References u32.

int group_init_gadget Gadget_t   this,
tag   taglist
[static]
 

Definition at line 514 of file gadget_Group.c.

References debug_Begin, debug_End, NULL, tag_GetTagData, TAG_GRP_BORDERSIZE, TAG_GRP_GAPSIZE, TAG_GRP_ORIENTATION, and TAG_GRP_SIZE.

Referenced by group_gadget_event_handler.

int group_input_event_handler Gadget_t   gad,
struct glw_Event   event
[static]
 

Definition at line 484 of file gadget_Group.c.

References debug_Begin, debug_End, glw_Event::event, and Gadget_s::gadget_id.

Referenced by init_group_class.

u32 group_invalidate_size Gadget_t   this_gadget,
tag   taglist
[static]
 

Definition at line 598 of file gadget_Group.c.

References NULL, and u32.

void group_layout Gadget_t   this,
Rect_t   rect
[static]
 

Definition at line 465 of file gadget_Group.c.

References debug_Begin, debug_End, debug_Message, bases_modules_s::gadget_Call, Gadget_s::gadget_id, GADGET_LAYOUT, group_calculate_layout_sizes, Rect_t::height, TAG_DONE, TAG_GADGET_OBJECT, TAG_GADGET_RECT, and Rect_t::width.

Referenced by group_gadget_event_handler.

void group_real_get_extent Gadget_t   this,
Extent_t   min,
Extent_t   max
[static]
 

Definition at line 117 of file gadget_Group.c.

References Gadget_s::class_data, gadget_ClassData_t::class_name, debug_Begin, debug_End, debug_Message, gadget_ClassData_t::flags, GAD_INVISIBLE, bases_modules_s::gadget_Call, GADGET_FIRST_CHILD, GADGET_GET_EXTENT, Gadget_s::gadget_id, GADGET_MAXIMUM_SIZE, GADGET_RIGHT_BROTHER, GRP_ORIENTATION_HORIZONTAL, GRP_ORIENTATION_VERTICAL, GRP_SIZE_FIXED_HEIGHT, GRP_SIZE_FIXED_WIDTH, Extent_t::height, max, min, NULL, TAG_DONE, TAG_GADGET_MAX, TAG_GADGET_MIN, TAG_GADGET_OBJECT, and Extent_t::width.

Referenced by group_get_extent.

u32 group_remove_gadget Gadget_t   this_gadget,
tag   taglist
[static]
 

Definition at line 564 of file gadget_Group.c.

References u32.

u32 group_resize Gadget_t   this_gadget,
tag   taglist
[static]
 

Definition at line 583 of file gadget_Group.c.

References u32.

void group_suggest_extent Gadget_t   this,
Rect_t   rect
[static]
 

Definition at line 443 of file gadget_Group.c.

References debug_Begin, debug_End, group_calculate_layout_sizes, Rect_t::height, and Rect_t::width.

Referenced by group_gadget_event_handler.

void init_group_class u32    module [static]
 

Definition at line 708 of file gadget_Group.c.

References CLASS_GROUP_ID, CLASS_GROUP_NAME, bases_modules_s::gadget_Call, GADGET_REGISTER_CLASS, GADSTF_NORMAL, group_gadget_event_handler, group_input_event_handler, NULL, TAG_DONE, TAG_GADGET_BINDING, TAG_GADGET_CLASS_ID, TAG_GADGET_COLOR_NAMES, TAG_GADGET_CUSTOM_NAMES, TAG_GADGET_EVENT_HANDLER, TAG_GADGET_GADGET_EVENT_HANDLER, TAG_GADGET_GADGET_SIZE, TAG_GADGET_INPUT_EVENT_HANDLER, TAG_GADGET_METHODS, TAG_GADGET_MODULE, TAG_GADGET_NAME, TAG_GADGET_STATE_MASK, and u32.

Referenced by module_Init.

EXPORT int module_Init u32    module,
bases_Modules_t   bases
 

Definition at line 727 of file gadget_Group.c.

References EXPORT, init_group_class, and u32.

VERSION "Group.gadget"   ,
 ,
 ,
"Gergely Gati"   ,
"g.gati @freemail.hu"   
 


Variable Documentation

bases_Modules_t* api [static]
 

Definition at line 86 of file gadget_Group.c.

gadget_Binding_t binding[] [static]
 

Initial value:

{
  {"orientation",TAG_GRP_ORIENTATION,GADGET_SELECT,"horizontal|vertical|matrix"},
  {"gapsize",TAG_GRP_GAPSIZE,GADGET_INT,NULL},
  {"bordersize",TAG_GRP_BORDERSIZE,GADGET_INT,NULL},
  {"size",TAG_GRP_SIZE,GADGET_SELECT,"flexible|fixed_width|fixed_height|fixed"},
  GADGET_BINDING_DONE
}

Definition at line 102 of file gadget_Group.c.

gadget_Method_t methods[] [static]
 

Initial value:

{
  {"add_gadget",group_add_gadget,0L},
  {"add_gadget_tail",group_add_gadget_tail,0L},
  {"remove_gadget",group_remove_gadget,0L},
  {"get_gadget",group_get_gadget,0L},
  {"resize",group_resize,0L},
  {"get_size",group_get_size,0L},
  {"invalidate_size",group_invalidate_size,0L},
  GADGET_METHOD_DONE
}

Definition at line 89 of file gadget_Group.c.


Generated on Tue Jan 7 12:11:56 2003 for THEGUI by doxygen1.2.14 written by Dimitri van Heesch, © 1997-2002