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