Ardour  9.0-pre0-582-g084a23a80d
popup.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 1998 Paul Davis <paul@linuxaudiosystems.com>
3  * Copyright (C) 2017 Robin Gareus <robin@gareus.org>
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  * You should have received a copy of the GNU General Public License along
16  * with this program; if not, write to the Free Software Foundation, Inc.,
17  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
18  */
19 
20 #ifndef _WIDGETS_POPUP_H_
21 #define _WIDGETS_POPUP_H_
22 
23 #ifdef interface
24 #undef interface
25 #endif
26 
27 #include <string>
28 
29 #include <gtkmm/label.h>
30 #include <gtkmm/window.h>
31 
32 #include <pbd/touchable.h>
33 
34 #include "widgets/visibility.h"
35 
36 namespace ArdourWidgets {
37 
38 class LIBWIDGETS_API PopUp : public Gtk::Window, public Touchable
39 {
40 public:
41  PopUp (Gtk::WindowPosition pos, unsigned int show_for_msecs = 0,
42  bool delete_on_hide = false);
43  virtual ~PopUp ();
44  void touch ();
45  void remove ();
46  void set_text (std::string);
47  void set_name (std::string);
49 
51 
52 protected:
53  void on_realize ();
54 
55 private:
57  std::string my_text;
58  gint timeout;
59  static gint remove_prompt_timeout (void *);
61  unsigned int popdown_time;
62 };
63 
64 } /* namespace */
65 
66 #endif
bool delete_on_hide
Definition: popup.h:60
static gint remove_prompt_timeout(void *)
void on_realize()
This is a default handler for the signal signal_realize().
std::string my_text
Definition: popup.h:57
Gtk::Label label
Definition: popup.h:56
void set_name(std::string)
unsigned int popdown_time
Definition: popup.h:61
gint button_click(GdkEventButton *)
PopUp(Gtk::WindowPosition pos, unsigned int show_for_msecs=0, bool delete_on_hide=false)
bool on_delete_event(GdkEventAny *)
This is a default handler for the signal signal_delete_event().
void set_text(std::string)
#define LIBWIDGETS_API