wxMaxima
Loading...
Searching...
No Matches
Notification.h
Go to the documentation of this file.
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) 2012-2013 Doug Ilijev <doug.ilijev@gmail.com>
5// (C) 2015 Gunter Königsmann <wxMaxima@physikbuch.de>
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
31#ifndef NOTIFICATION_H
32#define NOTIFICATION_H
33
34#include "cells/GroupCell.h"
35#include "precomp.h"
36#include <wx/notifmsg.h>
37#include <wx/wx.h>
38
45class Notification final: public wxNotificationMessage
46{
47public:
51 explicit Notification(const wxString &title,
52 const wxString &message = {},
53 wxWindow *parent = NULL,
54 int flags = wxICON_INFORMATION);
56 virtual ~Notification() { Notification::Close(); }
58 void SetParent(wxWindow *parent);
60 wxWindow *GetParent() { return m_parent; }
63private:
65 wxWindow *m_parent = NULL;
66protected:
68 void OnClick(wxCommandEvent &event);
69};
70
71#endif
This file defines the class GroupCell that bundles input and output in the worksheet.
A cell grouping input (and, if there is one, also the output) cell to a foldable item.
Definition: GroupCell.h:74
A user notification the operating system claims to be non-disturbing.
Definition: Notification.h:46
Notification()
A constructor that doesn't take any arguments.
Definition: Notification.cpp:33
GroupCell * m_errorNotificationCell
The cell we signal an error for.
Definition: Notification.h:62
wxWindow * GetParent()
Returns a pointer to the main window or NULL, if no main window is set.
Definition: Notification.h:60
void OnClick(wxCommandEvent &event)
Called on clicking at the notification, if the OS supports that.
Definition: Notification.cpp:64
virtual ~Notification()
A destructor that also closes the notification.
Definition: Notification.h:56
void SetParent(wxWindow *parent)
Informs the notification which the main window is it notified for.
Definition: Notification.cpp:59