78 lines
2.0 KiB
C++
78 lines
2.0 KiB
C++
/*! \file piscreenconsole.h
|
|
* \brief Tile for PIScreen with PIConsole API
|
|
*
|
|
* This file declares TileVars
|
|
*/
|
|
/*
|
|
PIP - Platform Independent Primitives
|
|
Tile for PIScreen with PIConsole API
|
|
Copyright (C) 2019 Andrey Bychkov work.a.b@yandex.ru
|
|
|
|
This program is free software: you can redistribute it and/or modify
|
|
it under the terms of the GNU General Public License as published by
|
|
the Free Software Foundation, either version 3 of the License, or
|
|
(at your option) any later version.
|
|
|
|
This program is distributed in the hope that it will be useful,
|
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
GNU General Public License for more details.
|
|
|
|
You should have received a copy of the GNU General Public License
|
|
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
*/
|
|
|
|
#ifndef PISCREENCONSOLE_H
|
|
#define PISCREENCONSOLE_H
|
|
|
|
#include "piscreentiles.h"
|
|
|
|
/// NOTE: incomplete class
|
|
/// TODO: write TileVars
|
|
|
|
class PIP_EXPORT TileVars: public PIScreenTile {
|
|
public:
|
|
TileVars(const PIString & n = PIString());
|
|
protected:
|
|
struct Variable {
|
|
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;
|
|
int nx;
|
|
int ny;
|
|
int type;
|
|
int offset;
|
|
int bitFrom;
|
|
int bitCount;
|
|
int size;
|
|
const void * ptr;
|
|
/*void operator =(const Variable & src) {
|
|
name = src.name;
|
|
format = src.format;
|
|
nx = src.nx;
|
|
ny = src.ny;
|
|
type = src.type;
|
|
offset = src.offset;
|
|
bitFrom = src.bitFrom;
|
|
bitCount = src.bitCount;
|
|
size = src.size;
|
|
ptr = src.ptr;
|
|
}*/
|
|
};
|
|
PIVector<Variable> variables;
|
|
PIScreenTypes::Alignment alignment;
|
|
void sizeHint(int & w, int & h) const;
|
|
void drawEvent(PIScreenDrawer * d);
|
|
};
|
|
|
|
|
|
|
|
class PIP_EXPORT PIScreenConsoleTile : public PIScreenTile
|
|
{
|
|
public:
|
|
PIScreenConsoleTile();
|
|
};
|
|
|
|
#endif // PISCREENCONSOLE_H
|