libyui-gtk  2.44.5
 All Classes Functions
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  /**
26  * Set the dialog's default button
27  **/
28  void setDefaultButton( YPushButton * newDefaultButton );
29 
30  virtual GtkWidget *getContainer() { return m_containee; }
31 
32  void setCloseCallback (YGWindowCloseFn closeCallback, void *closeData);
33  void unsetCloseCallback();
34 
35  void normalCursor();
36  void busyCursor();
37 
38  // convenience function to be used rather than currentDialog()
39  static YGDialog *currentDialog();
40  static GtkWindow *currentWindow();
41 
42  virtual void doSetSize (int width, int height);
43 
44  virtual void openInternal();
45  virtual void activate();
46  void present();
47 
48  virtual YEvent *waitForEventInternal (int timeout_millisec);
49  virtual YEvent *pollEventInternal();
50 
51  virtual void highlight (YWidget * child);
52 
53  void setTitle (const std::string &title, bool sticky = false);
54  void setIcon (const std::string &icon);
55 
56  YWidget *getFunctionWidget (int key);
57  std::list <YWidget *> getClassWidgets (const char *className);
58 
59  YGWIDGET_IMPL_CONTAINER (YDialog)
60 };
61 
62 #endif // YGDIALOG_H
63 
void setDefaultButton(YPushButton *newDefaultButton)
Definition: YGDialog.cc:344