wxMaxima
Loading...
Searching...
No Matches
TipOfTheDay.h
1// -*- mode: c++; c-file-style: "linux"; c-basic-offset: 2; indent-tabs-mode: nil -*-
2//
3// Copyright (C) 2006-2015 Andrej Vodopivec <andrej.vodopivec@gmail.com>
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 2 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//
16// You should have received a copy of the GNU General Public License
17// along with this program; if not, write to the Free Software
18// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
19//
20// SPDX-License-Identifier: GPL-2.0+
21
22#ifndef TIPOFTHEDAY_H
23#define TIPOFTHEDAY_H
24
25#include "precomp.h"
26#include <wx/wx.h>
27#include <wx/tipdlg.h>
28#include <wx/arrstr.h>
29#include <wx/image.h>
30#include <wx/button.h>
31#include <wx/checkbox.h>
32#include <wx/stattext.h>
33
43class TipOfTheDay : public wxDialog
44{
45public:
46 explicit TipOfTheDay(wxWindow *parent);
48protected:
49 void OnNextButton(wxCommandEvent &dummy);
50 void OnPreviousButton(wxCommandEvent &dummy);
51 void OnOkButton(wxCommandEvent &dummy);
52
53private:
54 wxString GetTip(unsigned int n);
55 unsigned int m_num;
56 wxTextCtrl *m_tip;
57 wxString GetTip();
58 wxCheckBox *m_showAtStartup;
59 wxImage GetImage(unsigned char *data, std::size_t len);
60 wxArrayString m_tips;
61 void OnTextURLEvent(wxTextUrlEvent& event);
62};
63
64#endif // TIPOFTHEDAY_H
A minimalistic Tip of the day dialogue.
Definition: TipOfTheDay.h:44