106 | | ^(Describe and link the implementation results here (from the wiki or the repository).)^ |
| 106 | Done according to the design. |
| 107 | |
| 108 | Source code: [5989], [6020], [6133], [6188], [6230], [6238], [6308], [6345], [6350], [6360] |
| 109 | |
| 110 | * Selection: |
| 111 | * PwaSelector - as described in the design it is responsible for managing the edit scope and selection. Its {{{ select }}} methods are used by the selection logics. |
| 112 | * ElementLogic has a single operation ON_TOGGLE_ELEMENT_SELECTION which handles selecting/deselecting elements by clicking on them. More than one element can be selected by holding down the Ctrl key. |
| 113 | * ScenePageLogic's operation DRAG_TO_SELECT_PAGE_ELEMENTS handles selecting page elements by dragging. |
| 114 | * This operation is invoked on MOUSE_PRESSED and uses a MouseCapture object to follow the position of the mouse. |
| 115 | * The point where the mouse was pressed and the current position of the mouse define the selection rectangle. All page elements whose bounds are inside this rectangle are marked as selected. |
| 116 | * Currently stickies can be selected by clicking on them and not by dragging. |
| 117 | |
| 118 | * Templating and locking background, border and insets (BorderAndBackgroundHud, InsetsHud) |
| 119 | * boolean isModeMatch(VisualElement element, TemplatedKey<?>/CompositeKey key, Mode mode) - a helper method that checks the mode of a specified key. |
| 120 | * 'Use template' mode: |
| 121 | * When a key is in template mode, the appropriate '... template' checkbox is selected. |
| 122 | * All other controls that may change its value are enabled. If the user changes something, the key is no longer in 'use template' mode and the checkbox is updated. |
| 123 | * ON_xxx_USE_TEMPLATE_SUBMIT operation in HudsLogic switches between template and custom mode. |
| 124 | * when switching to template mode the key's value is set to null |
| 125 | * when switching from template to custom mode, the key's value is copied |
| 126 | * 'Locked' mode: |
| 127 | * all controls that may change a key's value that is in locked mode should be disabled. |
| 128 | * ON_xxx_LOCKED_SUBMIT operation in HudsLogic locks a key, i.e. prevents it from any changes. |
| 129 | * before locking a key, we copy its value to make sure it is not in 'use template' mode. |
| 130 | * The methods that set template or lock to border and background are in StyledElementH. |