Isle
|
[AI] Presenter for UI controls, supporting toggles, grids, and "map" style controls with multiple interactive regions. More...
#include <mxcontrolpresenter.h>
Public Member Functions | |
MxControlPresenter () | |
[AI] Constructs an uninitialized control presenter with default state. More... | |
~MxControlPresenter () override | |
[AI] Destructor, cleans up internal state memory. More... | |
void | RepeatingTickle () override |
[AI] Override of idle/repeating tickle; does nothing by default in this implementation. More... | |
MxBool | VTable0x64 (undefined4 p_undefined) override |
[AI] Virtual stub, returns current enabled flag for the presenter. More... | |
virtual void | VTable0x68 (MxBool p_unk0x50) |
[AI] Changes the enabled state flag. More... | |
const char * | ClassName () const override |
[AI] Returns the class name string. More... | |
MxBool | IsA (const char *p_name) const override |
[AI] Checks class ancestry for runtime type information by comparing with this class and parent class names. More... | |
void | ReadyTickle () override |
[AI] Handles transition into the 'ready' tickle state; disables tickling and advances state. More... | |
void | ParseExtra () override |
[AI] Parses any configuration/customization provided in the extra data for the action, e.g., style, grid or map definitions, and sets up internal state for the control accordingly. More... | |
MxResult | AddToManager () override |
[AI] Registers this presenter with the tickle manager and prepares for input handling. More... | |
MxResult | StartAction (MxStreamController *, MxDSAction *) override |
[AI] Starts a new UI control action, configuring sub-presenters as required and enabling/disabling them based on parsed state logic. More... | |
void | EndAction () override |
[AI] Handles ending of a control's action; may fire notifications and update internal flags. More... | |
MxBool | HasTickleStatePassed (TickleState p_tickleState) override |
[AI] Checks if a specific tickle state has passed for the currently active sub-presenter, based on the presenter's current control index. More... | |
void | Enable (MxBool p_enable) override |
[AI] Enables or disables the control; delegates enable to correct sub-presenter based on current state/index. More... | |
virtual void | VTable0x6c (MxS16 p_unk0x4e) |
[AI] Selects a state/sub-control by index, or advances the currently selected state if -1 is provided. More... | |
MxBool | FUN_10044480 (LegoControlManagerNotificationParam *p_param, MxPresenter *p_presenter) |
[AI] Processes a notification param and presenter, reacting to input or click events; sets notification and updates state/target. More... | |
MxBool | FUN_10044270 (MxS32 p_x, MxS32 p_y, MxPresenter *p_presenter) |
[AI] Tests if an input event at position (x, y) targets the supplied presenter's region as defined by the control's style (toggle/grid/map). More... | |
MxS16 | GetUnknown0x4e () |
[AI] Returns the current selected/control state index. More... | |
![]() | |
MxCompositePresenter () | |
[AI] Default constructor; registers the composite presenter with the notification manager. More... | |
~MxCompositePresenter () override | |
[AI] Destructor, unregisters the presenter from the notification manager and properly cleans up contained presenters. More... | |
MxLong | Notify (MxParam &p_param) override |
[AI] Notifies the composite presenter of a particular event (such as end of sub-action or notification from a child presenter). More... | |
const char * | ClassName () const override |
[AI] Returns the dynamic class name; used for runtime type identification. More... | |
MxBool | IsA (const char *p_name) const override |
[AI] Runtime type checking for presenter class hierarchy, supporting parent/child class checks. More... | |
MxResult | StartAction (MxStreamController *p_controller, MxDSAction *p_action) override |
[AI] Starts a composite action by creating child presenters for each action in a MxDSMultiAction list and starting them. More... | |
void | EndAction () override |
[AI] Ends the composite action, terminating all child presenters and clearing action lists. Sends end notifications if needed. More... | |
void | SetTickleState (TickleState p_tickleState) override |
[AI] Change the tickle state of this composite presenter and propagate to each child. More... | |
MxBool | HasTickleStatePassed (TickleState p_tickleState) override |
[AI] Checks if all child presenters have advanced past the given tickle state. More... | |
void | Enable (MxBool p_enable) override |
[AI] Enables or disables this presenter and all child presenters. More... | |
virtual void | VTable0x58 (MxEndActionNotificationParam &p_param) |
[AI] Handler for "end action" notification, invoked when one of the child presenters finishes its assigned sub-action. More... | |
virtual void | VTable0x5c (MxNotificationParam &p_param) |
[AI] Handler for generic presenter notification, such as state change. More... | |
virtual void | VTable0x60 (MxPresenter *p_presenter) |
[AI] Advance sequencing for serial multi-actions: promotes the next presenter in sequence to e_ready state after predecessor finishes. More... | |
virtual MxBool | VTable0x64 (undefined4 p_undefined) |
[AI] Delegated state/mode checking. More... | |
MxCompositePresenterList * | GetList () |
[AI] Returns reference to the internal list of child presenters managed by this composite. More... | |
![]() | |
MxPresenter () | |
[AI] Constructor. Initializes internal tickle state and other members. More... | |
MxResult | Tickle () override |
[AI] Main tickle handler, called periodically to progress presenter's internal state. More... | |
virtual void | VTable0x14 () |
[AI] Reserved for future or specialized use in derived classes. More... | |
virtual void | ReadyTickle () |
[AI] Handles the transition and setup for the Ready state. Parses extra action data and advances state. More... | |
virtual void | StartingTickle () |
[AI] Handles actions required when first starting presentation. Advances to streaming state. More... | |
virtual void | StreamingTickle () |
[AI] Handles periodic updates during the streaming/presentation stage. Advances to repeating state. More... | |
virtual void | RepeatingTickle () |
[AI] Handles updates when in a repeating (looping) stage. Advances to freezing state. More... | |
virtual void | FreezingTickle () |
[AI] Handles updates during the freezing/suspended state. Advances to done state. More... | |
~MxPresenter () override | |
[AI] Destructor, cleans up resources (base class: does nothing beyond Init). More... | |
virtual MxResult | AddToManager () |
[AI] Optional registration with a manager (such as TickleManager); by default does nothing. More... | |
virtual void | Destroy () |
[AI] Resets presenter state or cleans up resources after completion/removal. More... | |
virtual MxResult | StartAction (MxStreamController *, MxDSAction *) |
[AI] Initiates presenter for a new action, setting up context and state. More... | |
virtual void | EndAction () |
[AI] Terminates the current action, notifies listeners and resets state. More... | |
virtual void | SetTickleState (TickleState p_tickleState) |
[AI] Forces the tickle state, advancing to the requested lifecycle stage. More... | |
virtual MxBool | HasTickleStatePassed (TickleState p_tickleState) |
[AI] Checks if the specified tickle state has ever been passed since last reset. More... | |
virtual MxResult | PutData () |
[AI] Allows the presenter to submit pending results or output to the engine. More... | |
virtual MxBool | IsHit (MxS32 p_x, MxS32 p_y) |
[AI] Returns TRUE if the given (x, y) falls within hit-test bounds for the presenter (e.g. More... | |
virtual void | Enable (MxBool p_enable) |
[AI] Enables or disables this presenter (controls action flags accordingly). More... | |
const char * | ClassName () const override |
[AI] Returns the run-time class name for this presenter. More... | |
MxBool | IsA (const char *p_name) const override |
[AI] Determines if this object is of (or inherits) the specified named class. More... | |
MxEntity * | CreateEntity (const char *p_defaultName) |
[AI] Creates an entity based on action 'extra' data, or uses the provided default name. More... | |
void | SendToCompositePresenter (MxOmni *p_omni) |
[AI] Notifies a composite presenter (if one exists) that this presenter wishes to join a group. More... | |
MxBool | IsEnabled () |
[AI] Returns whether this presenter is logically enabled (based on the associated action's flags). More... | |
MxS32 | GetCurrentTickleState () const |
[AI] Returns the current tickle state. More... | |
MxPoint32 | GetLocation () const |
[AI] Returns the presenter's screen location (in pixels). More... | |
MxS32 | GetX () const |
[AI] Returns the X coordinate of screen location. More... | |
MxS32 | GetY () const |
[AI] Returns the Y coordinate of screen location. More... | |
MxS32 | GetDisplayZ () const |
[AI] Returns the display Z (depth) order. More... | |
MxDSAction * | GetAction () const |
[AI] Returns the current action being presented. More... | |
void | SetAction (MxDSAction *p_action) |
[AI] Sets the action associated with this presenter. More... | |
void | SetCompositePresenter (MxCompositePresenter *p_compositePresenter) |
[AI] Sets the composite presenter to notify/join on completion. More... | |
void | SetDisplayZ (MxS32 p_displayZ) |
[AI] Sets the display Z (depth) order for the presenter. More... | |
![]() | |
MxCore () | |
[AI] Constructs a new MxCore object and assigns it a unique id. More... | |
virtual | ~MxCore () |
[AI] Virtual destructor. Required for correct polymorphic cleanup in derived classes. More... | |
virtual MxLong | Notify (MxParam &p_param) |
[AI] Virtual callback notification mechanism. More... | |
virtual MxResult | Tickle () |
[AI] Called by tickle managers to allow the object to update itself. More... | |
virtual const char * | ClassName () const |
[AI] Returns the runtime class name of this object. More... | |
virtual MxBool | IsA (const char *p_name) const |
[AI] Checks whether this object's class type or parents match the given name. More... | |
MxU32 | GetId () |
[AI] Gets the unique (per-process) id assigned to this object instance. More... | |
Additional Inherited Members | |
![]() | |
enum | TickleState { e_idle = 0 , e_ready , e_starting , e_streaming , e_repeating , e_freezing , e_done } |
[AI] Represents the state of the presenter's tickle (update) lifecycle. More... | |
![]() | |
static const char * | HandlerClassName () |
[AI] Returns the handler class name ("MxCompositePresenter"). More... | |
![]() | |
static const char * | HandlerClassName () |
[AI] Returns the handler class name for identification and reflection purposes. More... | |
![]() | |
virtual void | DoneTickle () |
[AI] Handles any post-completion logic, resetting to idle state. More... | |
virtual void | ParseExtra () |
[AI] Parses additional data from the associated action for configuration or world interaction. More... | |
void | ProgressTickleState (TickleState p_tickleState) |
[AI] Helper for advancing the presenter's tickle state and updating transition history. More... | |
void | Init () |
[AI] Initializes object state to post-construction defaults. More... | |
![]() | |
MxCompositePresenterList | m_list |
[AI] List of owned child presenters that are managed by this MxCompositePresenter. Actions are created/shutdown with this list. More... | |
![]() | |
TickleState | m_currentTickleState |
[AI] Current state in the tickle lifecycle. More... | |
MxU32 | m_previousTickleStates |
[AI] Bitfield representing all tickle states that have already occurred during this lifetime. More... | |
MxPoint32 | m_location |
[AI] 2D display location for the presenter. More... | |
MxS32 | m_displayZ |
[AI] Z-order value for display stacking. More... | |
MxDSAction * | m_action |
[AI] The associated action currently being presented by this presenter. More... | |
MxCriticalSection | m_criticalSection |
[AI] Thread synchronization for presenter state and data. More... | |
MxCompositePresenter * | m_compositePresenter |
[AI] Owner composite presenter, if any. More... | |
[AI] Presenter for UI controls, supporting toggles, grids, and "map" style controls with multiple interactive regions.
Subclass of MxCompositePresenter that manages multiple visual states and user interactions for a complex control (like a button grid or regioned bitmap). [AI]
[AI] MxControlPresenter is responsible for handling user input, state switching, and tickle management for complex GUI controls in LEGO Island. It supports three main modes: toggle, grid, or map (which maps pixel color/values to states for hit detection), and can parse parameters from 'extra' data to configure itself. Clicking or interacting with the control will fire notifications and may change the controlled presenter's state accordingly. [AI]
Definition at line 17 of file mxcontrolpresenter.h.
MxControlPresenter::MxControlPresenter | ( | ) |
[AI] Constructs an uninitialized control presenter with default state.
Definition at line 17 of file mxcontrolpresenter.cpp.
|
override |
[AI] Destructor, cleans up internal state memory.
Definition at line 28 of file mxcontrolpresenter.cpp.
|
overridevirtual |
[AI] Registers this presenter with the tickle manager and prepares for input handling.
[AI]
Reimplemented from MxPresenter.
Definition at line 36 of file mxcontrolpresenter.cpp.
|
inlineoverridevirtual |
[AI] Returns the class name string.
[AI]
Reimplemented from MxCore.
Definition at line 55 of file mxcontrolpresenter.h.
|
overridevirtual |
[AI] Enables or disables the control; delegates enable to correct sub-presenter based on current state/index.
[AI]
p_enable | [AI] TRUE to enable, FALSE to disable. |
Reimplemented from MxPresenter.
Definition at line 270 of file mxcontrolpresenter.cpp.
|
overridevirtual |
[AI] Handles ending of a control's action; may fire notifications and update internal flags.
[AI]
Reimplemented from MxPresenter.
Definition at line 67 of file mxcontrolpresenter.cpp.
MxBool MxControlPresenter::FUN_10044270 | ( | MxS32 | p_x, |
MxS32 | p_y, | ||
MxPresenter * | p_presenter | ||
) |
[AI] Tests if an input event at position (x, y) targets the supplied presenter's region as defined by the control's style (toggle/grid/map).
Updates hit-state index used by VTable0x6c. [AI]
p_x | [AI] X-coordinate of the event. |
p_y | [AI] Y-coordinate of the event. |
p_presenter | [AI] The presenter involved in hit-testing. |
Definition at line 77 of file mxcontrolpresenter.cpp.
MxBool MxControlPresenter::FUN_10044480 | ( | LegoControlManagerNotificationParam * | p_param, |
MxPresenter * | p_presenter | ||
) |
[AI] Processes a notification param and presenter, reacting to input or click events; sets notification and updates state/target.
[AI]
p_param | [AI] Notification parameter object (event/click, etc). |
p_presenter | [AI] The target presenter for the input event. |
Definition at line 147 of file mxcontrolpresenter.cpp.
|
inline |
[AI] Returns the current selected/control state index.
[AI_SUGGESTED_NAME: GetSelectedState]
Definition at line 134 of file mxcontrolpresenter.h.
|
overridevirtual |
[AI] Checks if a specific tickle state has passed for the currently active sub-presenter, based on the presenter's current control index.
[AI]
p_tickleState | [AI] Tickle state to check. |
Reimplemented from MxPresenter.
Definition at line 292 of file mxcontrolpresenter.cpp.
|
inlineoverridevirtual |
[AI] Checks class ancestry for runtime type information by comparing with this class and parent class names.
[AI]
p_name | [AI] String to compare against. |
Reimplemented from MxCore.
Definition at line 67 of file mxcontrolpresenter.h.
|
overridevirtual |
[AI] Parses any configuration/customization provided in the extra data for the action, e.g., style, grid or map definitions, and sets up internal state for the control accordingly.
[AI]
Reimplemented from MxPresenter.
Definition at line 211 of file mxcontrolpresenter.cpp.
|
overridevirtual |
[AI] Handles transition into the 'ready' tickle state; disables tickling and advances state.
[AI]
Reimplemented from MxPresenter.
Definition at line 202 of file mxcontrolpresenter.cpp.
|
inlineoverridevirtual |
[AI] Override of idle/repeating tickle; does nothing by default in this implementation.
[AI]
Reimplemented from MxPresenter.
Definition at line 32 of file mxcontrolpresenter.h.
|
overridevirtual |
[AI] Starts a new UI control action, configuring sub-presenters as required and enabling/disabling them based on parsed state logic.
[AI]
p_controller | [AI] Stream controller for action. |
p_action | [AI] Action to be started. |
Reimplemented from MxPresenter.
Definition at line 43 of file mxcontrolpresenter.cpp.
|
inlineoverridevirtual |
[AI] Virtual stub, returns current enabled flag for the presenter.
[AI]
p_undefined | [AI] Unused/meaningless argument; ignored. |
Reimplemented from MxCompositePresenter.
Definition at line 40 of file mxcontrolpresenter.h.
|
inlinevirtual |
[AI] Changes the enabled state flag.
[AI]
p_unk0x50 | [AI] New enabled flag value. |
Definition at line 47 of file mxcontrolpresenter.h.
|
virtual |
[AI] Selects a state/sub-control by index, or advances the currently selected state if -1 is provided.
Notifies the action and sets tickle/enable state in all sub-presenters. [AI]
p_unk0x4e | [AI] A state index; if -1, advances state; otherwise, selects the given one. [AI_SUGGESTED_NAME: SetSelectedState] |
Definition at line 178 of file mxcontrolpresenter.cpp.