| @@ 178-187 (lines=10) @@ | ||
| 175 | /** |
|
| 176 | * Get the colour code set for Bg and Fg |
|
| 177 | */ |
|
| 178 | public function getSelectedSetCode() : string |
|
| 179 | { |
|
| 180 | return sprintf( |
|
| 181 | "\033[%sm", |
|
| 182 | implode(';', [ |
|
| 183 | self::$availableBackgroundColors[$this->getFg()]['set'], |
|
| 184 | self::$availableForegroundColors[$this->getBg()]['set'], |
|
| 185 | ]) |
|
| 186 | ); |
|
| 187 | } |
|
| 188 | ||
| 189 | /** |
|
| 190 | * Get the colour unset code for Bg and Fg |
|
| @@ 192-201 (lines=10) @@ | ||
| 189 | /** |
|
| 190 | * Get the colour unset code for Bg and Fg |
|
| 191 | */ |
|
| 192 | public function getSelectedUnsetCode() : string |
|
| 193 | { |
|
| 194 | return sprintf( |
|
| 195 | "\033[%sm", |
|
| 196 | implode(';', [ |
|
| 197 | self::$availableBackgroundColors[$this->getBg()]['unset'], |
|
| 198 | self::$availableForegroundColors[$this->getFg()]['unset'], |
|
| 199 | ]) |
|
| 200 | ); |
|
| 201 | } |
|
| 202 | ||
| 203 | /** |
|
| 204 | * Get the inverted colour code |
|
| @@ 206-215 (lines=10) @@ | ||
| 203 | /** |
|
| 204 | * Get the inverted colour code |
|
| 205 | */ |
|
| 206 | public function getUnselectedSetCode() : string |
|
| 207 | { |
|
| 208 | return sprintf( |
|
| 209 | "\033[%sm", |
|
| 210 | implode(';', [ |
|
| 211 | self::$availableBackgroundColors[$this->getBg()]['set'], |
|
| 212 | self::$availableForegroundColors[$this->getFg()]['set'], |
|
| 213 | ]) |
|
| 214 | ); |
|
| 215 | } |
|
| 216 | ||
| 217 | /** |
|
| 218 | * Get the inverted colour unset code |
|
| @@ 220-229 (lines=10) @@ | ||
| 217 | /** |
|
| 218 | * Get the inverted colour unset code |
|
| 219 | */ |
|
| 220 | public function getUnselectedUnsetCode() : string |
|
| 221 | { |
|
| 222 | return sprintf( |
|
| 223 | "\033[%sm", |
|
| 224 | implode(';', [ |
|
| 225 | self::$availableBackgroundColors[$this->getBg()]['unset'], |
|
| 226 | self::$availableForegroundColors[$this->getFg()]['unset'], |
|
| 227 | ]) |
|
| 228 | ); |
|
| 229 | } |
|
| 230 | ||
| 231 | /** |
|
| 232 | * Calculate the contents width |
|