#include <ToolList.h>
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()). | |
| Canvas * | canvas |
| Pointer to matrix object (0 when there is no matrix). | |
Static Private Attributes | |
| static const int | PALETTEIMAGESIZE = 32 |
| Size of the picture in palette. | |
Object of this class shows object configs from paletteVector.
typedef std::vector<Object::Config *> GUI::ToolList::TObjectConfigVector [private] |
Vector type.
| GUI::ToolList::ToolList | ( | wxWindow * | parent, | |
| const wxWindowID | id, | |||
| const wxPoint & | pos, | |||
| const wxSize & | size, | |||
| long | style, | |||
| string | pdp | |||
| ) |
Constructor.
| 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.
| 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.
| path | Path to the object | |
| config | Config to be saved |
| void GUI::ToolList::DownloadPaletteVectorIntoDirectory | ( | string | directory | ) |
Downloads all object config into directory.
| directory | Directory path |
| bool GUI::ToolList::IndexInVector | ( | int | i | ) | [inline] |
Tests if index is inside vector.
| i | Index |
| string GUI::ToolList::ObjectName2FileName | ( | const string & | objectName | ) | const |
Returns transformed object name so it can be used as filename.
| 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).
| config | Config to be putted in vector |
| void GUI::ToolList::SetCanvas | ( | Canvas * | c | ) | [inline] |
| 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.
| path | Path to the object |
| void GUI::ToolList::UploadPaletteVectorFromDirectory | ( | string | directory | ) |
Uploads all object configs from directory.
| directory | Directory path |
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.
Configs vector.
wxImageList GUI::ToolList::toolListImages [private] |
List of pictures in toolList.
1.4.7