CEBL  2.1
CEBLGtkWidgetDetachable.hpp
Go to the documentation of this file.
1 /*
2 * CEBL : CSU EEG Brain-Computer Interface Lab
3 *
4 * Author: Jeshua Bratman - jeshuabratman@gmail.com
5 *
6 * This file is part of CEBL.
7 *
8 * CEBL is free software; you can redistribute it and/or modify it.
9 * We only ask that if you use our code that you cite the source in
10 * your project or publication.
11 *
12 * EEG Group (www.cs.colostate.edu/eeg)
13 * Department of Computer Science
14 * Colorado State University
15 *
16 */
17 
18 /* CEBLGtkWidgetDetachable.hpp
19  * \author Jeshua Bratman
20  *
21  * Sublclass to CEBLGtkWidget which automatically adds
22  * detach button and functionality to create detachable
23  * widgets.
24  */
25 
26 #ifndef CEBLGTKWIDGETDETACHABLE_H
27 #define CEBLGTKWIDGETDETACHABLE_H
28 
29 #include "CEBLGtkWidget.hpp"
30 
32 {
33 private:
34  static void CB_toggleDetached(GtkWidget *, gpointer);
35  static gboolean CB_windowDelete(GtkWidget *widget, GdkEvent *event, gpointer data);
36 
37 protected:
40 
41 public:
44  GtkWidget* getContainer() { return outer_container; }
45  operator GtkWidget*() { return outer_container; }
46  bool isDetached() { return is_detached; }
47  void hide();
48 };
49 
50 #endif
51