Main Page | Namespace List | Class Hierarchy | Class List | File List | Namespace Members | Class Members | File Members | Related Pages

container Struct Reference

#include <fack.hpp>

Inheritance diagram for container:

popup obj_or_concept List of all members.

Public Member Functions

pt< container_pick_resultitem_at_screen_pos (int_pair pos, pt< popup > me_as_a_smart_ptr) const
 container (string readable_name, pt< can_appear_closed_in_inv > pick_up_info, SDL_Rect drop_in_area, SDL_Surface *picture, const list< pos_and< pt< obj_or_concept > > > &sorted_items, int_pair position_in_screen, variant< SDL_Rect, cannot_be_closed > closing_area, container_type type, bool can_be_dragged)
SDL_Surface * get_inv_surf () const
void add_item (const pt< obj_or_concept > i)
void remove_item_not_recursively (const pt< obj_or_concept > i)
void remove_item_recursively (const pt< obj_or_concept > i)
void add_item_in_pos (pos_and< pt< obj_or_concept > > obj_and_pos)
bool can_contain_this_obj (pt< obj_or_concept > o) const
bool can_be_moved_across_containers () const
void render (SDL_Surface *screen, const pt< game_state_t > game_state) const

Public Attributes

container_type type
SDL_Rect drop_in_area
bool can_be_dragged
list< pos_and< pt< obj_or_concept > > > sorted_items

Private Member Functions

bool remove_item_aux (const pt< obj_or_concept > item)
bool remove_item_rec_aux (const pt< obj_or_concept > item)

Constructor & Destructor Documentation

container::container string  readable_name,
pt< can_appear_closed_in_inv pick_up_info,
SDL_Rect  drop_in_area,
SDL_Surface *  picture,
const list< pos_and< pt< obj_or_concept > > > &  sorted_items,
int_pair  position_in_screen,
variant< SDL_Rect, cannot_be_closed closing_area,
container_type  type,
bool  can_be_dragged
[inline]
 

Definition at line 1037 of file fack.hpp.

References sorted_items.


Member Function Documentation

void container::add_item const pt< obj_or_concept i  ) 
 

Definition at line 4901 of file fack.cc.

References drop_in_area, and sorted_items.

void container::add_item_in_pos pos_and< pt< obj_or_concept > >  obj_and_pos  ) 
 

Definition at line 4998 of file fack.cc.

References sorted_items.

bool container::can_be_moved_across_containers  )  const [virtual]
 

Implements obj_or_concept.

Definition at line 5102 of file fack.cc.

bool container::can_contain_this_obj pt< obj_or_concept o  )  const
 

Definition at line 5070 of file fack.cc.

References CAN_CONTAIN_ANYTHING, CONCEPTS, PHYS_OBJECTS, pt_cast(), and type.

SDL_Surface* container::get_inv_surf  )  const [inline, virtual]
 

Implements obj_or_concept.

Definition at line 1060 of file fack.hpp.

pt< container_pick_result > container::item_at_screen_pos int_pair  pos,
pt< popup me_as_a_smart_ptr
const [virtual]
 

Implements popup.

Definition at line 688 of file fack.cc.

References can_be_dragged, NEW, point_in_rect(), sorted_items, var_cast(), int_pair::x, and int_pair::y.

bool container::remove_item_aux const pt< obj_or_concept item  )  [private]
 

Todo:
pointer equality

Definition at line 4932 of file fack.cc.

References foreach, and sorted_items.

Referenced by remove_item_rec_aux().

void container::remove_item_not_recursively const pt< obj_or_concept item  ) 
 

Todo:
pointer equality

Definition at line 4911 of file fack.cc.

References foreach, and sorted_items.

bool container::remove_item_rec_aux const pt< obj_or_concept item  )  [private]
 

Definition at line 4952 of file fack.cc.

References foreach, pt_cast(), remove_item_aux(), and sorted_items.

Referenced by remove_item_recursively().

void container::remove_item_recursively const pt< obj_or_concept i  ) 
 

Definition at line 4986 of file fack.cc.

References remove_item_rec_aux().

void container::render SDL_Surface *  screen,
const pt< game_state_t game_state
const [virtual]
 

Implements popup.

Definition at line 3202 of file fack.cc.

References foreach, pt_cast(), int_pair::x, and int_pair::y.


Member Data Documentation

bool container::can_be_dragged
 

Definition at line 1028 of file fack.hpp.

Referenced by item_at_screen_pos().

SDL_Rect container::drop_in_area
 

Definition at line 1027 of file fack.hpp.

Referenced by add_item().

list<pos_and<pt<obj_or_concept> > > container::sorted_items
 

Definition at line 1029 of file fack.hpp.

Referenced by add_item(), add_item_in_pos(), container(), item_at_screen_pos(), remove_item_aux(), remove_item_not_recursively(), and remove_item_rec_aux().

container_type container::type
 

Definition at line 1026 of file fack.hpp.

Referenced by can_contain_this_obj().


The documentation for this struct was generated from the following files:
Generated on Wed May 25 15:36:08 2005 for FACK by  doxygen 1.4.0