MapLink Pro 11.1.1.0.
Envitia MapLink Pro: The Ultimate Mapping Application Toolkit
Loading...
Searching...
No Matches
TSLAPP6AProperties Class Reference

Detailed Description

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 Types

enum  FieldEnum {
  FieldAdditionalInformation , FieldAltitudeOrDepth , FieldC2HQName , FieldCombatEffectiveness ,
  FieldDateAndTime , FieldDesignation , FieldEquipmentType , FieldEvaluationRating ,
  FieldHigherFormation , FieldHostility , FieldHostileEnemy , FieldIFFSIFValue ,
  FieldHQStaff , FieldReduced , FieldReinforced , FieldTaskForce ,
  FieldLatAndLong , FieldMobility , FieldQuantity , FieldSignalEquipment ,
  FieldSpeed , FieldStaffComments , FieldUnitSize , FieldFramed
}
 

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 ()
 

Member Enumeration Documentation

◆ FieldEnum

Enumerator
FieldAdditionalInformation 
FieldAltitudeOrDepth 
FieldC2HQName 
FieldCombatEffectiveness 
FieldDateAndTime 
FieldDesignation 
FieldEquipmentType 
FieldEvaluationRating 
FieldHigherFormation 
FieldHostility 
FieldHostileEnemy 
FieldIFFSIFValue 
FieldHQStaff 
FieldReduced 
FieldReinforced 
FieldTaskForce 
FieldLatAndLong 
FieldMobility 
FieldQuantity 
FieldSignalEquipment 
FieldSpeed 
FieldStaffComments 
FieldUnitSize 
FieldFramed 

Constructor & Destructor Documentation

◆ TSLAPP6AProperties()

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::~TSLAPP6AProperties ( )

Destructor.

Member Function Documentation

◆ clear()

void TSLAPP6AProperties::clear ( )

Clears all text fields and combo boxes in the properties dialog.

◆ enable()

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.

Parameters
enableA boolean value indicating whether the dialog should be enabled or disabled.

◆ forceUpdate()

void TSLAPP6AProperties::forceUpdate ( )

Forces the Properties to call the TSLAPP6ARequest::onPropertiesUpdate() method, passing any symbols that the user may have selected.

◆ getListSize()

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.

Returns
An integer value indicating the number of loaded symbols.

◆ getSelectedSymbol() [1/2]

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.

Parameters
symbolA TSLAPP6ASymbol object to populate.
Returns
True if successful, false otherwise.

◆ getSelectedSymbol() [2/2]

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.

Parameters
symbolA TSLAPP6ASymbol object to populate.
indexThe integer index of the symbol in the list.
Returns
True if successful, false otherwise (if the index is out of range).

◆ isEnabled()

bool TSLAPP6AProperties::isEnabled ( )

Use this method to query the state of the dialog.

Returns
True if the dialog is enabled, false otherwise.

◆ isReadOnly()

bool TSLAPP6AProperties::isReadOnly ( FieldEnum field)

Use this method to query the state of a field within the dialog.

field: One of TSLAPP6AProperties::FieldEnum.

Returns
True if the field is set to read only, false otherwise.

◆ isVisible()

bool TSLAPP6AProperties::isVisible ( )

Use this method to query the visibility of the dialog.

Returns
True if the dialog is currently visible, false otherwise.

◆ load()

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.

Parameters
esAn entity set containing the symbol to load.
clearListA boolean value indicating whether the internal list of symbols should be cleared before this symbol is loaded.
Returns
False if the symbol cannot be loaded, true otherwise.

◆ readOnly()

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.

Parameters
fieldThe field to set to readonly. One of TSLAPP6AProperties::FieldEnum.
readOnlyA boolean value indicating whether the field should be read only or not.
clearA boolean value indicating whether the field should be cleared.

◆ showWindow()

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.

Parameters
showA boolean value which dermines whether the resulting window will be hidden or visible.

◆ valid()

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.

Returns
True if the dialog created successfully, false otherwise.