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
34extern unsigned char media_playback_start_svg_gz[];
35extern unsigned int media_playback_start_svg_gz_len;
36extern unsigned char media_playback_start_reverse_svg_gz[];
37extern unsigned int media_playback_start_reverse_svg_gz_len;
38
48class TipOfTheDay : public wxDialog
49{
50public:
51 explicit TipOfTheDay(wxWindow *parent);
53protected:
54 void OnNextButton(wxCommandEvent &dummy);
55 void OnPreviousButton(wxCommandEvent &dummy);
56 void OnOkButton(wxCommandEvent &dummy);
57
58private:
59 wxString GetTip(unsigned int n);
60 unsigned int m_num;
61 wxTextCtrl *m_tip;
62 wxString GetTip();
63 wxCheckBox *m_showAtStartup;
64 wxImage GetImage(unsigned char *data, std::size_t len);
65 wxArrayString m_tips;
66 void OnTextURLEvent(wxTextUrlEvent& event);
67};
68
69#endif // TIPOFTHEDAY_H
A minimalistic Tip of the day dialogue.
Definition: TipOfTheDay.h:49