LuciadCPillar 2023.1.04
|
This class contains settings that can be used as defaults for IFeatureHandlesProvider
and IGeometryHandlesProvider
implementations.
More...
#include <luciad/edit/EditSettings.h>
Public Member Functions | |
EditSettings () | |
Creates a new EditSettings instance with default values. More... | |
~EditSettings () | |
std::shared_ptr< IIcon > | getAuxiliaryHandleIconActive () const |
std::shared_ptr< IIcon > | getAuxiliaryHandleIconHighlighted () const |
std::shared_ptr< IIcon > | getAuxiliaryHandleIconRegular () const |
const std::optional< ComplexStrokeLineStyle > & | getComplexStrokeOutlineStyleActive () const |
Returns the complex stroke line style that is used for active handles that paint an outline. More... | |
const std::optional< ComplexStrokeLineStyle > & | getComplexStrokeOutlineStyleHighlighted () const |
Returns the complex stroke line style that is used for highlighted handles that paint an outline. More... | |
const std::optional< ComplexStrokeLineStyle > & | getComplexStrokeOutlineStyleRegular () const |
Returns the complex stroke line style that is used for inactive handles that paint an outline. More... | |
MouseButton | getElevationButton () const |
MouseCursor | getElevationCursor () const |
ModifierKeys | getElevationModifierKeys () const |
std::shared_ptr< IIcon > | getHandleIconActive () const |
std::shared_ptr< IIcon > | getHandleIconHighlighted () const |
std::shared_ptr< IIcon > | getHandleIconRegular () const |
MouseButton | getInsertButton () const |
MouseCursor | getInsertCursor () const |
ModifierKeys | getInsertModifierKeys () const |
MouseButton | getMoveButton () const |
MouseCursor | getMoveCursor () const |
ModifierKeys | getMoveModifierKeys () const |
const std::optional< LineStyle > & | getOutlineStyleActive () const |
Returns the line style that is used for active handles that display an outline. More... | |
const std::optional< LineStyle > & | getOutlineStyleHighlighted () const |
Returns the line style that is used for highlighted handles that display an outline. More... | |
const std::optional< LineStyle > & | getOutlineStyleRegular () const |
Returns the line style that is used for inactive handles that display an outline. More... | |
MouseButton | getPrependAppendButton () const |
MouseCursor | getPrependAppendCursor () const |
ModifierKeys | getPrependAppendModifierKeys () const |
MouseButton | getRemoveButton () const |
MouseCursor | getRemoveCursor () const |
ModifierKeys | getRemoveModifierKeys () const |
const std::optional< ComplexStrokeLineStyle > & | getShadowComplexStrokeLineStyle () const |
Returns the complex stroke line style that is used for shadow lines. More... | |
const std::optional< FillStyle > & | getShadowFillStyle () const |
std::shared_ptr< IIcon > | getShadowIcon () const |
const std::optional< LineStyle > & | getShadowLineStyle () const |
Returns the line style that is used for shadow lines. More... | |
MouseButton | getTranslateButton () const |
MouseCursor | getTranslateCursor () const |
ModifierKeys | getTranslateModifierKeys () const |
const std::optional< ComplexStrokeLineStyle > & | getVisualAidComplexStrokeLineStyle () const |
Returns the complex stroke line style that is used for visual aid lines. More... | |
const std::optional< LineStyle > & | getVisualAidLineStyle () const |
Returns the line style that is used for visual aid lines. More... | |
void | setAuxiliaryHandleIconActive (std::shared_ptr< IIcon > icon) |
void | setAuxiliaryHandleIconHighlighted (std::shared_ptr< IIcon > icon) |
void | setAuxiliaryHandleIconRegular (std::shared_ptr< IIcon > icon) |
void | setComplexStrokeOutlineStyleActive (std::optional< ComplexStrokeLineStyle > style) |
Sets the complex stroke line style that is used for active handles that paint an outline. More... | |
void | setComplexStrokeOutlineStyleHighlighted (std::optional< ComplexStrokeLineStyle > style) |
Sets the complex stroke line style that is used for highlighted handles that paint an outline. More... | |
void | setComplexStrokeOutlineStyleRegular (std::optional< ComplexStrokeLineStyle > style) |
Sets the complex stroke line style that is used for inactive handles that paint an outline. More... | |
void | setElevationButton (MouseButton button) |
void | setElevationCursor (MouseCursor cursor) |
void | setElevationModifierKeys (ModifierKeys modifierKeys) |
void | setHandleIconActive (std::shared_ptr< IIcon > icon) |
void | setHandleIconHighlighted (std::shared_ptr< IIcon > icon) |
void | setHandleIconRegular (std::shared_ptr< IIcon > icon) |
void | setInsertButton (MouseButton button) |
void | setInsertCursor (MouseCursor cursor) |
void | setInsertModifierKeys (ModifierKeys modifierKeys) |
void | setMoveButton (MouseButton button) |
void | setMoveCursor (MouseCursor cursor) |
void | setMoveModifierKeys (ModifierKeys modifierKeys) |
void | setOutlineStyleActive (std::optional< LineStyle > style) |
Sets the line style that is used for active handles that paint an outline. More... | |
void | setOutlineStyleHighlighted (std::optional< LineStyle > style) |
Sets the line style that is used for highlighted handles that paint an outline. More... | |
void | setOutlineStyleRegular (std::optional< LineStyle > style) |
Sets the line style that is used for handles in a EditHandleState::Inactive state that paint an outline. More... | |
void | setPrependAppendButton (MouseButton button) |
void | setPrependAppendCursor (MouseCursor cursor) |
void | setPrependAppendModifierKeys (ModifierKeys modifierKeys) |
void | setRemoveButton (MouseButton button) |
void | setRemoveCursor (MouseCursor cursor) |
void | setRemoveModifierKeys (ModifierKeys modifierKeys) |
void | setShadowComplexStrokeLineStyle (std::optional< ComplexStrokeLineStyle > style) |
Sets the complex stroke line style that is used for shadow lines. More... | |
void | setShadowFillStyle (std::optional< FillStyle > style) |
Fill style that is used when a shadow version of a geometry is painted. More... | |
void | setShadowIcon (std::shared_ptr< IIcon > icon) |
void | setShadowLineStyle (std::optional< LineStyle > style) |
Sets the line style that is used for shadow lines. More... | |
void | setTranslateButton (MouseButton button) |
void | setTranslateCursor (MouseCursor cursor) |
void | setTranslateModifierKeys (ModifierKeys modifierKeys) |
void | setVisualAidComplexStrokeLineStyle (std::optional< ComplexStrokeLineStyle > style) |
Sets the complex stroke line style that is used for visual aid lines. More... | |
void | setVisualAidLineStyle (std::optional< LineStyle > style) |
Sets the line style that is used for visual aid lines. More... | |
This class contains settings that can be used as defaults for IFeatureHandlesProvider
and IGeometryHandlesProvider
implementations.
To change the defaults, you can create a new instance of this class, adapt the settings, and configure it on the Editor
class.
These settings are typically used in the following way:
handle icon
: for point handles. See PointEditHandle
.highlighted handle icon
: for point handles when in a highlighted state. If nullptr
, the regular icon will be used instead.active handle icon
: for point handles when in an active state. If nullptr
, the highlighted icon will be used instead, or the active one if that one is nullptr
as well.auxiliary handle icon
: for point handles that require different styling. An example is the insert handle for polylines. See PointEditHandle
. highlighted
and active
auxiliary icons behave the same as the normal handle icons.outline style
: for handles that manipulate an outlinevisual aid style
: for handles that paint an additional helper line. For example: a vertical line that connects a handle with the terrain. See PointEditHandle
.shadow icon and styles
: for handles that paint a shadow version of a geometry on the terrain. This is for example done by TranslateEditHandle
.cursors
: you can configure cursors for different types of actionsmouse buttons
: you can configure the mouse button that is used for different types of actionsmodifier keys
: you can configure the modifier keys that are used for different types of actionsIf you need to customize edit behavior that is not available in this class, you can do so by creation and customizing the handles directly. The following handle implementations can for example be used and customized:
Most handles providers allow you to specify which handles are used. See for example:
PointHandlesProvider::IHandleFactory
PolylineHandlesProvider::IHandleFactory
PolylineRingHandlesProvider::IHandleFactory
luciad::EditSettings::EditSettings | ( | ) |
Creates a new EditSettings instance with default values.
luciad::EditSettings::~EditSettings | ( | ) |
std::shared_ptr< IIcon > luciad::EditSettings::getAuxiliaryHandleIconActive | ( | ) | const |
active
handles. std::shared_ptr< IIcon > luciad::EditSettings::getAuxiliaryHandleIconHighlighted | ( | ) | const |
highlighted
handles. std::shared_ptr< IIcon > luciad::EditSettings::getAuxiliaryHandleIconRegular | ( | ) | const |
inactive
handles. const std::optional< ComplexStrokeLineStyle > & luciad::EditSettings::getComplexStrokeOutlineStyleActive | ( | ) | const |
Returns the complex stroke line style that is used for active
handles that paint an outline.
This method is linked to the getOutlineStyleActive
method:
std::nullopt
, no outline is paintedstd::nullopt
, that line style is usedstd::nullopt
value: they are mutually exclusiveactive
handles that paint an outline.const std::optional< ComplexStrokeLineStyle > & luciad::EditSettings::getComplexStrokeOutlineStyleHighlighted | ( | ) | const |
Returns the complex stroke line style that is used for highlighted
handles that paint an outline.
This method is linked to the getOutlineStyleHighlighted
method:
std::nullopt
, no outline is paintedstd::nullopt
, that line style is usedstd::nullopt
value: they are mutually exclusivehighlighted
handles that paint an outline.const std::optional< ComplexStrokeLineStyle > & luciad::EditSettings::getComplexStrokeOutlineStyleRegular | ( | ) | const |
Returns the complex stroke line style that is used for inactive
handles that paint an outline.
This method is linked to the getOutlineStyleRegular
method:
std::nullopt
, no outline is paintedstd::nullopt
, that line style is usedstd::nullopt
value: they are mutually exclusiveinactive
handles that paint an outline.MouseButton luciad::EditSettings::getElevationButton | ( | ) | const |
MouseCursor luciad::EditSettings::getElevationCursor | ( | ) | const |
ModifierKeys luciad::EditSettings::getElevationModifierKeys | ( | ) | const |
std::shared_ptr< IIcon > luciad::EditSettings::getHandleIconActive | ( | ) | const |
active
handles. std::shared_ptr< IIcon > luciad::EditSettings::getHandleIconHighlighted | ( | ) | const |
highlighted
handles. std::shared_ptr< IIcon > luciad::EditSettings::getHandleIconRegular | ( | ) | const |
inactive
handles. MouseButton luciad::EditSettings::getInsertButton | ( | ) | const |
MouseCursor luciad::EditSettings::getInsertCursor | ( | ) | const |
ModifierKeys luciad::EditSettings::getInsertModifierKeys | ( | ) | const |
MouseButton luciad::EditSettings::getMoveButton | ( | ) | const |
MouseCursor luciad::EditSettings::getMoveCursor | ( | ) | const |
ModifierKeys luciad::EditSettings::getMoveModifierKeys | ( | ) | const |
const std::optional< LineStyle > & luciad::EditSettings::getOutlineStyleActive | ( | ) | const |
Returns the line style that is used for active
handles that display an outline.
This method is linked to the getComplexStrokeOutlineStyleActive
method:
std::nullopt
, no outline is paintedstd::nullopt
, that line style is usedstd::nullopt
value: they are mutually exclusiveactive
handles that paint an outline. const std::optional< LineStyle > & luciad::EditSettings::getOutlineStyleHighlighted | ( | ) | const |
Returns the line style that is used for highlighted
handles that display an outline.
This method is linked to the getComplexStrokeOutlineStyleHighlighted
method:
std::nullopt
, no outline is paintedstd::nullopt
, that line style is usedstd::nullopt
value: they are mutually exclusivehighlighted
handles that paint an outline. const std::optional< LineStyle > & luciad::EditSettings::getOutlineStyleRegular | ( | ) | const |
Returns the line style that is used for inactive
handles that display an outline.
This method is linked to the getComplexStrokeOutlineStyleRegular
method:
std::nullopt
, no outline is paintedstd::nullopt
, that line style is usedstd::nullopt
value: they are mutually exclusiveinactive
handles that paint an outline. MouseButton luciad::EditSettings::getPrependAppendButton | ( | ) | const |
MouseCursor luciad::EditSettings::getPrependAppendCursor | ( | ) | const |
ModifierKeys luciad::EditSettings::getPrependAppendModifierKeys | ( | ) | const |
MouseButton luciad::EditSettings::getRemoveButton | ( | ) | const |
MouseCursor luciad::EditSettings::getRemoveCursor | ( | ) | const |
ModifierKeys luciad::EditSettings::getRemoveModifierKeys | ( | ) | const |
const std::optional< ComplexStrokeLineStyle > & luciad::EditSettings::getShadowComplexStrokeLineStyle | ( | ) | const |
Returns the complex stroke line style that is used for shadow lines.
This method is linked to the getShadowLineStyle
method:
std::nullopt
, no shadow line is paintedstd::nullopt
, that shadow line style is usedstd::nullopt
value: they are mutually exclusiveconst std::optional< FillStyle > & luciad::EditSettings::getShadowFillStyle | ( | ) | const |
std::shared_ptr< IIcon > luciad::EditSettings::getShadowIcon | ( | ) | const |
const std::optional< LineStyle > & luciad::EditSettings::getShadowLineStyle | ( | ) | const |
Returns the line style that is used for shadow lines.
This method is linked to the getShadowComplexStrokeLineStyle
method:
std::nullopt
, no shadow line is paintedstd::nullopt
, that shadow line style is usedstd::nullopt
value: they are mutually exclusiveMouseButton luciad::EditSettings::getTranslateButton | ( | ) | const |
MouseCursor luciad::EditSettings::getTranslateCursor | ( | ) | const |
ModifierKeys luciad::EditSettings::getTranslateModifierKeys | ( | ) | const |
const std::optional< ComplexStrokeLineStyle > & luciad::EditSettings::getVisualAidComplexStrokeLineStyle | ( | ) | const |
Returns the complex stroke line style that is used for visual aid lines.
This method is linked to the getVisualAidLineStyle
method:
std::nullopt
, no visual aid line is paintedstd::nullopt
, that visual aid line style is usedstd::nullopt
value: they are mutually exclusiveconst std::optional< LineStyle > & luciad::EditSettings::getVisualAidLineStyle | ( | ) | const |
Returns the line style that is used for visual aid lines.
This method is linked to the getVisualAidComplexStrokeLineStyle
method:
std::nullopt
, no visual aid line is paintedstd::nullopt
, that visual aid line style is usedstd::nullopt
value: they are mutually exclusivevoid luciad::EditSettings::setAuxiliaryHandleIconActive | ( | std::shared_ptr< IIcon > | icon | ) |
icon | the auxiliary icon for active handles. Can be nullptr . In that case no icon is painted. |
void luciad::EditSettings::setAuxiliaryHandleIconHighlighted | ( | std::shared_ptr< IIcon > | icon | ) |
icon | the auxiliary icon for highlighted . Can be nullptr . In that case no icon is painted. |
void luciad::EditSettings::setAuxiliaryHandleIconRegular | ( | std::shared_ptr< IIcon > | icon | ) |
icon | the auxiliary icon for inactive handles. Can be nullptr . In that case no icon is painted. |
void luciad::EditSettings::setComplexStrokeOutlineStyleActive | ( | std::optional< ComplexStrokeLineStyle > | style | ) |
Sets the complex stroke line style that is used for active
handles that paint an outline.
Only one active line style can be set, if this function is called with a non std::nullopt
value when a LineStyle
has already been set, it will be overwritten.
style | the complex stroke line style that is used for active handles that paint an outline. |
void luciad::EditSettings::setComplexStrokeOutlineStyleHighlighted | ( | std::optional< ComplexStrokeLineStyle > | style | ) |
Sets the complex stroke line style that is used for highlighted
handles that paint an outline.
Only one active line style can be set, if this function is called with a non std::nullopt
value when a LineStyle
has already been set, it will be overwritten.
style | the complex stroke line style that is used for highlighted handles that paint an outline. |
void luciad::EditSettings::setComplexStrokeOutlineStyleRegular | ( | std::optional< ComplexStrokeLineStyle > | style | ) |
Sets the complex stroke line style that is used for inactive
handles that paint an outline.
Only one active line style can be set, if this function is called with a non std::nullopt
value when a LineStyle
has already been set, it will be overwritten.
style | the complex stroke line style that is used for inactive handles that paint an outline. |
void luciad::EditSettings::setElevationButton | ( | MouseButton | button | ) |
button | the mouse button that is used by handles to modify elevation |
void luciad::EditSettings::setElevationCursor | ( | MouseCursor | cursor | ) |
cursor | the cursor that is used for handles that manipulate elevation |
void luciad::EditSettings::setElevationModifierKeys | ( | ModifierKeys | modifierKeys | ) |
modifierKeys | the modifier keys that are used by handles to modify elevation |
void luciad::EditSettings::setHandleIconActive | ( | std::shared_ptr< IIcon > | icon | ) |
icon | the icon for active handles. Can be nullptr . In that case no icon is painted. |
void luciad::EditSettings::setHandleIconHighlighted | ( | std::shared_ptr< IIcon > | icon | ) |
icon | the icon for highlighted handles. Can be nullptr . In that case no icon is painted. |
void luciad::EditSettings::setHandleIconRegular | ( | std::shared_ptr< IIcon > | icon | ) |
icon | the icon for inactive handles. Can be nullptr . In that case no icon is painted. |
void luciad::EditSettings::setInsertButton | ( | MouseButton | button | ) |
button | the mouse button that is used by handles to insert something |
void luciad::EditSettings::setInsertCursor | ( | MouseCursor | cursor | ) |
cursor | the cursor that is used for handles that insert something |
void luciad::EditSettings::setInsertModifierKeys | ( | ModifierKeys | modifierKeys | ) |
modifierKeys | the modifier keys that are used by handles to insert something |
void luciad::EditSettings::setMoveButton | ( | MouseButton | button | ) |
button | the mouse button that is used by handles to move something |
void luciad::EditSettings::setMoveCursor | ( | MouseCursor | cursor | ) |
cursor | the cursor that is used for handles that move something |
void luciad::EditSettings::setMoveModifierKeys | ( | ModifierKeys | modifierKeys | ) |
modifierKeys | the modifier keys that are used by handles to move something |
void luciad::EditSettings::setOutlineStyleActive | ( | std::optional< LineStyle > | style | ) |
Sets the line style that is used for active
handles that paint an outline.
Only one active line style can be set, if this function is called with a non std::nullopt
value when a ComplexStrokeLineStyle
has already been set, it will be overwritten.
style | the line style that is used for active handles that paint an outline. |
void luciad::EditSettings::setOutlineStyleHighlighted | ( | std::optional< LineStyle > | style | ) |
Sets the line style that is used for highlighted
handles that paint an outline.
Only one highlighted line style can be set, if this function is called with a non std::nullopt
value when a ComplexStrokeLineStyle
has already been set, it will be overwritten.
style | the line style that is used for highlighted handles that paint an outline. |
void luciad::EditSettings::setOutlineStyleRegular | ( | std::optional< LineStyle > | style | ) |
Sets the line style that is used for handles in a EditHandleState::Inactive
state that paint an outline.
Only one regular line style can be set, if this function is called with a non std::nullopt
value when a ComplexStrokeLineStyle
has already been set, it will be overwritten.
style | the line style that is used for handles that manipulate an outline in a EditHandleState::Inactive state. |
void luciad::EditSettings::setPrependAppendButton | ( | MouseButton | button | ) |
button | the mouse button that is used by handles that prepend or append something |
void luciad::EditSettings::setPrependAppendCursor | ( | MouseCursor | cursor | ) |
cursor | the cursor that is used for handles that prepend or append something |
void luciad::EditSettings::setPrependAppendModifierKeys | ( | ModifierKeys | modifierKeys | ) |
modifierKeys | the modifier keys that are used by handles to prepend or append something |
void luciad::EditSettings::setRemoveButton | ( | MouseButton | button | ) |
button | the mouse button that is used by handles to remove something |
void luciad::EditSettings::setRemoveCursor | ( | MouseCursor | cursor | ) |
cursor | the cursor that is used for handles that remove something |
void luciad::EditSettings::setRemoveModifierKeys | ( | ModifierKeys | modifierKeys | ) |
modifierKeys | the modifier keys that are used by handles to remove something |
void luciad::EditSettings::setShadowComplexStrokeLineStyle | ( | std::optional< ComplexStrokeLineStyle > | style | ) |
Sets the complex stroke line style that is used for shadow lines.
Only one shadow line style can be set, if this function is called with a non std::nullopt
value when a ComplexStrokeLineStyle
has already been set, it will be overwritten.
style | the complex stroke line style that is used for shadow lines. |
void luciad::EditSettings::setShadowFillStyle | ( | std::optional< FillStyle > | style | ) |
Fill style that is used when a shadow version of a geometry is painted.
Setting this to std::nullopt
means the shadow version of the geometry won't have a fill style.
style | fill style that is used when a shadow version of a geometry is painted. |
void luciad::EditSettings::setShadowIcon | ( | std::shared_ptr< IIcon > | icon | ) |
icon | the icon that is used when a shadow version of a geometry is painted. Can be nullptr . In that case no icon is painted. |
void luciad::EditSettings::setShadowLineStyle | ( | std::optional< LineStyle > | style | ) |
Sets the line style that is used for shadow lines.
Only one shadow line style can be set, if this function is called with a non std::nullopt
value when a ComplexStrokeLineStyle
has already been set, it will be overwritten.
style | the line style that is used for shadow lines. |
void luciad::EditSettings::setTranslateButton | ( | MouseButton | button | ) |
button | the mouse button that is used for translate handles |
void luciad::EditSettings::setTranslateCursor | ( | MouseCursor | cursor | ) |
cursor | the cursor that is used for translate handles |
void luciad::EditSettings::setTranslateModifierKeys | ( | ModifierKeys | modifierKeys | ) |
modifierKeys | the modifier keys that are used by the translate handles |
void luciad::EditSettings::setVisualAidComplexStrokeLineStyle | ( | std::optional< ComplexStrokeLineStyle > | style | ) |
Sets the complex stroke line style that is used for visual aid lines.
Only one visual aid line style can be set, if this function is called with a non std::nullopt
value when a ComplexStrokeLineStyle
has already been set, it will be overwritten.
style | the complex stroke line style that is used for visual aid lines. |
void luciad::EditSettings::setVisualAidLineStyle | ( | std::optional< LineStyle > | style | ) |
Sets the line style that is used for visual aid lines.
Only one visual aid line style can be set, if this function is called with a non std::nullopt
value when a ComplexStrokeLineStyle
has already been set, it will be overwritten.
style | the line style that is used for visual aid lines. |