MorePalmOS
A development library for developing Palm OS applications

MoreList.c File Reference

#include "MorePrefix.h"
#include "MoreList.h"
#include "MoreControl.h"
#include "MoreForm.h"
#include "MorePrivate.h"

Include dependency graph for MoreList.c:

Include dependency graph

Go to the source code of this file.


Functions

ListType * MLstGetPtrByIdxSafely (const FormType *formP, FrmObjectIdx_t idx)
ListType * MLstGetPtrByIDSafely (const FormType *formP, FrmObjectID_t id)
ListType * MLstGetPtrByObjPtrSafely (const FormType *formP, FrmObject_t *objectP)
ListType * MLstGetPtrByIdx (const FormType *formP, FrmObjectIdx_t idx)
ListType * MLstGetPtrByID (const FormType *formP, FrmObjectID_t ID)
ListType * MLstGetPtrByObjPtr (FrmObject_t *ptr)
Int16 MLstGetSelectionByID (FormType *formP, FrmObjectID_t listID)
 Retrive selection for a list specified by ID.
Int16 MLstGetSelectionByIdx (FormType *formP, FrmObjectIdx_t listIdx)
 Retrive selection for a list specified by index.
void MLstSetTriggerAndListValueIdxByIdx (FormType *formP, FrmObjectIdx_t triggerIdx, FrmObjectIdx_t listIdx, CtlValue_t item)
 Sets trigger and list value.
void MLstSetTriggerAndListValueIdxByID (FormType *formP, FrmObjectID_t triggerID, FrmObjectID_t listID, CtlValue_t item)
 Sets trigger and list value.
void MLstSetTriggerValueByIdx (FormType *formP, FrmObjectIdx_t triggerIdx, FrmObjectIdx_t listIdx, CtlValue_t item)
 Sets trigger value.
void MLstSetTriggerValueByID (FormType *formP, FrmObjectID_t triggerID, FrmObjectID_t listID, CtlValue_t item)
void MLstSetTriggerValueByPtr (FormType *formP, void *triggerP, void *listP, CtlValue_t item)
 Sets trigger value.

Function Documentation

ListType* MLstGetPtrByID const FormType *  formP,
FrmObjectID_t  ID
 

Definition at line 53 of file MoreList.c.

00054 {
00055         return ( ListType* ) MFrmGetObjPtrByID( formP, ID );
00056 }

ListType* MLstGetPtrByIDSafely const FormType *  formP,
FrmObjectID_t  id
 

Definition at line 32 of file MoreList.c.

00033 {
00034         return ( ListType* ) MFrmGetObjPtrOfTypeByID( formP, id, frmListObj );
00035 }

ListType* MLstGetPtrByIdx const FormType *  formP,
FrmObjectIdx_t  idx
 

Definition at line 48 of file MoreList.c.

00049 {
00050         return ( ListType* ) MFrmGetObjPtrByIdx( formP, idx );
00051 }

ListType* MLstGetPtrByIdxSafely const FormType *  formP,
FrmObjectIdx_t  idx
 

Definition at line 27 of file MoreList.c.

00028 {
00029         return ( ListType* ) MFrmGetObjPtrOfTypeByIdx( formP, idx, frmListObj );
00030 }

ListType* MLstGetPtrByObjPtr FrmObject_t ptr  ) 
 

Definition at line 58 of file MoreList.c.

00059 {
00060         return ( ListType* ) ptr;
00061 }

ListType* MLstGetPtrByObjPtrSafely const FormType *  formP,
FrmObject_t objectP
 

Definition at line 37 of file MoreList.c.

00038 {
00039         return ( ListType* ) MFrmGetObjPtrOfTypeByPtr( formP, objectP, frmListObj );
00040 }

Int16 MLstGetSelectionByID FormType *  formP,
FrmObjectID_t  listId
 

Retrive selection for a list specified by ID.

Returns a 0-based value indicating which item is selected.

Definition at line 67 of file MoreList.c.

00068 {
00069         _validate_object_id( formP, listID );
00070         return LstGetSelection(
00071                         _validate_object_ptr( MLstGetPtrByID( formP, listID ) ) );
00072 }

Int16 MLstGetSelectionByIdx FormType *  formP,
FrmObjectIdx_t  listIdx
 

Retrive selection for a list specified by index.

Returns a 0-based value indicating which item is selected.

Definition at line 74 of file MoreList.c.

00075 {
00076         _validate_object_idx( formP, listIdx );
00077         return LstGetSelection( MLstGetPtrByIdx( formP, listIdx ) );
00078 }

void MLstSetTriggerAndListValueIdxByID FormType *  formP,
FrmObjectID_t  triggerID,
FrmObjectID_t  listID,
CtlValue_t  item
 

Sets trigger and list value.

Sets trigger and list value to nth item in list. List is specified by object ID.

Definition at line 95 of file MoreList.c.

00097 {
00098         _validate_object_idx ( formP, triggerID );
00099         _validate_object_idx ( formP, listID );
00100         MLstSetTriggerAndListValueIdxByIdx ( formP,
00101                         FrmGetObjectIndex( formP, triggerID ),
00102                         FrmGetObjectIndex( formP, listID ),
00103                         item );
00104 }

void MLstSetTriggerAndListValueIdxByIdx FormType *  formP,
FrmObjectIdx_t  triggerIdx,
FrmObjectIdx_t  listIdx,
CtlValue_t  item
 

Sets trigger and list value.

Sets trigger and list value to nth item in list. List is specified by index.

Definition at line 82 of file MoreList.c.

00084 {
00085         ControlPtr triggerP;
00086         ListPtr listP;
00087         _validate_object_idx ( formP, triggerIdx );
00088         _validate_object_idx ( formP, listIdx );
00089         triggerP = MCtlGetPtrByIdx( formP, triggerIdx );
00090         listP = MLstGetPtrByIdx( formP, listIdx );
00091         LstSetSelection( listP, item );
00092         CtlSetLabel( triggerP, LstGetSelectionText( listP, item ) );
00093 }

void MLstSetTriggerValueByID FormType *  formP,
FrmObjectID_t  triggerID,
FrmObjectID_t  listID,
CtlValue_t  item
 

Definition at line 118 of file MoreList.c.

00120 {
00121         _validate_object_idx ( formP, triggerID );
00122         _validate_object_idx ( formP, listID );
00123         MLstSetTriggerValueByIdx ( formP,
00124                         FrmGetObjectIndex( formP, triggerID ),
00125                         FrmGetObjectIndex( formP, listID ),
00126                         item );
00127 }

void MLstSetTriggerValueByIdx FormType *  formP,
FrmObjectIdx_t  triggerIdx,
FrmObjectIdx_t  listIdx,
CtlValue_t  item
 

Sets trigger value.

Sets trigger and list value to nth item in list. List is specified by index. List's selection is not impacted; you should use this call when the list's selection is already correct (i.e. responding to a selection event).

Definition at line 106 of file MoreList.c.

00108 {
00109         ControlPtr triggerP;
00110         ListPtr listP;
00111         _validate_object_idx ( formP, triggerIdx );
00112         _validate_object_idx ( formP, listIdx );
00113         triggerP = MCtlGetPtrByIdx( formP, triggerIdx );
00114         listP = MLstGetPtrByIdx( formP, listIdx );
00115         CtlSetLabel( triggerP, LstGetSelectionText( listP, item ) );
00116 }

void MLstSetTriggerValueByPtr FormType *  formP,
void *  triggerP,
void *  listP,
CtlValue_t  item
 

Sets trigger value.

Sets trigger and list value to nth item in list. List is specified by pointer. List's selection is not impacted; you should use this call when the list's selection is already correct (i.e. responding to a selection event).

Definition at line 129 of file MoreList.c.

00131 {
00132         _validate_object_ptr ( triggerP );
00133         _validate_object_ptr ( listP );
00134         MLstSetTriggerValueByIdx ( formP,
00135                         FrmGetObjectIndexFromPtr( formP, triggerP ),
00136                         FrmGetObjectIndexFromPtr( formP, listP ),
00137                         item );
00138 }

SourceForge.net Logo