Global Lender
A Pebble app for finding new and interesting loans on kiva.org
Data Structures | Typedefs | Functions
WndDataMenu.h File Reference
#include <pebble.h>
#include "libs/magpebapp.h"
Include dependency graph for WndDataMenu.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  WndDataMenu_Palette
 

Typedefs

typedef struct WndDataMenu_Palette WndDataMenu_Palette
 
typedef struct WndDataMenu WndDataMenu
 

Functions

MagPebApp_ErrCode WndDataMenu_updateView (WndDataMenu *this)
 
MagPebApp_ErrCode WndDataMenu_setNumSections (WndDataMenu *this, const uint16_t)
 
MagPebApp_ErrCode WndDataMenu_setSectionTitle (WndDataMenu *this, const uint16_t, const char *)
 
MagPebApp_ErrCode WndDataMenu_buildSection (WndDataMenu *this, const uint16_t, const uint16_t, const char *)
 
MagPebApp_ErrCode WndDataMenu_buildRow (WndDataMenu *this, const uint16_t, const uint16_t, const char *, const char *)
 
MagPebApp_ErrCode WndDataMenu_setPalette (WndDataMenu *this, const WndDataMenu_Palette)
 
MagPebApp_ErrCode WndDataMenu_push (WndDataMenu *this)
 
WndDataMenuWndDataMenu_create ()
 Creates a data menu window and pushes it on the window stack. More...
 
MagPebApp_ErrCode WndDataMenu_destroy (WndDataMenu *this)
 

Typedef Documentation

typedef struct WndDataMenu WndDataMenu

Function Documentation

MagPebApp_ErrCode WndDataMenu_buildRow ( WndDataMenu this,
const uint16_t  sectIdx,
const uint16_t  rowIdx,
const char *  rowTitle,
const char *  rowSubtitle 
)

Sets up a row in a section of this data menu.

A call to this function must be preceded by a call to buildSection to allocate the number of rows in this data menu section (default is 1).

Parameters
[in,out]thisPointer to the WndDataMenu "object"; must be already allocated.
[in]sectIdxThe index of the section that this function will build.
[in]rowIdxThe index of the row that this function will build.
[in]rowTitleThe title for this row. May be NULL.
[in]rowSubtitleThe subtitle for this section. May be NULL.
Returns
MPA_SUCCESS on success MPA_INVALID_INPUT_ERR if sectIdx is not a valid section index or rowIdx is not a valid row index in that section. MPA_NULL_POINTER_ERR if parameters this or this->sections are NULL upon entry.
MagPebApp_ErrCode WndDataMenu_buildSection ( WndDataMenu this,
const uint16_t  sectIdx,
const uint16_t  numRows,
const char *  headerTitle 
)

Sets up a section of this data menu.

A call to this function may be preceded by a call to setNumSections to indicate the number of sections in this data menu (default is 1). A call to this function should be followed by a call buildRow to setup the rows within this section.

Parameters
[in,out]thisPointer to the WndDataMenu "object"; must be already allocated.
[in]sectIdxThe index of the section that this function will build.
[in]numRowsIndicates the number of rows this section will contain.
[in]headerTitleThe title for this section. May be NULL.
Returns
MPA_SUCCESS on success MPA_INVALID_INPUT_ERR if sectIdx is not a valid section index MPA_NULL_POINTER_ERR if parameters this or this->sections are NULL upon entry.
WndDataMenu* WndDataMenu_create ( )

Creates a data menu window and pushes it on the window stack.

MagPebApp_ErrCode WndDataMenu_destroy ( WndDataMenu this)
MagPebApp_ErrCode WndDataMenu_push ( WndDataMenu this)
MagPebApp_ErrCode WndDataMenu_setNumSections ( WndDataMenu this,
const uint16_t  numSections 
)

Sets the number of sections for this data menu.

Parameters
[in,out]thisPointer to the WndDataMenu "object"; must be already allocated.
[in]numNumber of sections
MagPebApp_ErrCode WndDataMenu_setPalette ( WndDataMenu this,
const WndDataMenu_Palette   
)
MagPebApp_ErrCode WndDataMenu_setSectionTitle ( WndDataMenu this,
const uint16_t  sectIdx,
const char *  headerTitle 
)

Sets the title for a section of this data menu.

Parameters
[in,out]thisPointer to the WndDataMenu "object"; must be already allocated.
[in]sectIdxThe index of the section that this function will build.
[in]headerTitleThe title for this section. May be NULL.
Returns
MPA_SUCCESS on success MPA_INVALID_INPUT_ERR if sectIdx is not a valid section index MPA_NULL_POINTER_ERR if parameters this or this->sections are NULL upon entry.
MagPebApp_ErrCode WndDataMenu_updateView ( WndDataMenu this)