Foodolini.Activities.ShoppingListItemAdapter Class Reference

Adapts a ShoppingListItem to the TreeNode interface, and adds methods for printing. More...

List of all members.

Public Member Functions

 ShoppingListItemAdapter (ShoppingListItem item)
double SetupLayout (PrintContext context)
 Setup the layout for printing.
double AdjustWidth (double qColWidth, double dColWidth)
 Adjust the size of the columns.
bool NextPage (double width, double height)
 Check if there's room for this row on the current page.
double Render (Cairo.Context context, Cairo.PointD position, double qColWidth)
 Render this row onto a Cairo.Context.

Properties

ShoppingListItem Item [get, set]
string Recipe [get]
string Ingredient [get]
double Quantity [get, set]

Detailed Description

Adapts a ShoppingListItem to the TreeNode interface, and adds methods for printing.

Definition at line 11 of file ShoppingListItemAdapter.cs.


Constructor & Destructor Documentation

Foodolini.Activities.ShoppingListItemAdapter.ShoppingListItemAdapter ( ShoppingListItem  item  ) 

Definition at line 16 of file ShoppingListItemAdapter.cs.


Member Function Documentation

double Foodolini.Activities.ShoppingListItemAdapter.AdjustWidth ( double  qColWidth,
double  dColWidth 
)

Adjust the size of the columns.

Parameters:
qColWidth Size of the quantity column
dColWidth Size of the description column
Returns:
The total height consumed by this row

Definition at line 94 of file ShoppingListItemAdapter.cs.

Here is the caller graph for this function:

bool Foodolini.Activities.ShoppingListItemAdapter.NextPage ( double  width,
double  height 
)

Check if there's room for this row on the current page.

Parameters:
width Available width
height Available height
Returns:
True, if this row should be moved the next page

Definition at line 115 of file ShoppingListItemAdapter.cs.

Here is the caller graph for this function:

double Foodolini.Activities.ShoppingListItemAdapter.Render ( Cairo.Context  context,
Cairo.PointD  position,
double  qColWidth 
)

Render this row onto a Cairo.Context.

Parameters:
context Context this row should be rendered on
position The position this row should be rendered to
qColWidth Size of the quantity column
Returns:
The height of the row

Definition at line 137 of file ShoppingListItemAdapter.cs.

Here is the caller graph for this function:

double Foodolini.Activities.ShoppingListItemAdapter.SetupLayout ( PrintContext  context  ) 

Setup the layout for printing.

Returns:
Width of the quantity column

Definition at line 65 of file ShoppingListItemAdapter.cs.

Here is the caller graph for this function:


Property Documentation

string Foodolini.Activities.ShoppingListItemAdapter.Ingredient [get]

Definition at line 31 of file ShoppingListItemAdapter.cs.

ShoppingListItem Foodolini.Activities.ShoppingListItemAdapter.Item [get, set]

Definition at line 14 of file ShoppingListItemAdapter.cs.

double Foodolini.Activities.ShoppingListItemAdapter.Quantity [get, set]

Definition at line 38 of file ShoppingListItemAdapter.cs.

string Foodolini.Activities.ShoppingListItemAdapter.Recipe [get]

Definition at line 21 of file ShoppingListItemAdapter.cs.


The documentation for this class was generated from the following file:

Generated on Thu Dec 10 14:04:19 2009 for Foodolini by  doxygen 1.6.1