SDL Window Engine  20200905
swe_termwin.h
1 /***************************************************************************
2  * Copyright (C) 2017 by SWE team <sdl.window.engine@gmail.com> *
3  * *
4  * Part of the SWE: SDL Window Engine: *
5  * https://github.com/AndreyBarmaley/sdl-window-engine *
6  * *
7  * This program is free software; you can redistribute it and/or modify *
8  * it under the terms of the GNU General Public License as published by *
9  * the Free Software Foundation; either version 3 of the License, or *
10  * (at your option) any later version. *
11  * *
12  * This program is distributed in the hope that it will be useful, *
13  * but WITHOUT ANY WARRANTY; without even the implied warranty of *
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
15  * GNU General Public License for more details. *
16  * *
17  * You should have received a copy of the GNU General Public License *
18  * along with this program; if not, write to the *
19  * Free Software Foundation, Inc., *
20  * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
21  ***************************************************************************/
22 
23 #ifndef _SWE_TERMWIN_
24 #define _SWE_TERMWIN_
25 
26 #include "swe_window.h"
27 
29 namespace SWE
30 {
33  enum LineType
34  {
39  };
40 
42  enum MoveDirection { MoveCenter, MoveUp, MoveDown, MoveLeft, MoveRight, MoveUpperLeft, MoveUpperRight, MoveLowerLeft, MoveLowerRight, MoveFirst, MoveLast };
43 
45  namespace acs
46  {
48  int vline(const LineType &);
50  int hline(const LineType &);
52  int ulcorner(const LineType &);
54  int urcorner(const LineType &);
56  int llcorner(const LineType &);
58  int lrcorner(const LineType &);
60  int ltee(const LineType &);
62  int rtee(const LineType &);
64  int ttee(const LineType &);
66  int btee(const LineType &);
68  int plus(const LineType &);
69  }
70 
73  {
74  TermSize() {}
75  TermSize(size_t cols, size_t rows) : packshort(cols, rows) {}
76  TermSize(const Size & sz) : packshort(sz.w, sz.h) {}
77 
78  size_t cols(void) const { return val1(); }
79  size_t rows(void) const { return val2(); }
80 
81  void setSize(size_t cols, size_t rows) { set1(cols); set2(rows); }
82 
83  TermSize operator+ (const TermSize & ts) const { return TermSize(cols() + ts.cols(), rows() + ts.rows()); }
84  TermSize operator- (const TermSize & ts) const { return TermSize(cols() - ts.cols(), rows() - ts.rows()); }
85 
86  TermSize & operator+= (const TermSize & ts) { setSize(cols() + ts.cols(), rows() + ts.rows()); return *this; }
87  TermSize & operator-= (const TermSize & ts) { setSize(cols() - ts.cols(), rows() - ts.rows()); return *this; }
88 
89  Size toSize(void) const { return Size(cols(), rows()); }
90  };
91 
93  struct TermPos : packshort
94  {
95  TermPos() {}
96  TermPos(int posx, int posy) : packshort(posx, posy) {}
97  TermPos(const Point & pt) : packshort(pt.x, pt.y) {}
98 
99  int posx(void) const { return val1(); }
100  int posy(void) const { return val2(); }
101 
102  void setPos(int posx, int posy) { set1(posx); set2(posy); }
103 
104  TermPos operator+ (const TermPos & tp) const { return TermPos(posx() + tp.posx(), posy() + tp.posy()); }
105  TermPos operator- (const TermPos & tp) const { return TermPos(posx() - tp.posx(), posy() - tp.posy()); }
106 
107  TermPos operator+ (const TermSize & ts) const { return TermPos(posx() + ts.cols(), posy() + ts.rows()); }
108  TermPos operator- (const TermSize & ts) const { return TermPos(posx() - ts.cols(), posy() - ts.rows()); }
109 
110  TermPos & operator+= (const TermPos & tp) { setPos(posx() + tp.posx(), posy() + tp.posy()); return *this; }
111  TermPos & operator-= (const TermPos & tp) { setPos(posx() - tp.posx(), posy() - tp.posy()); return *this; }
112 
113  TermPos & operator+= (const TermSize & ts) { setPos(posx() + ts.cols(), posy() + ts.rows()); return *this; }
114  TermPos & operator-= (const TermSize & ts) { setPos(posx() - ts.cols(), posy() - ts.rows()); return *this; }
115 
116  Point toPoint(void) const { return Point(posx(), posy()); }
117  };
118 
121  {
122  TermRect() {}
123  TermRect(int posx, int posy, int cols, int rows) : TermPos(posx, posy), TermSize(cols, rows) {}
124  TermRect(const TermPos & tp, const TermSize & ts) : TermPos(tp), TermSize(ts) {}
125  TermRect(const Rect & rt) : TermPos(rt.x, rt.y), TermSize(rt.w, rt.h) {}
126 
127  void setRect(int posx, int posy, size_t cols, size_t rows) { setPos(posx, posy); setSize(cols, rows); }
128  Rect toRect(void) const { return Rect(toPoint(), toSize()); }
129  };
130 
132  struct CharState
133  {
134  u8 state;
135 
138  enum Type
139  {
140  FlipHorz = 0x01,
141  FlipVert = 0x02,
143  Inverted = 0x04,
144  Blinked = 0x08,
145  /* AlphaRez = 0xF0 */
146  };
147  CharState(u8 val = 0) : state(val) {}
148 
149  void setState(const Type &, bool f);
150  bool checkState(const Type &) const;
151 
152  void setAlpha(int);
153  int alpha(void) const;
154  };
155 
157  namespace cursor
158  {
160  struct set : public packint2
161  {
162  set(const TermPos & tp) : packint2(tp.posx(), tp.posy()) {}
163  set(int x, int y) : packint2(x, y) {}
164 
165  int posx(void) const { return val1(); }
166  int posy(void) const { return val2(); }
167  };
168 
170  struct move : public packint2
171  {
172  move(const MoveDirection & dir, int count = 1) : packint2(dir, count) {}
173 
174  MoveDirection dir(void) const { return static_cast<MoveDirection>(val1()); }
175  int count(void) const { return val2(); }
176  };
177 
179  struct up : public move
180  {
181  up(int count = 1) : move(MoveUp, count) {}
182  };
183 
185  struct down : public move
186  {
187  down(int count = 1) : move(MoveDown, count) {}
188  };
189 
191  struct left : public move
192  {
193  left(int count = 1) : move(MoveLeft, count) {}
194  };
195 
197  struct right : public move
198  {
199  right(int count = 1) : move(MoveRight, count) {}
200  };
201 
203  struct first : public move
204  {
205  first() : move(MoveFirst) {}
206  };
207 
209  struct last : public move
210  {
211  last() : move(MoveLast) {}
212  };
213  }
214 
216  namespace set
217  {
220  struct fgcolor
221  {
222  ColorIndex color;
223 
224  fgcolor(const ColorIndex & col) : color(col) {}
225  };
226 
229  struct bgcolor
230  {
231  ColorIndex color;
232 
233  bgcolor(const ColorIndex & col) : color(col) {}
234  };
235 
238  struct align
239  {
240  AlignType val;
241 
242  align(const AlignType & v) : val(v) {}
243 
244  const AlignType & operator()(void) const { return val; }
245  };
246 
249  struct wrap {};
250 
253  struct padding : public packint4
254  {
255  padding() : packint4(0) {}
256  padding(int left, int right, int top, int bottom) : packint4(left, right, top, bottom) {}
257 
258  int left(void) const { return val1(); }
259  int right(void) const { return val2(); }
260  int top(void) const { return val3(); }
261  int bottom(void) const { return val4(); }
262  };
263 
266  struct colors : public packint2
267  {
268  colors(const FBColors & fbc) : packint2(fbc.fg(), fbc.bg()) {}
269  colors(const ColorIndex & fg, const ColorIndex & bg) : packint2(fg(), bg()) {}
270 
271  ColorIndex fgindex(void) const { return val1(); }
272  ColorIndex bgindex(void) const { return val2(); }
273  };
274 
277  struct property
278  {
279  CharProperty prop;
280 
281  property(const CharRender & blend, int style = StyleNormal, const CharHinting & hinting = HintingNormal) : prop(blend, style, hinting) {}
282  property(const CharProperty & val) : prop(val) {}
283  };
284 
286  struct blink {};
287 
289  struct flip
290  {
291  int type;
292  flip(int val) : type(val) {}
293  };
294 
296  struct flipvert : flip
297  {
299  };
300 
302  struct fliphorz : flip
303  {
305  };
306 
308  struct alpha
309  {
310  int value;
311  alpha(int val) : value(val) {}
312  };
313 
315  struct invert {};
316 
318  struct rn {};
319 
321  struct flush {};
322  }
323 
325  namespace reset
326  {
328  struct fgcolor {};
329 
331  struct bgcolor {};
332 
334  struct colors {};
335 
337  struct align {};
338 
340  struct property {};
341 
343  struct padding {};
344 
346  struct wrap {};
347 
349  struct blink {};
350 
352  struct invert {};
353 
355  struct flip {};
356 
358  struct alpha {};
359 
361  struct defaults {};
362  }
363 
365  namespace fill
366  {
368  struct area : public std::pair<int, packint2>
369  {
370  area(int val, const TermSize & sz) : std::pair<int, packint2>(val, packint2(sz.cols(), sz.rows())) {}
371 
372  int value(void) const { return first; }
373  size_t width(void) const { return second.val1(); }
374  size_t height(void) const { return second.val2(); }
375  };
376 
379  struct charset : public area
380  {
381  charset(int ch, const TermSize & sz = TermSize(1, 1)) : area(ch, sz) {}
382  };
383 
386  struct space : public charset
387  {
388  space(int len = 1) : charset(0x20, Size(len, 1)) {}
389  };
390 
393  struct fgcolor : public area
394  {
395  fgcolor(const ColorIndex & col, const TermSize & sz = TermSize(1, 1)) : area(col(), sz) {}
396  };
397 
400  struct bgcolor : public area
401  {
402  bgcolor(const ColorIndex & col, const TermSize & sz = TermSize(1, 1)) : area(col(), sz) {}
403  };
404 
408  struct colors : public area
409  {
410  colors(const FBColors & fbc, const TermSize & sz = TermSize(1, 1)) : area(packshort(fbc.bg(), fbc.fg()).value(), sz) {}
411  colors(const ColorIndex & fg, const ColorIndex & bg, const TermSize & sz = TermSize(1, 1)) : area(packshort(bg(), fg()).value(), sz) {}
412 
413  ColorIndex fgindex(void) const { return ColorIndex(packshort(value()).val2()); }
414  ColorIndex bgindex(void) const { return ColorIndex(packshort(value()).val1()); }
415  };
416 
420  struct property : public std::pair<CharProperty, packint2>
421  {
422  property(const CharProperty & cp, const TermSize & sz = TermSize(1, 1)) :
423  std::pair<CharProperty, packint2>(cp, packint2(sz.cols(), sz.rows())) {}
424 
425  const CharProperty & toProperty(void) const { return first; }
426  size_t width(void) const { return second.val1(); }
427  size_t height(void) const { return second.val2(); }
428  };
429 
433  struct defaults : public UnicodeColor
434  {
436 
437  defaults(const FBColors & fbc, int ch = 0x20, const CharProperty & prop = CharProperty()) : UnicodeColor(ch, fbc), property(prop) {}
438  defaults(const ColorIndex & fg, const ColorIndex & bg, int ch = 0x20, const CharProperty & prop = CharProperty()) : UnicodeColor(ch, FBColors(fg, bg)), property(prop) {}
439 
440  const CharProperty & prop(void) const { return property; }
441  };
442  }
443 
445  namespace draw
446  {
449  struct hline : public packint2
450  {
451  hline(int count, int charset = acs::hline(LineThin)) : packint2(count, charset) {}
452 
453  int count(void) const { return val1(); }
454  int charset(void) const { return val2(); }
455  };
456 
459  struct vline : public packint2
460  {
461  vline(int count, int charset = acs::vline(LineThin)) : packint2(count, charset) {}
462 
463  int count(void) const { return val1(); }
464  int charset(void) const { return val2(); }
465  };
466 
468  struct rect : public TermRect
469  {
470  LineType line;
471 
472  rect(const TermRect & rt, const LineType & type = LineThin) : TermRect(rt), line(type) {}
473  rect(int px, int py, int pw, int ph, const LineType & type) : TermRect(px, py, pw, ph), line(type) {}
474  };
475  }
476 
479  {
480  // 16 bit + 16 bit
481  UnicodeColor ucol;
482  // 8 bit
483  CharProperty prop;
484  // 8 bit
485  CharState chst;
486 
487  public:
488  TermCharset() : chst(0) {}
489  TermCharset(const UnicodeColor & uc, const CharProperty & cp = CharProperty(), int cs = 0)
490  : ucol(uc), prop(cp), chst(cs) {}
491 
492  void setUnicodeColor(const UnicodeColor & val) { ucol = val; }
493  void setProperty(const CharProperty & val) { prop = val; }
494  void setFGIndex(const ColorIndex & col) { ucol.fgindex(col); }
495  void setBGIndex(const ColorIndex & col) { ucol.bgindex(col); }
496  void setColors(const FBColors & cols) { ucol.colors(cols); }
497  void setUnicode(int sym) { ucol.unicode(sym); }
498 
499  const UnicodeColor & unicodeColor(void) const { return ucol; }
500  const FBColors & colors(void) const { return ucol.colors(); }
501  int unicode(void) const { return ucol.unicode(); }
502  const CharProperty & property(void) const { return prop; }
503 
504  // set state
505  void setBlink(bool f) { chst.setState(CharState::Blinked, f); }
506  void setInvert(bool f) { chst.setState(CharState::Inverted, f); }
507  void setFlip(int val) { chst.setState(CharState::FlipBoth, false);
508  if(val & CharState::FlipBoth)
509  chst.setState(static_cast<CharState::Type>(val & CharState::FlipBoth), true); }
510  void setAlpha(int val) { chst.setAlpha(val); }
511 
512  bool blinked(void) const { return chst.checkState(CharState::Blinked); }
513  bool inverted(void) const { return chst.checkState(CharState::Inverted); }
514  int flip(void) const { return CharState::FlipBoth & chst.state; }
515  int alpha(void) const { return chst.alpha(); }
516 
517 #ifdef SWE_WITH_JSON
518  JsonObject toJson(void) const;
519 #endif
520  };
521 
523  class TermBase : public Window
524  {
525  private:
526  TermBase(const TermBase &) = delete;
527  TermBase & operator=(const TermBase &) = delete;
528 
529  protected:
530  set::padding padding;
531  TermPos curpos;
532  TermSize termsz;
533  AlignType curalign;
534  FBColors curcols;
535  CharProperty curprop;
536  CharState curstate;
537 
538  /*
539  protected:
540  virtual void windowMoveEvent(const Point &) {}
541  virtual void windowResizeEvent(const Size &) {}
542  virtual void windowVisibleEvent(bool) {}
543  virtual bool keyPressEvent(const KeySym &) { return false; }
544  virtual bool keyReleaseEvent(const KeySym &) { return false; }
545  virtual bool textInputEvent(const std::string &) { return false; }
546  virtual bool mousePressEvent(const ButtonEvent &) { return false; }
547  virtual bool mouseReleaseEvent(const ButtonEvent &) { return false; }
548  virtual bool mouseClickEvent(const ButtonsEvent &) { return false; }
549  virtual void mouseFocusEvent(void) {}
550  virtual void mouseLeaveEvent(void) {}
551  virtual bool mouseMotionEvent(const Point &, u32 buttons) { return false; }
552  virtual bool userEvent(int, void*) { return false; }
553  virtual bool scrollUpEvent(void) { return false; }
554  virtual bool scrollDownEvent(void) { return false; }
555  virtual void tickEvent(u32 ms) {}
556  virtual void renderPresentEvent(u32 ms) {}
557  virtual void displayResizeEvent(const Size &) {}
558  virtual void displayFocusEvent(bool gain) {}
559  */
560  bool lineWrap(void) const;
561  LineType systemLine(const LineType &) const;
562 
563  void setFGColor(const ColorIndex &);
564  void setBGColor(const ColorIndex &);
565 
566  ColorIndex fgColor(void) const;
567  ColorIndex bgColor(void) const;
568  const FBColors & colors(void) const;
569 
570  void setAlign(const AlignType &);
571  const AlignType & align(void) const;
572 
573  void setProperty(const CharProperty &);
574  const CharProperty & property(void) const;
575 
576  void setBlink(bool);
577  bool blink(void) const;
578 
579  void setInvert(bool);
580  bool invert(void) const;
581 
582  void setFlip(int, bool);
583  int flip(void) const;
584 
585  void setAlpha(int);
586  int alpha(void) const;
587 
588  const set::padding & paddings(void) const;
589 
590  protected:
591  TermBase(TermBase*);
592 
593  virtual CharProperty defaultProperty(void) const;
594  virtual FBColors defaultColors(void) const;
595  virtual void terminalResizeEvent(void) {}
596 
597  public:
598  TermBase(Window*);
599  TermBase(const Size & gfxsz, Window*);
600  TermBase(const TermSize &, TermBase &);
601 
602  void setSize(const Size &) override;
603  virtual void setTermSize(const TermSize &);
604  void setTermPos(const TermBase &, const TermPos &);
605 
606  // @protected
607  void setCursorPos(const TermPos &);
608  // @protected
609  void resetCursorPos(void);
610  const TermPos & cursor(void) const;
611 
612  virtual void setCharset(int ch, const ColorIndex & fg = Color::Transparent, const ColorIndex & bg = Color::Transparent, const CharProperty* prop = nullptr) = 0;
613  virtual void renderFlush(void) = 0;
614 
616  virtual const FontRender* frs(void) const = 0;
617 
619  size_t cols(void) const;
621  size_t rows(void) const;
622 
624  TermPos termPos(const TermBase &) const;
625 
627  const TermSize & termSize(void) const;
628 
630  Point sym2gfx(const TermPos &) const;
632  TermPos gfx2sym(const Point &) const;
634  Size sym2gfx(const TermSize &) const;
636  TermSize gfx2sym(const Size &) const;
638  Rect sym2gfx(const TermRect &) const;
640  TermRect gfx2sym(const Rect &) const;
641 
642  TermBase & operator<< (const fill::defaults &);
643  TermBase & operator<< (const fill::fgcolor &);
644  TermBase & operator<< (const fill::bgcolor &);
645  TermBase & operator<< (const fill::colors &);
646  TermBase & operator<< (const fill::charset &);
647  TermBase & operator<< (const fill::property &);
648 
650  TermBase & operator<< (const cursor::set &);
651 
653  TermBase & operator<< (const cursor::move &);
654 
657  TermBase & operator<< (const set::colors &);
658 
661  TermBase & operator<< (const set::fgcolor &);
662 
665  TermBase & operator<< (const set::bgcolor &);
666 
669  TermBase & operator<< (const set::align &);
670 
673  TermBase & operator<< (const set::padding &);
674 
677  TermBase & operator<< (const set::property &);
678 
681  TermBase & operator<< (const set::wrap &);
682 
685  TermBase & operator<< (const set::blink &);
686 
689  TermBase & operator<< (const set::invert &);
690 
693  TermBase & operator<< (const set::flip &);
694 
697  TermBase & operator<< (const set::alpha &);
698 
700  TermBase & operator<< (const set::rn &);
701 
703  TermBase & operator<< (const set::flush &);
704 
705  TermBase & operator<< (const reset::defaults &);
707  TermBase & operator<< (const reset::colors &);
709  TermBase & operator<< (const reset::fgcolor &);
711  TermBase & operator<< (const reset::bgcolor &);
713  TermBase & operator<< (const reset::padding &);
715  TermBase & operator<< (const reset::align &);
717  TermBase & operator<< (const reset::property &);
719  TermBase & operator<< (const reset::wrap &);
721  TermBase & operator<< (const reset::blink &);
723  TermBase & operator<< (const reset::invert &);
725  TermBase & operator<< (const reset::flip &);
727  TermBase & operator<< (const reset::alpha &);
728 
731  TermBase & operator<< (const draw::hline &);
734  TermBase & operator<< (const draw::vline &);
737  TermBase & operator<< (const draw::rect &);
738 
739  TermBase & operator<< (int);
740  TermBase & operator<< (const char*);
741  TermBase & operator<< (const std::string &);
742  TermBase & operator<< (const UnicodeString &);
743  TermBase & operator<< (const UCString &);
744  TermBase & operator<< (const UnicodeList &);
745  TermBase & operator<< (const UCStringList &);
746 
747  TermBase & operator<< (const UnicodeColor &);
748 
749  void renderWindow(void) override;
750  const char* className(void) const override { return "SWE::TermBase"; }
751 #ifdef SWE_WITH_JSON
752  JsonObject toJson(void) const override;
753 #endif
754  };
755 
757  class TermWindow : public TermBase
758  {
759  protected:
760  std::vector<TermCharset> chars;
761  TickTrigger tickBlink;
762  const FontRender* fontRender;
763 
764  protected:
765  TermWindow(TermBase* term) : TermBase(term), fontRender(term->frs()) {}
766 
767  bool blinkShow(void) const;
768  void setBlinkShow(bool);
769 
770  int index(const TermPos &) const;
771  int index(void) const;
772 
773  void fontChangedHandle(void);
774 
775  void displayResizeEvent(const Size &) final;
776  void tickEvent(u32 ms) override;
777 
778  virtual void fontChangedEvent(void) {};
779  virtual TermSize minimalTerminalSize(void) const { return TermSize(80, 25); }
780 
781  FBColors defaultColors(void) const override;
782 
783 
784  public:
785  TermWindow(const FontRender & frs, Window* win);
786  TermWindow(const Size & gfxsz, const FontRender & frs, Window* win);
787  TermWindow(const TermSize & tsz, TermBase & term);
788 
789  const TermCharset* charset(const TermPos &) const;
790  const TermCharset* charset(void) const;
791  void setCharset(int ch, const ColorIndex & fg = Color::Transparent, const ColorIndex & bg = Color::Transparent, const CharProperty* prop = nullptr) override;
792  const FontRender* frs(void) const override;
793 
794  void setTermSize(const TermSize &) override;
795  void renderFlush(void) override;
796 
797  void setFontRender(const FontRender &);
798  void renderSymbol(int symx, int symy);
799  const char* className(void) const override { return "SWE::TermWindow"; }
800 #ifdef SWE_WITH_JSON
801  JsonObject toJson(void) const override;
802 #endif
803  void dumpState(void) const;
804  };
805 
806  /* FullTerminal */
807  class FullTerminal : public TermWindow
808  {
809  public:
810  FullTerminal() : TermWindow(Display::size(), systemFont(), nullptr) {}
811  FullTerminal(const FontRender & frs) : TermWindow(frs, nullptr) {}
812  const char* className(void) const override { return "SWE::FullTerminal"; }
813  };
814 
815  /* CenteredTerminal */
817  {
818  public:
819  CenteredTerminal(const TermSize &, const FontRender &, Window &);
820  const char* className(void) const override { return "SWE::CenteredTerminal"; }
821  };
822 
823 } // SWE
824 #endif
int rtee(const LineType &)
код символа "правый T".
Definition: swe_termwin.cpp:172
Definition: swe_types.h:192
TermPos termPos(const TermBase &) const
Definition: swe_termwin.cpp:370
класс двухмерной размерности в терминале
Definition: swe_termwin.h:72
TermPos gfx2sym(const Point &) const
coordinate transformer: graphics Point to symbol TermPos (parent relative)
Definition: swe_termwin.cpp:483
int lrcorner(const LineType &)
код символа "нижний правый угол".
Definition: swe_termwin.cpp:132
класс манипулятор, установка состояния set::bgcolor.
Definition: swe_termwin.h:229
void tickEvent(u32 ms) override
метод получатель, вызывается один раз за каждую итерацию главного цикла сцены DisplayScene, но перед отрисовкой всей сцены
Definition: swe_termwin.cpp:1071
const FontRender * frs(void) const override
Definition: swe_termwin.cpp:1053
класс двухмерной позиции в терминале
Definition: swe_termwin.h:93
класс манипулятор, перемещение курсора в терминале налево
Definition: swe_termwin.h:191
класс пары двух цветов (foreground, background)
Definition: swe_colors.h:136
const char * className(void) const override
идентификацинная метка класса
Definition: swe_termwin.h:812
пространство SWE.
Definition: swe_binarybuf.cpp:30
тип normal.
Definition: swe_fontset.h:95
класс прямоугольника
Definition: swe_rect.h:144
const TermSize & termSize(void) const
Definition: swe_termwin.cpp:376
класс манипулятор, установка состояния set::rn.
Definition: swe_termwin.h:318
класс манипулятор, заполнение области цветом фона по умолчанию
Definition: swe_termwin.h:400
класс манипулятор, установка состояния set::colors.
Definition: swe_termwin.h:266
Definition: swe_termwin.h:816
int vline(const LineType &)
код символа "вертикальная линия".
Definition: swe_termwin.cpp:32
класс манипулятор, установка состояния set::align.
Definition: swe_termwin.h:238
flip по горизонтали
Definition: swe_termwin.h:140
класс манипулятор, установка состояния set::padding.
Definition: swe_termwin.h:253
Definition: swe_termwin.h:368
класс манипулятор, установка состояния set::flush.
Definition: swe_termwin.h:321
класс манипулятор, перемещение курсора в терминале вверх
Definition: swe_termwin.h:179
класс манипулятор, сброс состояния set::invert.
Definition: swe_termwin.h:352
unicode тонкая
Definition: swe_termwin.h:36
класс манипулятор, заполнение области символом
Definition: swe_termwin.h:379
класс точки с двумя координатами
Definition: swe_rect.h:72
класс цветной unicode строки
Definition: swe_cunicode_color.h:67
стиль normal.
Definition: swe_fontset.h:83
класс манипулятор, сброс состояния set::align.
Definition: swe_termwin.h:337
класс манипулятор, сброс состояния set::fgcolor.
Definition: swe_termwin.h:328
const FontRenderSystem & systemFont(void)
альяс на встроенный рендер PSF шрифта
Definition: swe_fontset.cpp:811
класс манипулятор, заполнение области цветом символа по умолчанию
Definition: swe_termwin.h:393
класс манипулятор, заполнение области цветом символа и фона по умолчанию
Definition: swe_termwin.h:408
const char * className(void) const override
идентификацинная метка класса
Definition: swe_termwin.h:750
Definition: swe_types.h:173
ascii линия
Definition: swe_termwin.h:35
класс манипулятор, заполнение области символом, цветом и свойствами по умолчанию
Definition: swe_termwin.h:433
класс манипулятор, перемещение курсора в терминале направо
Definition: swe_termwin.h:197
int btee(const LineType &)
код символа "нижний T".
Definition: swe_termwin.cpp:212
flip по вертикали
Definition: swe_termwin.h:141
класс манипулятор, заполнение строки символом space.
Definition: swe_termwin.h:386
класс списка unicode строк
Definition: swe_cunicode.h:109
класс манипулятор, сброс состояния set::colors.
Definition: swe_termwin.h:334
size_t cols(void) const
Definition: swe_termwin.cpp:360
int ttee(const LineType &)
код символа "верхний T".
Definition: swe_termwin.cpp:192
класс манипулятор, рисования вертикальной линии
Definition: swe_termwin.h:459
класс терминального символа
Definition: swe_termwin.h:478
класс манипулятор, установка состояния set::alpha.
Definition: swe_termwin.h:308
класс манипулятор, рисования прямоугольника
Definition: swe_termwin.h:468
int ltee(const LineType &)
код символа "левый T".
Definition: swe_termwin.cpp:152
класс манипулятор, сброс состояния set::bgcolor.
Definition: swe_termwin.h:331
базовый класс шрифта
Definition: swe_fontset.h:151
Definition: swe_termwin.h:807
Type
Definition: swe_termwin.h:138
базовый класс терминального окна
Definition: swe_termwin.h:523
класс манипулятор, перемещение курсора в терминале в позицию "окончание строки".
Definition: swe_termwin.h:209
LineType
перечисление типа символьных линий
Definition: swe_termwin.h:33
flip по горизонтали и вертикали
Definition: swe_termwin.h:142
класс индекса цвета
Definition: swe_colors.h:113
класс манипулятор, рисования горизонтальной линии
Definition: swe_termwin.h:449
unicode двойная
Definition: swe_termwin.h:38
свойства отрисовка символа
Definition: swe_fontset.h:102
класс манипулятор, сброс состояния set::property.
Definition: swe_termwin.h:340
класс манипулятор, перемещение курсора в терминале в позицию "начало строки".
Definition: swe_termwin.h:203
Definition: swe_types.h:127
класс состояние графического символа
Definition: swe_termwin.h:132
AlignType
перечисление типа выравнивания
Definition: swe_fontset.h:37
класс манипулятор, сброс состояния set::alpha.
Definition: swe_termwin.h:358
size_t rows(void) const
Definition: swe_termwin.cpp:365
int llcorner(const LineType &)
код символа "нижний левый угол".
Definition: swe_termwin.cpp:112
MoveDirection
перечисление направления движения курсора в терминале
Definition: swe_termwin.h:42
int hline(const LineType &)
код символа "горизонтальная линия".
Definition: swe_termwin.cpp:52
класс манипулятор, сброс состояния set::flip.
Definition: swe_termwin.h:355
класс манипулятор, установка состояния set::flipvert.
Definition: swe_termwin.h:296
const char * className(void) const override
идентификацинная метка класса
Definition: swe_termwin.h:820
класс манипулятор, установка состояния set::fliphorz.
Definition: swe_termwin.h:302
класс двухмерной размерности
Definition: swe_rect.h:36
класс манипулятор, движение курсора по направлению в терминале
Definition: swe_termwin.h:170
const char * className(void) const override
идентификацинная метка класса
Definition: swe_termwin.h:799
CharRender
перечисление типа рендера
Definition: swe_fontset.h:70
основной класс терминального окна
Definition: swe_termwin.h:757
Definition: swe_tools.h:257
класс манипулятор, установка состояния set::invert.
Definition: swe_termwin.h:315
Point sym2gfx(const TermPos &) const
coordinate transformer: symbol TermPos to graphics Point (parent relative)
Definition: swe_termwin.cpp:478
blink state
Definition: swe_termwin.h:144
класс манипулятор, заполнение области свойствами символа по умолчанию
Definition: swe_termwin.h:420
класс манипулятор, сброс всех состояний
Definition: swe_termwin.h:361
класс список цветных unicode строк
Definition: swe_cunicode_color.h:110
класс манипулятор, установка позиции курсора терминала
Definition: swe_termwin.h:160
класс прямоугольника в терминале
Definition: swe_termwin.h:120
класс манипулятор, установка состояния set::wrap.
Definition: swe_termwin.h:249
CharHinting
перечисление типа сглаживания контура
Definition: swe_fontset.h:92
int plus(const LineType &)
код символа "+".
Definition: swe_termwin.cpp:232
int ulcorner(const LineType &)
код символа "верхний левый угол".
Definition: swe_termwin.cpp:72
базовый класс графических объектов сцены DisplayScene.
Definition: swe_window.h:57
int urcorner(const LineType &)
код символа "верхний правый угол".
Definition: swe_termwin.cpp:92
unicode толстая
Definition: swe_termwin.h:37
класс цветного unicode символа
Definition: swe_cunicode_color.h:35
класс манипулятор, сброс состояния set::wrap.
Definition: swe_termwin.h:346
класс манипулятор, установка состояния set::fgcolor.
Definition: swe_termwin.h:220
virtual const FontRender * frs(void) const =0
класс манипулятор, установка состояния set::property.
Definition: swe_termwin.h:277
класс манипулятор, сброс состояния set::padding.
Definition: swe_termwin.h:343
класс манипулятор, установка состояния set::flip.
Definition: swe_termwin.h:289
класс манипулятор, перемещение курсора в терминале вниз
Definition: swe_termwin.h:185
инвертировать цвет символа на увет фона
Definition: swe_termwin.h:143
класс unicode строки
Definition: swe_cunicode.h:41