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

This commit is contained in:
2016-02-10 08:50:59 +00:00
parent dc7048d100
commit 697b39124c
5 changed files with 60 additions and 41 deletions

View File

@@ -1,5 +1,6 @@
#ifndef PISCREENCONSOLE_H
#define PISCREENCONSOLE_H
#include "piscreentiles.h"
class PIP_EXPORT TileVars: public PIScreenTile {
@@ -7,7 +8,7 @@ public:
TileVars(const PIString & n = PIString());
protected:
struct Variable {
Variable() {nx = ny = type = offset = bitFrom = bitCount = size = 0; format = PIScreenTypes::CellFormat(); ptr = 0; id = 1;}
Variable() {nx = ny = type = offset = bitFrom = bitCount = size = 0; format = PIScreenTypes::CellFormat(); ptr = 0;}
bool isEmpty() const {return (ptr == 0);}
PIString name;
PIScreenTypes::CellFormat format;
@@ -18,10 +19,8 @@ protected:
int bitFrom;
int bitCount;
int size;
int id;
const void * ptr;
PIByteArray rdata;
void operator =(const Variable & src) {
/*void operator =(const Variable & src) {
name = src.name;
format = src.format;
nx = src.nx;
@@ -31,10 +30,8 @@ protected:
bitFrom = src.bitFrom;
bitCount = src.bitCount;
size = src.size;
id = src.id;
ptr = src.ptr;
rdata = src.rdata;
}
}*/
};
PIVector<Variable> variables;
PIScreenTypes::Alignment alignment;

View File

@@ -161,4 +161,32 @@ protected:
};
class PIP_EXPORT TileTabs: public PIScreenTile {
public:
TileTabs(const PIString & n = PIString());
enum EventType {
TabChanged
};
struct Tab {
Tab(const PIString & l = PIString(), int k = 0, PIScreenTile * t = 0) {
label = l;
key = k;
tile = t;
}
PIString label;
int key;
PIScreenTile * tile;
};
PIScreenTypes::CellFormat format_tab;
PIScreenTypes::CellFormat format_tab_selected;
PIDeque<Tab> tabs;
protected:
void sizeHint(int & w, int & h) const;
void drawEvent(PIScreenDrawer * d);
bool keyEvent(PIKbdListener::KeyEvent key);
void selectTab(int index);
int cur;
};
#endif // PISCREENTILES_H

View File

@@ -69,7 +69,15 @@ namespace PIScreenTypes {
Horizontal /** Horizontal */ ,
Vertical /** Vertical */
};
//! Position
enum Position {
//Left /** Left */ ,
//Right /** Right */ ,
//Top /** Top */ ,
//Bottom /** Bottom */
};
//! Focus flags
enum FocusFlag {
CanHasFocus /** Tile can has focus */ = 0x1,