git-svn-id: svn://db.shs.com.ru/pip@597 12ceb7fc-bf1f-11e4-8940-5bc7170c53b5

This commit is contained in:
2018-02-12 12:20:15 +00:00
parent da48575caa
commit 6c51e8edf3
43 changed files with 204 additions and 164 deletions

View File

@@ -68,7 +68,7 @@ protected:
class PIScreenConsoleTile : public PIScreenTile
class PIP_EXPORT PIScreenConsoleTile : public PIScreenTile
{
public:
PIScreenConsoleTile();

View File

@@ -416,7 +416,7 @@ void TileButtons::drawEvent(PIScreenDrawer * d) {
cw = width_ - 2;
xo = (cw - b.first.size_s()) / 2 - 1;
}
btn_rects[i] = (Rect){cx, cy, cx + cw + 2, cy + 1};
btn_rects[i] = Rect(cx, cy, cx + cw + 2, cy + 1);
d->fillRect(cx, cy, cx + cw + 2, cy + 1, ' ', Default, cb);
d->drawText(cx, cy, "[", ct, Transparent, ff);
d->drawText(cx + xo + 2, cy, b.first, ct, Transparent, ff);

View File

@@ -131,7 +131,7 @@ protected:
void drawEvent(PIScreenDrawer * d);
bool keyEvent(PIKbdListener::KeyEvent key);
bool mouseEvent(PIKbdListener::MouseEvent me);
struct Rect {int x0,y0,x1,y1;};
struct Rect {Rect(int _x0 = 0, int _y0 = 0, int _x1 = 0, int _y1 = 0): x0(_x0),y0(_y0),x1(_x1),y1(_y1) {}; int x0,y0,x1,y1;};
PIVector<Rect> btn_rects;
};
@@ -201,7 +201,7 @@ protected:
PITimeMeasurer tm_blink;
};
/*
class PIP_EXPORT TileTabs: public PIScreenTile {
PIOBJECT_SUBCLASS(TileTabs, PIScreenTile)
public:
@@ -229,6 +229,6 @@ protected:
void selectTab(int index);
int cur;
};
*/
#endif // PISCREENTILES_H

View File

@@ -30,7 +30,7 @@ class PIScreenTile;
namespace PIScreenTypes {
//! Color for chars or background
enum Color {
enum PIP_EXPORT Color {
Default /** Default */,
Black /** Black */,
Red /** Red */,
@@ -44,7 +44,7 @@ namespace PIScreenTypes {
};
//! Flags for chars
enum CharFlag {
enum PIP_EXPORT CharFlag {
Bold /** Bold or bright */ = 0x1,
Blink /** Blink text */ = 0x2,
Underline /** Underline text */ = 0x4,
@@ -52,14 +52,14 @@ namespace PIScreenTypes {
};
//! Alignment
enum Alignment {
enum PIP_EXPORT Alignment {
Left /** Left */ ,
Center /** Center */ ,
Right /** Right */
};
//! Size policy
enum SizePolicy {
enum PIP_EXPORT SizePolicy {
Fixed /** Fixed size */ ,
Preferred /** Preferred size */ ,
Expanding /** Maximum available size */ ,
@@ -67,13 +67,13 @@ namespace PIScreenTypes {
};
//! Direction
enum Direction {
enum PIP_EXPORT Direction {
Horizontal /** Horizontal */ ,
Vertical /** Vertical */
};
//! Position
enum Position {
enum PIP_EXPORT Position {
//Left /** Left */ ,
//Right /** Right */ ,
//Top /** Top */ ,
@@ -81,7 +81,7 @@ namespace PIScreenTypes {
};
//! Focus flags
enum FocusFlag {
enum PIP_EXPORT FocusFlag {
CanHasFocus /** Tile can has focus */ = 0x1,
NextByTab /** Focus passed to next tile by tab key */ = 0x2,
NextByArrowsHorizontal /** Focus passed to next tile by arrow keys left or right */ = 0x4,
@@ -95,7 +95,7 @@ namespace PIScreenTypes {
typedef PIFlags<CharFlag> CharFlags;
typedef PIFlags<FocusFlag> FocusFlags;
union CellFormat {
union PIP_EXPORT CellFormat {
CellFormat(uint f = 0) {raw_format = f;}
CellFormat(Color col_char, Color col_back = Default, CharFlags flags_ = 0) {
color_char = col_char;
@@ -112,7 +112,7 @@ namespace PIScreenTypes {
bool operator !=(const CellFormat & c) const {return raw_format != c.raw_format;}
};
struct Cell {
struct PIP_EXPORT Cell {
Cell(PIChar c = PIChar(' '), CellFormat f = CellFormat()) {symbol = c; format = f;}
CellFormat format;
PIChar symbol;
@@ -128,7 +128,7 @@ namespace PIScreenTypes {
}
};
struct TileEvent {
struct PIP_EXPORT TileEvent {
TileEvent(int t = -1, const PIVariant & d = PIVariant()): type(t), data(d) {}
int type;
PIVariant data;