Foodolini.Activities.ShoppingList.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

new
Foodolini.BusinessLogic.ShoppingListItem 
Item [get, set]
string Recipe [get]
string Ingredient [get]
double Quantity [get, set]

Private Attributes

Pango.Layout qCol
 Quantity column.
Pango.Layout dCol
 Description column.

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.ShoppingList.ShoppingListItemAdapter.ShoppingListItemAdapter ( ShoppingListItem  item  ) 

Definition at line 16 of file ShoppingListItemAdapter.cs.


Member Function Documentation

double Foodolini.Activities.ShoppingList.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.

bool Foodolini.Activities.ShoppingList.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.

double Foodolini.Activities.ShoppingList.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.

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

Setup the layout for printing.

Returns:
Width of the quantity column

Definition at line 65 of file ShoppingListItemAdapter.cs.


Member Data Documentation

Description column.

Definition at line 57 of file ShoppingListItemAdapter.cs.

Quantity column.

Definition at line 52 of file ShoppingListItemAdapter.cs.


Property Documentation

string Foodolini.Activities.ShoppingList.ShoppingListItemAdapter.Ingredient [get]

Definition at line 31 of file ShoppingListItemAdapter.cs.

new Foodolini.BusinessLogic.ShoppingListItem Foodolini.Activities.ShoppingList.ShoppingListItemAdapter.Item [get, set]

Definition at line 14 of file ShoppingListItemAdapter.cs.

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

Definition at line 38 of file ShoppingListItemAdapter.cs.

string Foodolini.Activities.ShoppingList.ShoppingListItemAdapter.Recipe [get]

Definition at line 21 of file ShoppingListItemAdapter.cs.


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

Foodolini 1.0.0 Documentation, generated with DoxyGen.