wxMaxima
Loading...
Searching...
No Matches
DigitCell.h
1// -*- mode: c++; c-file-style: "linux"; c-basic-offset: 2; indent-tabs-mode: nil -*-
2//
3// Copyright (C) 2004-2015 Andrej Vodopivec <andrej.vodopivec@gmail.com>
4// (C) 2014-2018 Gunter Königsmann <wxMaxima@physikbuch.de>
5// (C) 2020 Kuba Ober <kuba@bertec.com>
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 2 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//
18// You should have received a copy of the GNU General Public License
19// along with this program; if not, write to the Free Software
20// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
21//
22// SPDX-License-Identifier: GPL-2.0+
23
24#ifndef DIGITCELL_H
25#define DIGITCELL_H
26
27#include <wx/regex.h>
28#include "TextCell.h"
29#include <memory>
30
33class DigitCell : public TextCell
34{
35public:
36 DigitCell(GroupCell *group, Configuration *config, const wxString &text = {}, TextStyle style = TS_NUMBER);
37 DigitCell(GroupCell *group, const DigitCell &cell);
38 virtual ~DigitCell(){}
39 std::unique_ptr<Cell> Copy(GroupCell *group) const override;
40 const CellTypeInfo &GetInfo() override;
41
42 void Recalculate(AFontSize fontsize) override;
43 void Draw(wxPoint point, wxDC *dc, wxDC *antialiassingDC) override;
44};
45
46#endif // DIGITCELL_H
TextStyle
All text styles known to wxMaxima.
Definition: TextStyle.h:231
A Type-Safe Fixed-Point Font Size.
Definition: FontAttribs.h:98
A class that carries information about the type of a cell.
Definition: Cell.h:93
The configuration storage for the current worksheet.
Definition: Configuration.h:85
A Text cell that display a digit of a more-than-one-line-wide number.
Definition: DigitCell.h:34
const CellTypeInfo & GetInfo() override
Returns the information about this cell's type.
void Draw(wxPoint point, wxDC *dc, wxDC *antialiassingDC) override
Draw this cell.
Definition: DigitCell.cpp:60
std::unique_ptr< Cell > Copy(GroupCell *group) const override
Create a copy of this cell.
void Recalculate(AFontSize fontsize) override
Recalculate the size of the cell and the difference between top and center.
Definition: DigitCell.cpp:46
A cell grouping input (and, if there is one, also the output) cell to a foldable item.
Definition: GroupCell.h:74
A Text cell.
Definition: TextCell.h:38