Main Page   Data Structures   File List   Data Fields   Globals   Related Pages  

palm/query.c File Reference

Implementation of the query form. More...

#include <PalmTypes.h>
#include <Chars.h>
#include <StringMgr.h>
#include <SysUtils.h>
#include <query.h>
#include <palmutils.h>
#include <simcity.h>
#include <locking.h>
#include <logging.h>
#include <simcity_resconsts.h>
#include <zakdef.h>
#include <simulation.h>
#include <globals.h>
#include <mem_compat.h>

Go to the source code of this file.

Data Structures

struct  type_zone
 structure dealing with the zone and the string to print More...


Functions

FormPtr querySetup (void) QUERY_SECTION
 Set up the display items for the query form.

void queryCleanup (void) QUERY_SECTION
 Tidy up the memory allocated to the form.

void zonetoPtr (Char *zonemsg, welem_t tile, UInt16 maxlen) QUERY_SECTION
 Convert a zone type into a display string.

void frmShowID (FormPtr fp, UInt16 id) QUERY_SECTION
 show the form id item in question

void frmHideID (FormPtr fp, UInt16 id) QUERY_SECTION
 hide the form item in question

Boolean hQuery (EventPtr event)
 Handler for the query form.


Variables

const struct type_zone type_zones []
 structure dealing with the zone and the string to print


Detailed Description

Implementation of the query form.

Contains the handler code, as well as the code to translate an identified zone into a string for display.

Definition in file query.c.


Function Documentation

void frmHideID FormPtr    fp,
UInt16    id
[static]
 

hide the form item in question

Parameters:
fp  the pointer to the form where the item resides
id  the id of the item on the form

Definition at line 151 of file query.c.

References UInt16.

Referenced by querySetup().

void frmShowID FormPtr    fp,
UInt16    id
[static]
 

show the form id item in question

Parameters:
fp  the form pointer
id  the id of the item to show

Definition at line 140 of file query.c.

References UInt16.

Referenced by querySetup().

Boolean hQuery EventPtr    event
 

Handler for the query form.

takes care of the set-up, cleanup app-button selection and cleanup

Definition at line 33 of file query.c.

References formID_pocketCity, queryCleanup(), and querySetup().

FormPtr querySetup void    [static]
 

Set up the display items for the query form.

Returns:
the form pointer

Definition at line 161 of file query.c.

References CarryPower(), CarryWater(), Char, frmHideID(), frmShowID(), getMapWidth, GetObjectPtr(), getWorldAndFlag(), Int16, LockZone(), lz_flags, lz_world, POWEREDBIT, selem_t, UInt16, UnlockZone(), WATEREDBIT, welem_t, zonetoPtr(), and ZoneValue().

Referenced by hQuery().

void zonetoPtr Char   zonemsg,
welem_t    tile,
UInt16    maxlen
[static]
 

Convert a zone type into a display string.

Parameters:
zonemsg  message to occupy
tile  the tile in question
maxlen  the maximum length to fill the zone message to

Definition at line 117 of file query.c.

References Char, type_zone::tile_end, type_zone::tile_start, UInt16, welem_t, and type_zone::zonestring.

Referenced by querySetup().


Generated on Mon Aug 30 19:44:17 2004 for pocketcity by doxygen1.2.18