Adapts a ShoppingListItem to the TreeNode interface, and adds methods for printing. More...
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] |
Adapts a ShoppingListItem to the TreeNode interface, and adds methods for printing.
Definition at line 11 of file ShoppingListItemAdapter.cs.
Foodolini.Activities.ShoppingListItemAdapter.ShoppingListItemAdapter | ( | ShoppingListItem | item | ) |
Definition at line 16 of file ShoppingListItemAdapter.cs.
double Foodolini.Activities.ShoppingListItemAdapter.AdjustWidth | ( | double | qColWidth, | |
double | dColWidth | |||
) |
Adjust the size of the columns.
qColWidth | Size of the quantity column | |
dColWidth | Size of the description column |
Definition at line 94 of file ShoppingListItemAdapter.cs.
bool Foodolini.Activities.ShoppingListItemAdapter.NextPage | ( | double | width, | |
double | height | |||
) |
Check if there's room for this row on the current page.
width | Available width | |
height | Available height |
Definition at line 115 of file ShoppingListItemAdapter.cs.
double Foodolini.Activities.ShoppingListItemAdapter.Render | ( | Cairo.Context | context, | |
Cairo.PointD | position, | |||
double | qColWidth | |||
) |
Render this row onto a Cairo.Context.
context | Context this row should be rendered on | |
position | The position this row should be rendered to | |
qColWidth | Size of the quantity column |
Definition at line 137 of file ShoppingListItemAdapter.cs.
double Foodolini.Activities.ShoppingListItemAdapter.SetupLayout | ( | PrintContext | context | ) |
Setup the layout for printing.
Definition at line 65 of file ShoppingListItemAdapter.cs.
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.