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

Detailed Description

This class implements a Rendering Attribute Panel, derived from the MapLink Studio Feature Properties dialog.

Since it uses the 'TSLRenderingAttributes' structure to pass information back and forth, it may be used for both entity-based rendering and feature-based rendering. Optionally, it supports 'As Parent' and undefined values. Each item in the dialog can display one of :

  • A valid value
  • 'As Parent'
  • Blank

If attributeInheritance is enabled, then 'As Parent' is displayed if the entry in the TSLRenderingAttributes is the undefined value.

Blank is displayed if the TSLRenderingAttributes entry is the multiple value, or the undefined value with attributeInheritance disabled. This means, that if an entity's rendering is queried and passed in to this panel, then only those entries relevant to that entity will be contain a valid value, since all other attributes will be undefined.

By default, border colour and border thickness entries are not displayed, although these can be enabled by passing the appropriate value to the constructor.

When any items are changed by the user, then the callback specified in the constructor is triggered. In addition to the user-defined void* argument, a pointer to a TSLRenderingAttributes structure is passed. This contains the current value of all entries in the panel.

This class is not thread safe.

Public Member Functions

 TSLRenderingAttributePanel (TSLRenderingAttributeUpdateCallback callback=0, HWND parentWnd=0, bool borderAttributesRequired=false)
 
 TSLRenderingAttributePanel (bool coloursAsRGB, TSLRenderingAttributeUpdateCallback callback=0, HWND parentWnd=0, bool borderAttributesRequired=false)
 
 TSLRenderingAttributePanel (TSLRenderingAttributeUpdateCallbackInterface *callback, bool coloursAsRGB=false, bool borderAttributesRequired=false, HWND parentWnd=NULL)
 
virtual ~TSLRenderingAttributePanel ()
 Destructor for the rendering attribute panel.
 
void attributeInheritance (bool attributeInheritance)
 
bool doModal ()
 Invoke the panel as a modal dialog.
 
bool isShown ()
 Returns true if the dialog is on display, false otherwise.
 
void readOnly (bool readOnly)
 
void setDialogTitle (const char *title)
 
void setRenderingAttributes (TSLRenderingAttributes *attributes, void *argForCallback, bool isFeature=false)
 
void setRenderingAttributes (TSLRenderingAttributes *attributes, bool isFeature=false)
 
void showDialog (bool show)
 
void * operator new (size_t size) TSL_NO_THROW
 Allocation override for API redirection.
 
void operator delete (void *self)
 
void * operator new (size_t size, char *filename, int line)
 

Constructor & Destructor Documentation

◆ TSLRenderingAttributePanel() [1/3]

TSLRenderingAttributePanel::TSLRenderingAttributePanel ( TSLRenderingAttributeUpdateCallback callback = 0,
HWND parentWnd = 0,
bool borderAttributesRequired = false )

Constructor for the TSLRenderingAttributePanel.

Argument list description:

callback: Callback to be triggered when attributes change. Default 0.

parentWnd : Window to defined as parent of dialog. Default NULL.

borderAttributesRequired : Flag to indicate whether entries for bordered polygon attributes are requried. Default false.

◆ TSLRenderingAttributePanel() [2/3]

TSLRenderingAttributePanel::TSLRenderingAttributePanel ( bool coloursAsRGB,
TSLRenderingAttributeUpdateCallback callback = 0,
HWND parentWnd = 0,
bool borderAttributesRequired = false )

Constructor for the TSLRenderingAttributePanel.

Argument list description:

coloursAsRGB: flag to indicate if user defined colours should be sent to the application as RGB values

callback: Callback to be triggered when attributes change. Default 0.

parentWnd : Window to defined as parent of dialog. Default NULL.

borderAttributesRequired : Flag to indicate whether entries for bordered polygon attributes are requried. Default false.

◆ TSLRenderingAttributePanel() [3/3]

TSLRenderingAttributePanel::TSLRenderingAttributePanel ( TSLRenderingAttributeUpdateCallbackInterface * callback,
bool coloursAsRGB = false,
bool borderAttributesRequired = false,
HWND parentWnd = NULL )

Constructor for the TSLRenderingAttributePanel.

Argument list description:

callback Interface: interface Callback to be triggered when attributes change.

coloursAsRGB: flag to indicate if user defined colours should be sent to the application as RGB values. Default false.

borderAttributesRequired : Flag to indicate whether entries for bordered polygon attributes are required. Default false. parentWnd : Window to defined as parent of dialog. Default NULL.

◆ ~TSLRenderingAttributePanel()

virtual TSLRenderingAttributePanel::~TSLRenderingAttributePanel ( )
virtual

Destructor for the rendering attribute panel.

Member Function Documentation

◆ attributeInheritance()

void TSLRenderingAttributePanel::attributeInheritance ( bool attributeInheritance)

Set flag indicating whether attribute inheritance is supported. This flag defaults to 'false'.

If this flag is true, then 'As parent' is displayed when values are undefined. Otherwise, they are shown blank when values are undefined.

Argument list description:

attributeInheritance: New value of flag

◆ doModal()

bool TSLRenderingAttributePanel::doModal ( )

Invoke the panel as a modal dialog.

◆ isShown()

bool TSLRenderingAttributePanel::isShown ( )

Returns true if the dialog is on display, false otherwise.

◆ operator delete()

void TSLRenderingAttributePanel::operator delete ( void * self)

◆ operator new() [1/2]

void * TSLRenderingAttributePanel::operator new ( size_t size)

Allocation override for API redirection.

◆ operator new() [2/2]

void * TSLRenderingAttributePanel::operator new ( size_t size,
char * filename,
int line )

When included in an MFC applicaton in debug mode, the debug new expects this to be here. Override it and return the same as the normal one. The library must include it when compiled in release mode, since the users application may be in debug mode.

◆ readOnly()

void TSLRenderingAttributePanel::readOnly ( bool readOnly)

Set flag indicating whether all entries in the panel should be made read-only.

Argument list description:

readOnly : New value of flag

◆ setDialogTitle()

void TSLRenderingAttributePanel::setDialogTitle ( const char * title)

Sets the title of the panel

Argument list description :

title : New title for the panel dialog

◆ setRenderingAttributes() [1/2]

void TSLRenderingAttributePanel::setRenderingAttributes ( TSLRenderingAttributes * attributes,
bool isFeature = false )

Sets the attributes to be displayed.

attributes : Structure containing all rendering attributes.

isFeature : Flag to indicate whether these attributes represent a map

◆ setRenderingAttributes() [2/2]

void TSLRenderingAttributePanel::setRenderingAttributes ( TSLRenderingAttributes * attributes,
void * argForCallback,
bool isFeature = false )

Sets the attributes to be displayed.

Each item in the dialog can display one of :

A valid value. 'As Parent' Blank

If attributeInheritance is enabled, then 'As Parent' is displayed if the entry in the TSLRenderingAttributes is the undefined value.

Blank is displayed if the TSLRenderingAttributes entry is the multiple value, or the undefined value with attributeInheritance disabled. This means, that if an entity's rendering is queried and passed in to this panel, then only those entries relevant to that entity will be contain a valid value, since all other attributes will be undefined.

A further special case is that of text alignment. For Map Features, these can be defined by the filter (eg. with NTF maps) and stored on the map feature itself, For these, the 'undefined' value is mapped to 'Defined by Filter', rather than 'As Parent' or 'Blank' . Control over this is specified with the 'isFeature' argument.

Argument list description:

attributes : Structure containing all rendering attributes.

argForCallback : This is the argument that is passed back to the application when the values are changed. For example, this may be used to store an entity pointer, or a feature name

isFeature : Flag to indicate whether these attributes represent a map feature. See description of text alignment behaviour above.

◆ showDialog()

void TSLRenderingAttributePanel::showDialog ( bool show)

Show or hide the modeless dialog.

Argument list description:

show : Flag to indicate whether the dialog should be shown, or hidden.