Archicad 28 C++ API
|
Classes | |
class | ACAPI::Tracking::v1::TrackerManager |
TrackerManager is a class to access the main tracker with. More... | |
class | Tracking::Tracker |
Class for managing one specific tracker and its fields. More... | |
class | Tracking::Tracker::HintGuard |
Helper guard class to specify a hint what to do when the editing of a field needs to be ended and possibly the reason for ending it. More... | |
class | Tracking::Tracker::InEditKeyboardHandler |
Class to derive from, when creating custom keyboard handlers for the tracker's edit mode. More... | |
class | Tracking::Tracker::RunningModeKeyboardHandler |
Class to derive from, when creating custom keyboard handlers for the tracker's running mode. More... | |
Typedefs | |
using | ACAPI::Tracking::v1::TrackerRef = std::reference_wrapper<::Tracking::Tracker > |
Reference to the type Tracking::Tracker. | |
typedef GS::ConstForwardIterator< ITrackerItem * > | Tracking::Tracker::ConstItemIterator |
A constant iterator to read the items of the tracker. | |
typedef GS::ForwardIterator< ITrackerItem * > | Tracking::Tracker::ItemIterator |
An iterator for accessing the items of the tracker. | |
Enumerations | |
enum class | Tracking::Tracker::ValueHandlingOnDeactivate { Tracking::Tracker::ValueHandlingOnDeactivate::Accept , Tracking::Tracker::ValueHandlingOnDeactivate::Reject } |
Determines what to do with the edited field's latest value when the editing of the field needs to end. More... | |
enum class | Tracking::Tracker::PositionHandingOnDeactivate { Tracking::Tracker::PositionHandingOnDeactivate::KeepAsItIs , Tracking::Tracker::PositionHandingOnDeactivate::RemoveFromIdealPosition } |
Determines how to relocate the tracker when the editing of the field needs to be ended. More... | |
Functions | |
Result< TrackerManager > | ACAPI::Tracking::v1::GetTrackerManager () |
A function to create TrackerManager instance. | |
Tracking::Tracker::HintGuard::HintGuard (Tracker &trackerToGuard, Hint newHint) | |
Starts the scope of the hint. | |
Tracking::Tracker::HintGuard::~HintGuard () | |
Finishes the scope of the hint. | |
Tracker & | Tracking::Tracker::InEditKeyboardHandler::GetTracker () |
Gets the parent tracker, where the events will be handled. | |
virtual DG::EventHandlerResultType | Tracking::Tracker::InEditKeyboardHandler::KeyPressed (const DG::Key::Code &code, DG::Item **item) override |
Handles a regular key press event. | |
virtual DG::EventHandlerResultType | Tracking::Tracker::InEditKeyboardHandler::KeyPressed (const DG::Key::Modifier &modifier, DG::Item **item) override |
Handles a modifier key press event. | |
Tracker & | Tracking::Tracker::RunningModeKeyboardHandler::GetTracker () |
Gets the parent tracker, where the events will be handled. | |
virtual DG::EventHandlerResultType | Tracking::Tracker::RunningModeKeyboardHandler::KeyPressed (const DG::Key::Code &code, DG::Item **item) override |
Handles a regular key press event. | |
virtual DG::EventHandlerResultType | Tracking::Tracker::RunningModeKeyboardHandler::KeyPressed (const DG::Key::Modifier &modifier, DG::Item **item) override |
Handles a modifier key press event. | |
void | Tracking::Tracker::ShowReturnToRunningModeButton (bool show) |
Provides the option to force hiding the Mark Position button for each field of the tracker. | |
void | Tracking::Tracker::RefreshSize () |
Updates the size of the entire tracker based on its content such as fields, icons, etc. | |
Tracking::Tracker::Tracker () | |
Tracker constructor. | |
void | Tracking::Tracker::AddItem (ITrackerItem *trackerItem) |
Add an item to the tracker. | |
void | Tracking::Tracker::SwapItems (ITrackerItem *trackerItem1, ITrackerItem *trackerItem2) |
Swaps the specified items. | |
ConstItemIterator | Tracking::Tracker::EnumerateAllItems () const |
Provides a constant iterator to read each item of the tracker regardless whether they are visible or not. | |
ItemIterator | Tracking::Tracker::EnumerateAllItems () |
Provides an iterator to access each item of the tracker regardless whether they are visible or not. | |
ConstItemIterator | Tracking::Tracker::EnumerateVisibleItems () const |
Provides a constant iterator to read the visible items of the tracker. | |
ItemIterator | Tracking::Tracker::EnumerateVisibleItems () |
Provides an iterator to access the visible items of the tracker. | |
const ITrackerItem * | Tracking::Tracker::GetSelectedItem () const |
Provides the item for the tracker field that is currently the default one, shown with bold fonts, or is being edited. | |
ITrackerItem * | Tracking::Tracker::GetSelectedItem () |
Provides access to change the item that is currently the default field, shown with bold fonts, or is being edited. | |
virtual void | Tracking::Tracker::Synchronize () |
Draws the tracker after ensuring that each field's value is consistent based on the input. | |
virtual void | Tracking::Tracker::RefreshFade () |
Function for updating the fade animation. | |
DG::NativeRect | Tracking::Tracker::GetRect (void) const |
Provides the size and position of the tracker. | |
void | Tracking::Tracker::SetPosition (const DG::NativePoint &point, bool animated=false, short milliSec=-1) |
Repositions the tracker with the possibility of being animated. | |
void | Tracking::Tracker::MoveToVisiblePosition () |
Moves the tracker to near to its current location but where it doesn't obstruct anything. | |
void | Tracking::Tracker::StayInVisiblePosition () |
Makes tracker stay at the position set by MoveToVisiblePosition. | |
DG::Item * | Tracking::Tracker::ActivateEditMode () |
Starts the editing of the currently default tracker field (see GetSelectedItem) | |
void | Tracking::Tracker::DeactivateEditMode (ValueHandlingOnDeactivate valueHandling, const GS::Optional< const ITrackerItem * > &acceptedItemPtr, PositionHandingOnDeactivate positionHandling) |
Stops the editing of the currently default tracker field (see GetSelectedItem) | |
bool | Tracking::Tracker::IsInEditMode () const |
Checks if any tracker field value is being edited. | |
bool | Tracking::Tracker::IsTrackerEditWindowActive () const |
Checks whether the tracker's window is focused. | |
void | Tracking::Tracker::SetNextActivableItem () |
Activates the editing of the field following (i.e. the row below) the default or edited one. | |
void | Tracking::Tracker::SetPrevActivableItem () |
Activates the editing of the field preceding (i.e. the row above) the default or edited one. | |
bool | Tracking::Tracker::IsFirstActivableItemActive () |
Checks whether the first editable field is currently being edited or not. | |
bool | Tracking::Tracker::IsLastActivableItemActive () |
Checks whether the last editable field is currently being edited or not. | |
void | Tracking::Tracker::SetFirstActivableItem () |
Activates the first editable field (i.e. the topmost editable row) | |
void | Tracking::Tracker::SetLastActivableItem () |
Activates the last editable field (i.e. the bottommost editable row) | |
void | Tracking::Tracker::Hide () override |
Hides the tracker. | |
void | Tracking::Tracker::Show () override |
Shows the tracker. | |
bool | Tracking::Tracker::IsVisible () const override |
Checks whether the tracker is visible or not. | |
void | Tracking::Tracker::SetGlobalOpacity (float opacity) |
Changes the opacity of the entire tracker, with its texts and background as a single unit. | |
void | Tracking::Tracker::SetShowParameterNames (bool showParameterNames) |
Changes the appearance of the tracker whether to display the name of the fields or not. | |
void | Tracking::Tracker::SetAllwaysShowParameterNames (bool allwaysShowParameterNames) |
Provides the option to override the value specified by SetShowParameterNames. | |
void | Tracking::Tracker::SetEditTrackerSizePreference (bool isEditTrackerMinimizedParam) |
Changes the behavior of the tracker whether to automatically expand and show every field each time a field is started to be edited. | |
static void | Tracking::Tracker::SetForegroundColor (const Gfx::Color &foregroundColorToSet) |
Changes the color of texts and icons globally for all trackers. | |
static void | Tracking::Tracker::SetBackgroundColor (const Gfx::Color &backgroundColorToSet) |
Changes the background color (i.e. the fill behind texts and icons) globally for all trackers. | |
static void | Tracking::Tracker::SetFrameColor (const Gfx::Color &frameColorToSet) |
Changes the frame color globally for all trackers. | |
static Gfx::Color | Tracking::Tracker::GetDefaultForegroundColor () |
Retrieves the color of texts and icons used globally by all trackers. | |
static Gfx::Color | Tracking::Tracker::GetDefaultBackgroundColor () |
Retrieves the background color (i.e. the fill behind texts and icons) used globally by all trackers. | |
static Gfx::Color | Tracking::Tracker::GetDefaultFrameColor () |
Retrieves the frame color used globally by all trackers. | |
static void | Tracking::Tracker::SetOpacity (float opacityToSet) |
Changes the opacity of the background (i.e. the fill behind texts and icons) for all trackers, globally. | |
static void | Tracking::Tracker::SetDrawFrame (bool drawFrameToSet) |
Changes whether to show the tracker's frame globally for all trackers. | |
static void | Tracking::Tracker::SetSmallFont (bool smallFontToSet) |
Changes whether the tracker rows should be display more compactly, globally for all trackers. | |
Gfx::Color | Tracking::Tracker::GetForegroundColor () |
Retrieves the color of texts and icons. | |
Gfx::Color | Tracking::Tracker::GetBackgroundColor () |
Retrieves the background color (i.e. the fill behind texts and icons) | |
Gfx::Color | Tracking::Tracker::GetFrameColor () |
Retrieves the tracker's frame color. | |
static float | Tracking::Tracker::GetOpacity () |
Retrieves the tracker's opacity. | |
bool | Tracking::Tracker::GetDrawFrame () |
Retrieves whether the tracker's frame is shown. | |
static bool | Tracking::Tracker::GetSmallFont () |
Retrieves whether tracker rows are displayed more compactly. | |
void | Tracking::Tracker::SetCustomBackgroundColor (const Gfx::Color &color) |
Changes the background color (i.e. the fill behind texts and icons) | |
void | Tracking::Tracker::SetCustomForeGroundColor (const Gfx::Color &color) |
Changes the color of texts and icons. | |
void | Tracking::Tracker::SetCustomFrameColor (const Gfx::Color &color) |
Changes the frame color. | |
void | Tracking::Tracker::SetCustomDrawFrame (bool drawFrameToSet) |
Changes whether to show the tracker's frame. | |
bool | Tracking::Tracker::IsDecimalSeparator (const DG::Key::Code &code) const |
Checks whether a keyboard code is for the decimal separator. | |
static short | Tracking::Tracker::ReadTrackerTimesPref (const GS::UniString &name, Int32 defaultValue) |
Utility function for retrieving tracker animation durations stored in the system preferences (i.e the registry on Windows) | |
void | Tracking::Tracker::SetInEditKeyboardHandler (GS::Owner< InEditKeyboardHandler > handler) |
Sets a keyboard handler to use in edit mode. | |
void | Tracking::Tracker::SetRunningModeKeyboardHandler (GS::Owner< RunningModeKeyboardHandler > handler) |
Sets a keyboard handler to use in running mode. | |
The Tracker API provides functions to create custom trackers.
using ACAPI::Tracking::v1::TrackerRef = typedef std::reference_wrapper<::Tracking::Tracker> |
Reference to the type Tracking::Tracker.
|
strong |
|
strong |
DG::Item * Tracking::Tracker::ActivateEditMode | ( | ) |
Starts the editing of the currently default tracker field (see GetSelectedItem)
void Tracking::Tracker::AddItem | ( | ITrackerItem * | trackerItem | ) |
Add an item to the tracker.
[in] | trackerItem | The item to be added |
void Tracking::Tracker::DeactivateEditMode | ( | ValueHandlingOnDeactivate | valueHandling, |
const GS::Optional< const ITrackerItem * > & | acceptedItemPtr, | ||
PositionHandingOnDeactivate | positionHandling | ||
) |
Stops the editing of the currently default tracker field (see GetSelectedItem)
[in] | valueHandling |
|
[in] | acceptedItemPtr | when the Optional has a value, the function emits an OnInputAccept event with the Optional's value as the argument of the event |
[in] | positionHandling | determines how to relocate the tracker when the editing of the field needs to end |
ItemIterator Tracking::Tracker::EnumerateAllItems | ( | ) |
Provides an iterator to access each item of the tracker regardless whether they are visible or not.
ConstItemIterator Tracking::Tracker::EnumerateAllItems | ( | ) | const |
Provides a constant iterator to read each item of the tracker regardless whether they are visible or not.
ItemIterator Tracking::Tracker::EnumerateVisibleItems | ( | ) |
Provides an iterator to access the visible items of the tracker.
ConstItemIterator Tracking::Tracker::EnumerateVisibleItems | ( | ) | const |
Provides a constant iterator to read the visible items of the tracker.
Gfx::Color Tracking::Tracker::GetBackgroundColor | ( | ) |
Retrieves the background color (i.e. the fill behind texts and icons)
The result is be defined by SetBackgroundColor unless overridden by SetCustomBackgroundColor
|
static |
Retrieves the background color (i.e. the fill behind texts and icons) used globally by all trackers.
The result is defined by SetBackgroundColor
|
static |
Retrieves the color of texts and icons used globally by all trackers.
The result is defined by SetForegroundColor
|
static |
Retrieves the frame color used globally by all trackers.
The result is defined by SetFrameColor
bool Tracking::Tracker::GetDrawFrame | ( | ) |
Retrieves whether the tracker's frame is shown.
true
, the trackers frame is displayedThe result might be defined by SetDrawFrame unless overridden by SetCustomDrawFrame
Gfx::Color Tracking::Tracker::GetForegroundColor | ( | ) |
Retrieves the color of texts and icons.
Gfx::Color Tracking::Tracker::GetFrameColor | ( | ) |
Retrieves the tracker's frame color.
The result is be defined by SetFrameColor unless overridden by SetCustomFrameColor
|
static |
Retrieves the tracker's opacity.
0.0f
, fully opaque when 1.0f
The result is defined by SetOpacity
DG::NativeRect Tracking::Tracker::GetRect | ( | void | ) | const |
Provides the size and position of the tracker.
ITrackerItem * Tracking::Tracker::GetSelectedItem | ( | ) |
Provides access to change the item that is currently the default field, shown with bold fonts, or is being edited.
const ITrackerItem * Tracking::Tracker::GetSelectedItem | ( | ) | const |
Provides the item for the tracker field that is currently the default one, shown with bold fonts, or is being edited.
|
static |
Retrieves whether tracker rows are displayed more compactly.
true
, the height of the rows are shorter
|
protected |
Gets the parent tracker, where the events will be handled.
|
protected |
Gets the parent tracker, where the events will be handled.
|
inline |
A function to create TrackerManager instance.
|
override |
Hides the tracker.
When called while a tracker field is being edited, the field's value is going to be rejected.
Tracking::Tracker::HintGuard::HintGuard | ( | Tracker & | trackerToGuard, |
Hint | newHint | ||
) |
Starts the scope of the hint.
[in,out] | trackerToGuard | the affected tracker |
[in] | newHint | the fields of trackerToGuard (i.e. ITrackerItem s) will receive this hint, which affect if the cursor should be moved or whether new Guide Lines needs to be placed |
bool Tracking::Tracker::IsDecimalSeparator | ( | const DG::Key::Code & | code | ) | const |
Checks whether a keyboard code is for the decimal separator.
[in] | code | the code identifying the keyboard key |
bool Tracking::Tracker::IsFirstActivableItemActive | ( | ) |
Checks whether the first editable field is currently being edited or not.
bool Tracking::Tracker::IsInEditMode | ( | ) | const |
Checks if any tracker field value is being edited.
bool Tracking::Tracker::IsLastActivableItemActive | ( | ) |
Checks whether the last editable field is currently being edited or not.
bool Tracking::Tracker::IsTrackerEditWindowActive | ( | ) | const |
Checks whether the tracker's window is focused.
|
override |
Checks whether the tracker is visible or not.
|
overrideprotectedvirtual |
Handles a regular key press event.
[in] | code | the code of the pressed key |
[out] | item | Pointer to the UI item where the key press should be forwarded. nullptr by default, leave it as is to not forward the event |
|
overrideprotectedvirtual |
Handles a regular key press event.
[in] | code | the code of the pressed key |
[out] | item | Pointer to the UI item where the key press should be forwarded. nullptr by default, leave it as is to not forward the event |
|
overrideprotectedvirtual |
Handles a modifier key press event.
[in] | modifier | the pressed modifier |
[out] | item | Pointer to the UI item where the key press should be forwarded. nullptr by default, leave it as is to not forward the event |
|
overrideprotectedvirtual |
Handles a modifier key press event.
[in] | modifier | the pressed modifier |
[out] | item | Pointer to the UI item where the key press should be forwarded. nullptr by default, leave it as is to not forward the event |
void Tracking::Tracker::MoveToVisiblePosition | ( | ) |
Moves the tracker to near to its current location but where it doesn't obstruct anything.
The location is determined by GetIdealTrackerPosition
.
|
static |
Utility function for retrieving tracker animation durations stored in the system preferences (i.e the registry on Windows)
[in] | name | the key's name for the duration value |
[in] | defaultValue | duration in milliseconds, in case the key doesn't exist in the preferences yet |
name
only contain characters representable in a C-stringdefaultValue
only to at most a couple seconds. (0 < defaultValue < 2000)
|
virtual |
Function for updating the fade animation.
void Tracking::Tracker::SetAllwaysShowParameterNames | ( | bool | allwaysShowParameterNames | ) |
Provides the option to override the value specified by SetShowParameterNames.
[in] | allwaysShowParameterNames | bool value, when true , field names are forced to be shown, otherwise not |
|
static |
Changes the background color (i.e. the fill behind texts and icons) globally for all trackers.
[in] | backgroundColorToSet | the new color for the background |
backgroundColorToSet
has no visible effect except for being stored. void Tracking::Tracker::SetCustomBackgroundColor | ( | const Gfx::Color & | color | ) |
Changes the background color (i.e. the fill behind texts and icons)
[in] | color | the new color for the background |
color
has no visible effect except for being stored. void Tracking::Tracker::SetCustomDrawFrame | ( | bool | drawFrameToSet | ) |
Changes whether to show the tracker's frame.
[in] | drawFrameToSet | bool value, when true , trackers will have a frame |
Overrides the value defined by SetDrawFrame
void Tracking::Tracker::SetCustomForeGroundColor | ( | const Gfx::Color & | color | ) |
Changes the color of texts and icons.
[in] | color | the new color for texts and icons |
color
has no visible effect except for being stored. void Tracking::Tracker::SetCustomFrameColor | ( | const Gfx::Color & | color | ) |
Changes the frame color.
[in] | color | the new color for the frame |
color
has no visible effect except for being stored.
|
static |
Changes whether to show the tracker's frame globally for all trackers.
[in] | drawFrameToSet | bool value, when true , trackers will have a frame |
drawFrameToSet = false | drawFrameToSet = true |
---|---|
void Tracking::Tracker::SetEditTrackerSizePreference | ( | bool | isEditTrackerMinimizedParam | ) |
Changes the behavior of the tracker whether to automatically expand and show every field each time a field is started to be edited.
[in] | isEditTrackerMinimizedParam | bool value, when true , some fields might not be shown immediately |
isEditTrackerMinimizedParam = true | isEditTrackerMinimizedParam = false |
---|---|
void Tracking::Tracker::SetFirstActivableItem | ( | ) |
Activates the first editable field (i.e. the topmost editable row)
When a field is being edited at the time of call, the function deactivates that.
|
static |
Changes the color of texts and icons globally for all trackers.
[in] | foregroundColorToSet | the new color for texts and icons |
foregroundColorToSet
has no visible effect except for being stored.
|
static |
Changes the frame color globally for all trackers.
[in] | frameColorToSet | the new color for the frame |
frameColorToSet
has no visible effect except for being stored. void Tracking::Tracker::SetGlobalOpacity | ( | float | opacity | ) |
Changes the opacity of the entire tracker, with its texts and background as a single unit.
[in] | opacity | a float value, fully transparent when 0.0f , fully opaque when 1.0f |
opacity
value is less than 0 or greater than 1. opacity = 0.0f | opacity = 0.33f | opacity = 0.66f | opacity = 1.00f |
---|---|---|---|
void Tracking::Tracker::SetInEditKeyboardHandler | ( | GS::Owner< InEditKeyboardHandler > | handler | ) |
Sets a keyboard handler to use in edit mode.
[in] | handler | the handler to set |
void Tracking::Tracker::SetLastActivableItem | ( | ) |
Activates the last editable field (i.e. the bottommost editable row)
When a field is being edited at the time of call, the function deactivates that.
void Tracking::Tracker::SetNextActivableItem | ( | ) |
Activates the editing of the field following (i.e. the row below) the default or edited one.
|
static |
Changes the opacity of the background (i.e. the fill behind texts and icons) for all trackers, globally.
[in] | opacityToSet | a float value, new opacity for the background
|
The behavior is undefined for cases when the opacity
value is less than 0 or greater than 1.
opacityToSet = 0.0f | opacityToSet = 0.33f | opacityToSet = 0.66f | opacityToSet = 1.00f |
---|---|---|---|
void Tracking::Tracker::SetPosition | ( | const DG::NativePoint & | point, |
bool | animated = false , |
||
short | milliSec = -1 |
||
) |
Repositions the tracker with the possibility of being animated.
[in] | point | Target top left position as DG::NativePoint (where values multiplied with the HiDPI factor) |
[in] | animated | False by default. When true, the repositioning is animated. |
[in] | milliSec |
|
void Tracking::Tracker::SetPrevActivableItem | ( | ) |
Activates the editing of the field preceding (i.e. the row above) the default or edited one.
void Tracking::Tracker::SetRunningModeKeyboardHandler | ( | GS::Owner< RunningModeKeyboardHandler > | handler | ) |
Sets a keyboard handler to use in running mode.
[in] | handler | the handler to set |
void Tracking::Tracker::SetShowParameterNames | ( | bool | showParameterNames | ) |
Changes the appearance of the tracker whether to display the name of the fields or not.
[in] | showParameterNames | bool value, when true , field names are shown, otherwise not |
Side effect: When called while editing a field, the field input might be deactivated and activated
showParameterNames = false | showParameterNames = true |
---|---|
|
static |
Changes whether the tracker rows should be display more compactly, globally for all trackers.
[in] | smallFontToSet | bool value, when true , the height of the rows will be shorter |
smallFontToSet = false | smallFontToSet = true |
---|---|
|
protected |
Provides the option to force hiding the Mark Position button for each field of the tracker.
[in] | show |
|
void Tracking::Tracker::StayInVisiblePosition | ( | ) |
Makes tracker stay at the position set by MoveToVisiblePosition.
Related to the Tracker Landing Game easter egg
void Tracking::Tracker::SwapItems | ( | ITrackerItem * | trackerItem1, |
ITrackerItem * | trackerItem2 | ||
) |
Swaps the specified items.
[in] | trackerItem1 | Item to be swapped with trackerItem2 |
[in] | trackerItem2 | Item to be swapped with trackerItem1 |
Tracking::Tracker::Tracker | ( | ) |
Tracker constructor.
Side effect: Initializes tracker animation durations called "QuickAnimationTime" and "SlowAnimationTime" within system preferences in case these haven't been done yet (see also ReadTrackerTimesPref)
Tracking::Tracker::HintGuard::~HintGuard | ( | ) |
Finishes the scope of the hint.
trackerToGuard
is restored to its original state