missing files
authorvisnov <visnov@e0cc52ee-31ee-0310-8b87-e83c4596d67c>
Tue, 13 Nov 2007 10:36:28 +0000 (10:36 +0000)
committervisnov <visnov@e0cc52ee-31ee-0310-8b87-e83c4596d67c>
Tue, 13 Nov 2007 10:36:28 +0000 (10:36 +0000)
git-svn-id: http://svn.opensuse.org/svn/yast/branches/tmp/sh/mod-ui/web-wt@42000 e0cc52ee-31ee-0310-8b87-e83c4596d67c

src/YWebPushButton.cc [new file with mode: 0644]
src/YWebPushButton.h [new file with mode: 0644]
src/YWebWidgetFactory.cc

diff --git a/src/YWebPushButton.cc b/src/YWebPushButton.cc
new file mode 100644 (file)
index 0000000..7b59c2a
--- /dev/null
@@ -0,0 +1,57 @@
+/*---------------------------------------------------------------------\
+|                                                                     |
+|                     __   __    ____ _____ ____                      |
+|                     \ \ / /_ _/ ___|_   _|___ \                     |
+|                      \ V / _` \___ \ | |   __) |                    |
+|                       | | (_| |___) || |  / __/                     |
+|                       |_|\__,_|____/ |_| |_____|                    |
+|                                                                     |
+|                              core system                            |
+|                                                       (C) SuSE GmbH |
+\----------------------------------------------------------------------/
+
+  File:                YWebPushButton.cc
+
+  Author:      Stefan Hundhammer <sh@suse.de>
+
+/-*/
+
+
+#define y2log_component "web-ui"
+#include <ycp/y2log.h>
+
+#include "YWebPushButton.h"
+
+
+using std::string;
+
+
+YWebPushButton::YWebPushButton( YWidget * parent, const string & label )
+    : YPushButton( parent, label )
+{
+}
+
+
+YWebPushButton::~YWebPushButton()
+{
+    // NOP
+}
+
+int YWebPushButton::preferredWidth()
+{
+    // FIXME
+    return 1;
+}
+
+int YWebPushButton::preferredHeight()
+{
+    // FIXME
+    return 1;
+}
+
+
+void YWebPushButton::setSize( int newWidth, int newHeight )
+{
+    // FIXME
+}
+
diff --git a/src/YWebPushButton.h b/src/YWebPushButton.h
new file mode 100644 (file)
index 0000000..4195106
--- /dev/null
@@ -0,0 +1,84 @@
+/*---------------------------------------------------------------------\
+|                                                                     |
+|                     __   __    ____ _____ ____                      |
+|                     \ \ / /_ _/ ___|_   _|___ \                     |
+|                      \ V / _` \___ \ | |   __) |                    |
+|                       | | (_| |___) || |  / __/                     |
+|                       |_|\__,_|____/ |_| |_____|                    |
+|                                                                     |
+|                              core system                            |
+|                                                       (C) SuSE GmbH |
+\----------------------------------------------------------------------/
+
+  File:                YWebPushButton.h
+
+  Author:      Stefan Hundhammer <sh@suse.de>
+
+/-*/
+
+#ifndef YWebPushButton_h
+#define YWebPushButton_h
+
+#include <yui/YPushButton.h>
+
+
+using std::string;
+
+
+class YWebPushButton : public YPushButton
+{
+public:
+    /**
+     * Constructor.
+     **/
+    YWebPushButton( YWidget * parent, const string & label );
+
+    /**
+     * Destructor.
+     **/
+    ~YWebPushButton();
+
+    /**
+     * Return a descriptive name of this widget class for logging,
+     * debugging etc.
+     **/
+    virtual const char * widgetClass() const { return "YWebPushButton"; }
+
+    /**
+     * Preferred width of the widget.
+     *
+     * Reimplemented from YWidget
+     **/
+    virtual int preferredWidth();
+
+    /**
+     * Preferred height of the widget.
+     *
+     * Reimplemented from YWidget
+     **/
+    virtual int preferredHeight();
+
+    /**
+     * Set the new size of the widget.
+     *
+     * Layout manager widgets (like YLayoutBox) call this during geometry
+     * management after all widgets are queried about their preferred widths
+     * and heights. Depending on layout constraints, widgets might be resized
+     * beyond or below their preferred size.
+     *
+     * The sizes passed here are not meant to affect any future
+     * preferredWidth() or preferredHeight() calls; they are just the outcome
+     * of all kinds of compromises (too little screen space or too much) for
+     * the current geometry management calculation.
+     *
+     * Reimplemented from YWidget
+     **/
+    virtual void setSize( int newWidth, int newHeight );
+
+};
+
+
+typedef YWebPushButton YWebIconButton;
+
+
+#endif // YWebPushButton_h
index 2a4191e..fd3f8e9 100644 (file)
 
 /-*/
 
+#define y2log_component "web-ui"
+#include <ycp/y2log.h>
+
 #include "YWebWidgetFactory.h"
+#include "YWebPushButton.h"
 
 #include <string>
 
-#include "YTypes.h"
-
-#include "YWebPushButton.h"
 
 using std::string;
 
@@ -88,6 +89,7 @@ class YTree;
 
 YPushButton *  YWebWidgetFactory::createPushButton     ( YWidget * parent, const string & label )                              
 {
+    y2milestone( "Creating push button '%s'", label.c_str() );
     return new YWebPushButton( parent, label );
 }