added resizing functionality to the WhiteWindow class

This commit is contained in:
fgerlits 2005-03-22 11:14:30 +00:00
parent 655dc8a9a0
commit 905552c619
5 changed files with 106 additions and 11 deletions

View file

@ -21,8 +21,8 @@
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
Author : $Author: maroy $
Version : $Revision: 1.5 $
Author : $Author: fgerlits $
Version : $Revision: 1.6 $
Location : $Source: /home/paul/cvs2svn-livesupport/newcvsrepo/livesupport/modules/widgets/include/LiveSupport/Widgets/WhiteWindow.h,v $
------------------------------------------------------------------------------*/
@ -44,6 +44,7 @@
#include <gtkmm/table.h>
#include <gtkmm/alignment.h>
#include <gtkmm/eventbox.h>
#include <gtkmm/image.h>
#include <gtkmm/window.h>
#include "LiveSupport/Core/Ptr.h"
@ -68,8 +69,8 @@ using namespace LiveSupport::Core;
/**
* A container holding exactly one child, habing a light blue border to it.
*
* @author $Author: maroy $
* @version $Revision: 1.5 $
* @author $Author: fgerlits $
* @version $Revision: 1.6 $
*/
class WhiteWindow : public Gtk::Window
{
@ -119,6 +120,21 @@ class WhiteWindow : public Gtk::Window
*/
ImageButton * closeButton;
/**
* The right alignment contaner for the resize image.
*/
Gtk::Alignment * resizeAlignment;
/**
* The event box container for the resize image.
*/
Gtk::EventBox * resizeEventBox;
/**
* The resize image.
*/
Gtk::Image * resizeImage;
/**
* Just a container for the main content of the window.
*/
@ -139,6 +155,15 @@ class WhiteWindow : public Gtk::Window
virtual void
onCloseButtonClicked(void) throw ();
/**
* The event handler for the resize being clicked on.
*
* @param event the button click event.
* @return true if the the event was handled, false otherwise.
*/
bool
onResizeClicked(GdkEventButton * event) throw ();
/**
* Default constructor.
*/

View file

@ -22,7 +22,7 @@
Author : $Author: fgerlits $
Version : $Revision: 1.8 $
Version : $Revision: 1.9 $
Location : $Source: /home/paul/cvs2svn-livesupport/newcvsrepo/livesupport/modules/widgets/include/LiveSupport/Widgets/WidgetFactory.h,v $
------------------------------------------------------------------------------*/
@ -41,6 +41,7 @@
#endif
#include <stdexcept>
#include <gtkmm/image.h>
#include "LiveSupport/Core/Configurable.h"
@ -85,7 +86,7 @@ using namespace LiveSupport::Core;
* </code></pre>
*
* @author $Author: fgerlits $
* @version $Revision: 1.8 $
* @version $Revision: 1.9 $
*/
class WidgetFactory :
virtual public Configurable
@ -165,6 +166,11 @@ class WidgetFactory :
*/
Glib::RefPtr<Gdk::Pixbuf> comboBoxRightImage;
/**
* The image for the resize handle.
*/
Glib::RefPtr<Gdk::Pixbuf> resizeImage;
/**
* The default constructor.
*/
@ -302,6 +308,16 @@ class WidgetFactory :
{
return whiteWindowImages;
}
/**
* Create and return a container holding a resize image.
* It is the reponsibility of the caller to dispose of the created
* object properly.
*
* @return the container holding the resize image.
*/
Gtk::Image *
createResizeImage(void) throw ();
};