GUI::ToolList Class Reference

Palette toollist. More...

#include <ToolList.h>

List of all members.

Public Member Functions

 ToolList (wxWindow *parent, const wxWindowID id, const wxPoint &pos, const wxSize &size, long style, string pdp)
 Constructor.
 ~ToolList ()
 Destructor.
bool IndexInVector (int i)
 Tests if index is inside vector.
void SetCanvas (Canvas *c)
 Set canvas pointer (to communicate with canvas).
void SetCanvasNULL ()
 NULL canvas pointer (canvas doesnt exist).
void PaletteVectorPushBack (Object::Config *config)
 Push config inside vector (used from PaletteWindow to add new configs).
void UploadOneObjectConfig (string path)
 Uploads one object config from the given path in vector.
void DownloadOneObjectConfig (string path, Object::Config *config)
 Downloads one object config in the given path.
void UploadPaletteVectorFromDirectory (string directory)
 Uploads all object configs from directory.
void DownloadPaletteVectorIntoDirectory (string directory)
 Downloads all object config into directory.
void CreateToolListFromVector ()
 Fills in palette with configs and images.
string ObjectName2FileName (const string &objectName) const
 Returns transformed object name so it can be used as filename.

Private Types

typedef std::vector< Object::Config * > TObjectConfigVector
 Vector type.

Private Member Functions

void OnRightClick (wxMouseEvent &event)
void OnSelected (wxListEvent &event)
void OnEraseSelectedRight (wxCommandEvent &event)
void OnSaveSelectedRight (wxCommandEvent &event)
void OnEditSelectedRight (wxCommandEvent &event)

Private Attributes

wxImageList toolListImages
 List of pictures in toolList.
string paletteDirectoryPath
 Palette configs directory.
TObjectConfigVector paletteVector
 Configs vector.
int currentItemIndex
 Selected item index (OnSelected()).
int editedItemIndex
 Edited index (OnRightClick()).
Canvascanvas
 Pointer to matrix object (0 when there is no matrix).

Static Private Attributes

static const int PALETTEIMAGESIZE = 32
 Size of the picture in palette.


Detailed Description

Palette toollist.

Object of this class shows object configs from paletteVector.


Member Typedef Documentation

typedef std::vector<Object::Config *> GUI::ToolList::TObjectConfigVector [private]

Vector type.


Constructor & Destructor Documentation

GUI::ToolList::ToolList ( wxWindow *  parent,
const wxWindowID  id,
const wxPoint &  pos,
const wxSize &  size,
long  style,
string  pdp 
)

Constructor.

Parameters:
parent Parent window
id wxWindow identifier
pos Position of the list
size Size of the list
style Style of the list
pdp Palette configs directory

GUI::ToolList::~ToolList (  ) 

Destructor.


Member Function Documentation

void GUI::ToolList::CreateToolListFromVector (  ) 

Fills in palette with configs and images.

void GUI::ToolList::DownloadOneObjectConfig ( string  path,
Object::Config config 
)

Downloads one object config in the given path.

Parameters:
path Path to the object
config Config to be saved

void GUI::ToolList::DownloadPaletteVectorIntoDirectory ( string  directory  ) 

Downloads all object config into directory.

Parameters:
directory Directory path

bool GUI::ToolList::IndexInVector ( int  i  )  [inline]

Tests if index is inside vector.

Parameters:
i Index

string GUI::ToolList::ObjectName2FileName ( const string &  objectName  )  const

Returns transformed object name so it can be used as filename.

Parameters:
objectName Name of the object

void GUI::ToolList::OnEditSelectedRight ( wxCommandEvent &  event  )  [private]

void GUI::ToolList::OnEraseSelectedRight ( wxCommandEvent &  event  )  [private]

void GUI::ToolList::OnRightClick ( wxMouseEvent &  event  )  [private]

void GUI::ToolList::OnSaveSelectedRight ( wxCommandEvent &  event  )  [private]

void GUI::ToolList::OnSelected ( wxListEvent &  event  )  [private]

void GUI::ToolList::PaletteVectorPushBack ( Object::Config config  )  [inline]

Push config inside vector (used from PaletteWindow to add new configs).

Parameters:
config Config to be putted in vector

void GUI::ToolList::SetCanvas ( Canvas c  )  [inline]

Set canvas pointer (to communicate with canvas).

Parameters:
c Canvas pointer

void GUI::ToolList::SetCanvasNULL (  )  [inline]

NULL canvas pointer (canvas doesnt exist).

void GUI::ToolList::UploadOneObjectConfig ( string  path  ) 

Uploads one object config from the given path in vector.

Parameters:
path Path to the object

void GUI::ToolList::UploadPaletteVectorFromDirectory ( string  directory  ) 

Uploads all object configs from directory.

Parameters:
directory Directory path


Member Data Documentation

Canvas* GUI::ToolList::canvas [private]

Pointer to matrix object (0 when there is no matrix).

int GUI::ToolList::currentItemIndex [private]

Selected item index (OnSelected()).

int GUI::ToolList::editedItemIndex [private]

Edited index (OnRightClick()).

string GUI::ToolList::paletteDirectoryPath [private]

Palette configs directory.

const int GUI::ToolList::PALETTEIMAGESIZE = 32 [static, private]

Size of the picture in palette.

TObjectConfigVector GUI::ToolList::paletteVector [private]

Configs vector.

wxImageList GUI::ToolList::toolListImages [private]

List of pictures in toolList.


The documentation for this class was generated from the following files:
Generated on Sun Apr 29 11:46:11 2007 for IPP/ICP2007 by  doxygen 1.4.7