Main Page   Namespace List   Class Hierarchy   Compound List   File List   Namespace Members   Compound Members   File Members   Related Pages  

cMenu Class Reference

an Menu More...

#include <menu.h>

Inheritance diagram for cMenu:

cBasicMenu List of all members.

Public Methods

 cMenu (MENU_TYPE id, UI32 x, UI32 y, bool canMove, bool canClose, bool canDispose)
 ~cMenu ()
void setCloseable (bool canClose)
bool getCloseable ()
void setDisposeable (bool canDispose)
bool getDisposeable ()
void setMoveable (bool canMove)
bool getMoveable ()
virtual void handleButton (NXWCLIENT ps, cClientPacket *pkg)
void addCommand (std::string command)
void addCommand (char *s,...)
void addBackground (UI32 gumpId, UI32 width, UI32 height)
void addButton (UI32 x, UI32 y, UI32 up, UI32 down, SI32 returnCode, bool pressable)
void addButtonFn (UI32 x, UI32 y, UI32 up, UI32 down, SI32 returnCode, bool pressable, FUNCIDX fn)
void addCheckbox (UI32 x, UI32 y, UI32 off, UI32 on, UI32 checked, SI32 result)
void addCheckertrans (UI32 x, UI32 y, UI32 width, UI32 height)
void addCroppedText (UI32 x, UI32 y, UI32 width, UI32 height, wstring text, UI32 hue)
void addGump (UI32 x, UI32 y, UI32 gump, UI32 hue)
void addHtmlGump (UI32 x, UI32 y, UI32 width, UI32 height, wstring html, UI32 hasBack, UI32 canScroll)
void addInputField (UI32 x, UI32 y, UI32 width, UI32 height, UI16 textId, wstring data, UI32 hue=0)
void addPropertyField (UI32 x, UI32 y, UI32 width, UI32 height, UI32 property, UI32 subProperty, UI32 hue=0, UI32 subProperty2=0)
void addRadioButton (UI32 x, UI32 y, UI32 off, UI32 on, UI32 checked, SI32 result)
void addResizeGump (UI32 x, UI32 y, UI32 gumpId, UI32 width, UI32 height)
void addText (UI32 x, UI32 y, wstring data, UI32 hue=0)
void addTilePic (UI32 x, UI32 y, UI32 tile, UI32 hue=0)
void addTiledGump (UI32 x, UI32 y, UI32 width, UI32 height, UI32 gump, UI32 hue)
void addXmfHtmlGump (UI32 x, UI32 y, UI32 width, UI32 height, wstring clilocid, UI32 hasBack, UI32 canScroll)
void addGroup (UI32 group=0)
 Add a new group.

void addPage (UI32 page)
 Add a new page.

void addPageButton (UI32 x, UI32 y, UI32 up, UI32 down, UI32 page)
bool getCheckBox (SERIAL checkbox, bool raw=false)
bool getRadio (SERIAL radio, bool raw=false)
std::wstring * getText (SERIAL text, bool raw=false)
SI32 getButton (SI32 rawButton)

Public Attributes

UI32 x
 x coord where show

UI32 y
 y location where show

UI32 pageCount
 page count

UI32 pageCurrent
 current page

UI32 groupCount
 group count

UI32 groupCurrent
 current group

SERIAL buffer [5]
std::string buffer_str [5]

Protected Methods

virtual cServerPacketcreatePacket ()

Protected Attributes

std::vector< std::string > commands
 all commands

std::vector< wstring > texts
 all strings


Private Methods

UI32 addString (wstring s)
void removeCommand (std::string command)
void removeCommand (char *s,...)
void setPropertyField (SERIAL type, SERIAL obj, int prop, int subProp, int subProp2, bool data)
void setPropertyField (SERIAL type, SERIAL obj, int prop, int subProp, int subProp2, std::wstring data)
bool getPropertyFieldBool (SERIAL type, SERIAL obj, int prop, int subProp, int subProp2)
std::wstring getPropertyField (SERIAL type, SERIAL obj, int prop, int subProp, int subProp2)
SI32 getIntFromProps (int prop, int prop2, int prop3)
void getPropsFromInt (SI32 returnCode, int &prop, int &prop2, int &prop3)

Private Attributes

bool closeable
bool moveable
bool disposeable
SERIAL rc_serialCurrent
 current code serial current

std::map< SERIAL, SI32rc_button
 return code for for button

std::map< SERIAL, SI32rc_radio
 return code for for radio

std::map< SERIAL, SI32rc_checkbox
 return code for for checkbox

std::map< SERIAL, SI32rc_edit
 return code for for edit

std::map< SERIAL, FUNCIDXbuttonCallbacks
 all callback for button

std::map< SERIAL, SI32editProps
 all edit property

std::vector< SERIAL > * switchs
 switch ids on after menu selection

std::map< SERIAL, std::wstring > * textResp
 edit field response


Detailed Description

an Menu

Author:
Endymion


Constructor & Destructor Documentation

cMenu::cMenu MENU_TYPE    id,
UI32    x,
UI32    y,
bool    canMove,
bool    canClose,
bool    canDispose
 

cMenu::~cMenu  
 


Member Function Documentation

void cMenu::addBackground UI32    gumpId,
UI32    width,
UI32    height
 

void cMenu::addButton UI32    x,
UI32    y,
UI32    up,
UI32    down,
SI32    returnCode,
bool    pressable
 

void cMenu::addButtonFn UI32    x,
UI32    y,
UI32    up,
UI32    down,
SI32    returnCode,
bool    pressable,
FUNCIDX    fn
 

void cMenu::addCheckbox UI32    x,
UI32    y,
UI32    off,
UI32    on,
UI32    checked,
SI32    result
 

void cMenu::addCheckertrans UI32    x,
UI32    y,
UI32    width,
UI32    height
 

void cMenu::addCommand char *    s,
...   
 

void cMenu::addCommand std::string    command
 

void cMenu::addCroppedText UI32    x,
UI32    y,
UI32    width,
UI32    height,
wstring    text,
UI32    hue
 

void cMenu::addGroup UI32    group = 0
 

Add a new group.

Author:
Wintermute
Parameters:
group  the group num, if INVALID is used automatic page count

void cMenu::addGump UI32    x,
UI32    y,
UI32    gump,
UI32    hue
 

void cMenu::addHtmlGump UI32    x,
UI32    y,
UI32    width,
UI32    height,
wstring    html,
UI32    hasBack,
UI32    canScroll
 

void cMenu::addInputField UI32    x,
UI32    y,
UI32    width,
UI32    height,
UI16    textId,
wstring    data,
UI32    hue = 0
 

void cMenu::addPage UI32    page
 

Add a new page.

Author:
Endymion
Parameters:
page  the page num, if INVALID is used automatic page count

void cMenu::addPageButton UI32    x,
UI32    y,
UI32    up,
UI32    down,
UI32    page
 

void cMenu::addPropertyField UI32    x,
UI32    y,
UI32    width,
UI32    height,
UI32    property,
UI32    subProperty,
UI32    hue = 0,
UI32    subProperty2 = 0
 

void cMenu::addRadioButton UI32    x,
UI32    y,
UI32    off,
UI32    on,
UI32    checked,
SI32    result
 

void cMenu::addResizeGump UI32    x,
UI32    y,
UI32    gumpId,
UI32    width,
UI32    height
 

UI32 cMenu::addString wstring    s [private]
 

void cMenu::addText UI32    x,
UI32    y,
wstring    data,
UI32    hue = 0
 

void cMenu::addTiledGump UI32    x,
UI32    y,
UI32    width,
UI32    height,
UI32    gump,
UI32    hue
 

void cMenu::addTilePic UI32    x,
UI32    y,
UI32    tile,
UI32    hue = 0
 

void cMenu::addXmfHtmlGump UI32    x,
UI32    y,
UI32    width,
UI32    height,
wstring    clilocid,
UI32    hasBack,
UI32    canScroll
 

cServerPacket * cMenu::createPacket   [protected, virtual]
 

Reimplemented from cBasicMenu.

SI32 cMenu::getButton SI32    rawButton
 

bool cMenu::getCheckBox SERIAL    checkbox,
bool    raw = false
 

bool cMenu::getCloseable  
 

bool cMenu::getDisposeable  
 

SI32 cMenu::getIntFromProps int    prop,
int    prop2,
int    prop3
[private]
 

bool cMenu::getMoveable  
 

std::wstring cMenu::getPropertyField SERIAL    type,
SERIAL    obj,
int    prop,
int    subProp,
int    subProp2
[private]
 

bool cMenu::getPropertyFieldBool SERIAL    type,
SERIAL    obj,
int    prop,
int    subProp,
int    subProp2
[private]
 

void cMenu::getPropsFromInt SI32    returnCode,
int &    prop,
int &    prop2,
int &    prop3
[private]
 

bool cMenu::getRadio SERIAL    radio,
bool    raw = false
 

std::wstring * cMenu::getText SERIAL    text,
bool    raw = false
 

void cMenu::handleButton NXWCLIENT    ps,
cClientPacket   pkg
[virtual]
 

Reimplemented from cBasicMenu.

void cMenu::removeCommand char *    s,
...   
[private]
 

void cMenu::removeCommand std::string    command [private]
 

void cMenu::setCloseable bool    canClose
 

void cMenu::setDisposeable bool    canDispose
 

void cMenu::setMoveable bool    canMove
 

void cMenu::setPropertyField SERIAL    type,
SERIAL    obj,
int    prop,
int    subProp,
int    subProp2,
std::wstring    data
[private]
 

void cMenu::setPropertyField SERIAL    type,
SERIAL    obj,
int    prop,
int    subProp,
int    subProp2,
bool    data
[private]
 


Member Data Documentation

SERIAL cMenu::buffer[ 5 ]
 

std::string cMenu::buffer_str[ 5 ]
 

std::map< SERIAL, FUNCIDX > cMenu::buttonCallbacks [private]
 

all callback for button

bool cMenu::closeable [private]
 

std::vector< std::string > cMenu::commands [protected]
 

all commands

bool cMenu::disposeable [private]
 

std::map< SERIAL, SI32 > cMenu::editProps [private]
 

all edit property

UI32 cMenu::groupCount
 

group count

UI32 cMenu::groupCurrent
 

current group

bool cMenu::moveable [private]
 

UI32 cMenu::pageCount
 

page count

UI32 cMenu::pageCurrent
 

current page

std::map< SERIAL, SI32 > cMenu::rc_button [private]
 

return code for for button

std::map< SERIAL, SI32 > cMenu::rc_checkbox [private]
 

return code for for checkbox

std::map< SERIAL, SI32 > cMenu::rc_edit [private]
 

return code for for edit

std::map< SERIAL, SI32 > cMenu::rc_radio [private]
 

return code for for radio

SERIAL cMenu::rc_serialCurrent [private]
 

current code serial current

std::vector< SERIAL >* cMenu::switchs [private]
 

switch ids on after menu selection

std::map< SERIAL, std::wstring >* cMenu::textResp [private]
 

edit field response

std::vector< wstring > cMenu::texts [protected]
 

all strings

UI32 cMenu::x
 

x coord where show

UI32 cMenu::y
 

y location where show


The documentation for this class was generated from the following files: SourceForge.net Logo