1 | <?php |
||
11 | trait SelectableTrait |
||
12 | { |
||
13 | /** |
||
14 | * @var string |
||
15 | */ |
||
16 | private $text = ''; |
||
17 | |||
18 | /** |
||
19 | * @var bool |
||
20 | */ |
||
21 | private $showItemExtra = false; |
||
22 | |||
23 | /** |
||
24 | * @var bool |
||
25 | */ |
||
26 | private $disabled = false; |
||
27 | |||
28 | /** |
||
29 | * @var int |
||
30 | */ |
||
31 | private $numberOfRows = 0; |
||
32 | |||
33 | /** |
||
34 | * @var int |
||
35 | */ |
||
36 | private $startRowNumber = 0; |
||
37 | |||
38 | /** |
||
39 | * Returns the number of terminal rows the item takes |
||
40 | */ |
||
41 | public function getNumberOfRows() { |
||
44 | |||
45 | /** |
||
46 | * Sets the row number the item starts at in the frame |
||
47 | */ |
||
48 | public function setStartRowNumber(int $rowNumber) { |
||
51 | |||
52 | /** |
||
53 | * Returns the row number the item starts at in the frame |
||
54 | */ |
||
55 | public function getStartRowNumber() { |
||
58 | |||
59 | /** |
||
60 | * The output text for the item |
||
61 | */ |
||
62 | public function getRows(MenuStyle $style, bool $selected = false) : array |
||
93 | |||
94 | /** |
||
95 | * Can the item be selected |
||
96 | */ |
||
97 | public function canSelect() : bool |
||
101 | |||
102 | public function showsItemExtra() : bool |
||
106 | |||
107 | /** |
||
108 | * Enable showing item extra |
||
109 | */ |
||
110 | public function showItemExtra() : void |
||
114 | |||
115 | /** |
||
116 | * Disable showing item extra |
||
117 | */ |
||
118 | public function hideItemExtra() : void |
||
122 | } |
||
123 |