NumeRe v1.1.4
NumeRe: Framework für Numerische Rechnungen
terminalcalltip.hpp
Go to the documentation of this file.
1/*****************************************************************************
2 NumeRe: Framework fuer Numerische Rechnungen
3 Copyright (C) 2022 Erik Haenel et al.
4
5 This program is free software: you can redistribute it and/or modify
6 it under the terms of the GNU General Public License as published by
7 the Free Software Foundation, either version 3 of the License, or
8 (at your option) any later version.
9
10 This program is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 GNU General Public License for more details.
14
15 You should have received a copy of the GNU General Public License
16 along with this program. If not, see <http://www.gnu.org/licenses/>.
17******************************************************************************/
18
19#ifndef TERMINALCALLTIP_HPP
20#define TERMINALCALLTIP_HPP
21
22#include <wx/window.h>
23#include <wx/textctrl.h>
24
31class TerminalCallTip : public wxWindow
32{
33 private:
34 wxTextCtrl* m_text;
35
36 public:
37 TerminalCallTip(wxWindow* parent, const wxSize& s = wxDefaultSize);
38
39 void PopUp(const wxPoint& pos, const wxString& text);
40 void Dismiss();
41 void Resize(const wxSize& s);
42 void ChangeFont(const wxFont& font);
43
44 void Highlight(size_t start, size_t len);
45
46 virtual bool AcceptsFocus() const override
47 {
48 return false;
49 }
50
51 virtual bool AcceptsFocusFromKeyboard() const override
52 {
53 return false;
54 }
55
56 virtual bool AcceptsFocusRecursively() const override
57 {
58 return false;
59 }
60};
61
62#endif // TERMINALCALLTIP_HPP
63
This class represents the calltip in the terminal. The associated window will only be shown and hidde...
virtual bool AcceptsFocusFromKeyboard() const override
wxTextCtrl * m_text
void Highlight(size_t start, size_t len)
Hightlight the section of the text in the calltip.
virtual bool AcceptsFocus() const override
void Resize(const wxSize &s)
Change the calltip's size.
TerminalCallTip(wxWindow *parent, const wxSize &s=wxDefaultSize)
TerminalCallTip constructor.
void Dismiss()
Remove the shown calltip.
virtual bool AcceptsFocusRecursively() const override
void PopUp(const wxPoint &pos, const wxString &text)
Show the calltip at the desired position. This function does not check, whether the calltip is acutal...
void ChangeFont(const wxFont &font)
Changes the font of the calltip.