![]() |
MapLink Pro 11.1.1.0.
Envitia MapLink Pro: The Ultimate Mapping Application Toolkit
|
The TSLAPP6AProperties class should be used for all interactions with the symbol properties dialog box.
The actual MFC dialog is created in the class constructor. You can check that this has been created successfully by calling the valid method straight after construction.
Check the TSLErrorStack::lastError() method for a description of the problem.
Public Member Functions | |
TSLAPP6AProperties (TSLAPP6ARequest *client, bool helpRequired=true, HWND parent=0) | |
~TSLAPP6AProperties () | |
void | clear () |
void | enable (bool enable=true) |
void | readOnly (FieldEnum field, bool readOnly=true, bool clear=false) |
void | forceUpdate () |
Int | getListSize () |
bool | getSelectedSymbol (TSLAPP6ASymbol &symbol) |
bool | getSelectedSymbol (TSLAPP6ASymbol &symbol, Int index) |
bool | isEnabled () |
bool | isReadOnly (FieldEnum field) |
bool | isVisible () |
bool | load (const TSLEntitySet *es, bool clearList=true) |
void | showWindow (bool show=true) |
bool | valid () |
TSLAPP6AProperties::TSLAPP6AProperties | ( | TSLAPP6ARequest * | client, |
bool | helpRequired = true, | ||
HWND | parent = 0 ) |
Default Constructor.
The first parameter should be a pointer to a TSLAPP6ARequest derived class that will receive the update messages from the Palette.
If the helpRequired flag is true then a help button will be displayed on each page and the click action will be sent via a TSLAPP6ARequest::onHelp() call.
The HWND parameter should be used to specify a handle to the parent window. This is equivalent to CWnd in a normal MFC Dialog class.
TSLAPP6AProperties::~TSLAPP6AProperties | ( | ) |
Destructor.
void TSLAPP6AProperties::clear | ( | ) |
Clears all text fields and combo boxes in the properties dialog.
void TSLAPP6AProperties::enable | ( | bool | enable = true | ) |
Enables or disables the properties dialog. When disabled, all of the text fields and combo boxes will be greyed out.
enable | A boolean value indicating whether the dialog should be enabled or disabled. |
void TSLAPP6AProperties::forceUpdate | ( | ) |
Forces the Properties to call the TSLAPP6ARequest::onPropertiesUpdate() method, passing any symbols that the user may have selected.
Int TSLAPP6AProperties::getListSize | ( | ) |
Returns the size of the internal list of loaded symbols. The list index starts at 0 which equates to a list size of 1.
bool TSLAPP6AProperties::getSelectedSymbol | ( | TSLAPP6ASymbol & | symbol | ) |
Populates the symbol with the first item in the list. The helper can then be used to convert this into a bitmap, entity set, or string.
symbol | A TSLAPP6ASymbol object to populate. |
bool TSLAPP6AProperties::getSelectedSymbol | ( | TSLAPP6ASymbol & | symbol, |
Int | index ) |
Performs the same action as above, except a specific item can be retrieved from the list.
Use the getListSize() method to retrieve the number of items in the list.
symbol | A TSLAPP6ASymbol object to populate. |
index | The integer index of the symbol in the list. |
bool TSLAPP6AProperties::isEnabled | ( | ) |
Use this method to query the state of the dialog.
bool TSLAPP6AProperties::isReadOnly | ( | FieldEnum | field | ) |
Use this method to query the state of a field within the dialog.
field: One of TSLAPP6AProperties::FieldEnum.
bool TSLAPP6AProperties::isVisible | ( | ) |
Use this method to query the visibility of the dialog.
bool TSLAPP6AProperties::load | ( | const TSLEntitySet * | es, |
bool | clearList = true ) |
Loads the entity set into the properties dialog.
The clearList flag allows multiple entity sets to be loaded via multiple calls to the method with the flag set as false. This allows the size to be adjusted for lots of symbols at once rather than one at a time; the TSLAPP6AProperties class maintains a list of the symbols internally.
Note: With the exception of size, any modifications to the symbols will only be made to the first symbol in the list. Modifying multiple symbols a once is not supported with this version of the product.
es | An entity set containing the symbol to load. |
clearList | A boolean value indicating whether the internal list of symbols should be cleared before this symbol is loaded. |
void TSLAPP6AProperties::readOnly | ( | FieldEnum | field, |
bool | readOnly = true, | ||
bool | clear = false ) |
Sets a specific field in the properties dialog to read only. If the clear flag is set to 'true' the field will be cleared first. Values in read only fields are still used to generate symbols, unless they are cleared first.
field | The field to set to readonly. One of TSLAPP6AProperties::FieldEnum. |
readOnly | A boolean value indicating whether the field should be read only or not. |
clear | A boolean value indicating whether the field should be cleared. |
void TSLAPP6AProperties::showWindow | ( | bool | show = true | ) |
Shows or hides the dialog depending on the value of 'show'. This method does nothing if you try to hide an already hidden window.
show | A boolean value which dermines whether the resulting window will be hidden or visible. |
bool TSLAPP6AProperties::valid | ( | ) |
The dialog is created when the class is constructed, therefore it is not possible to returns a value to indicate whether this was successful or not. This method returns true if the palette was successfully created.
Check the TSLErrorStack for a description is this returns false.