libyui-gtk  2.43.7
 All Classes
YGDialog.h
1 /********************************************************************
2  * YaST2-GTK - http://en.opensuse.org/YaST2-GTK *
3  ********************************************************************/
4 
5 #ifndef YGDIALOG_H
6 #define YGDIALOG_H
7 
8 #include "YGWidget.h"
9 #include "YDialog.h"
10 
11 class YGWindow;
12 typedef bool (*YGWindowCloseFn) (void *closure);
13 
14 class YGDialog : public YDialog, public YGWidget
15 {
16  friend class YGWindow;
17  GtkWidget *m_containee;
18  YGWindow *m_window;
19  bool m_stickyTitle;
20 
21 public:
22  YGDialog (YDialogType dialogType, YDialogColorMode colorMode);
23  virtual ~YGDialog();
24 
25  virtual GtkWidget *getContainer() { return m_containee; }
26 
27  void setCloseCallback (YGWindowCloseFn closeCallback, void *closeData);
28  void unsetCloseCallback();
29 
30  void normalCursor();
31  void busyCursor();
32 
33  // convenience function to be used rather than currentDialog()
34  static YGDialog *currentDialog();
35  static GtkWindow *currentWindow();
36 
37  virtual void doSetSize (int width, int height);
38 
39  virtual void openInternal();
40  virtual void activate();
41  void present();
42 
43  virtual YEvent *waitForEventInternal (int timeout_millisec);
44  virtual YEvent *pollEventInternal();
45 
46  virtual void highlight (YWidget * child);
47 
48  void setTitle (const std::string &title, bool sticky = false);
49  void setIcon (const std::string &icon);
50 
51  YWidget *getFunctionWidget (int key);
52  std::list <YWidget *> getClassWidgets (const char *className);
53 
54  YGWIDGET_IMPL_CONTAINER (YDialog)
55 };
56 
57 #endif // YGDIALOG_H
58