| @@ 204-213 (lines=10) @@ | ||
| 201 | * |
|
| 202 | * @return string |
|
| 203 | */ |
|
| 204 | public function getSelectedSetCode() |
|
| 205 | { |
|
| 206 | return sprintf( |
|
| 207 | "\033[%sm", |
|
| 208 | implode(';', [ |
|
| 209 | self::$availableBackgroundColors[$this->getFg()]['set'], |
|
| 210 | self::$availableForegroundColors[$this->getBg()]['set'], |
|
| 211 | ]) |
|
| 212 | ); |
|
| 213 | } |
|
| 214 | ||
| 215 | /** |
|
| 216 | * Get the colour unset code for Bg and Fg |
|
| @@ 220-229 (lines=10) @@ | ||
| 217 | * |
|
| 218 | * @return string |
|
| 219 | */ |
|
| 220 | public function getSelectedUnsetCode() |
|
| 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 | * Get the inverted colour code |
|
| @@ 236-245 (lines=10) @@ | ||
| 233 | * |
|
| 234 | * @return string |
|
| 235 | */ |
|
| 236 | public function getUnselectedSetCode() |
|
| 237 | { |
|
| 238 | return sprintf( |
|
| 239 | "\033[%sm", |
|
| 240 | implode(';', [ |
|
| 241 | self::$availableBackgroundColors[$this->getBg()]['set'], |
|
| 242 | self::$availableForegroundColors[$this->getFg()]['set'], |
|
| 243 | ]) |
|
| 244 | ); |
|
| 245 | } |
|
| 246 | ||
| 247 | /** |
|
| 248 | * Get the inverted colour unset code |
|
| @@ 252-261 (lines=10) @@ | ||
| 249 | * |
|
| 250 | * @return string |
|
| 251 | */ |
|
| 252 | public function getUnselectedUnsetCode() |
|
| 253 | { |
|
| 254 | return sprintf( |
|
| 255 | "\033[%sm", |
|
| 256 | implode(';', [ |
|
| 257 | self::$availableBackgroundColors[$this->getBg()]['unset'], |
|
| 258 | self::$availableForegroundColors[$this->getFg()]['unset'], |
|
| 259 | ]) |
|
| 260 | ); |
|
| 261 | } |
|
| 262 | ||
| 263 | /** |
|
| 264 | * Calculate the contents width |
|