added WhiteWindow constructor for windows with image titles (instead of text);

changed Scratchpad window title to an image
This commit is contained in:
fgerlits 2005-04-11 15:58:59 +00:00
parent 2d4269991c
commit ae1989488c
5 changed files with 117 additions and 39 deletions

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/WhiteWindow.h,v $
------------------------------------------------------------------------------*/
@ -71,7 +71,7 @@ using namespace LiveSupport::Core;
* A container holding exactly one child, habing a light blue border to it.
*
* @author $Author: fgerlits $
* @version $Revision: 1.8 $
* @version $Revision: 1.9 $
*/
class WhiteWindow : public Gtk::Window
{
@ -107,9 +107,9 @@ class WhiteWindow : public Gtk::Window
Gtk::Alignment * titleAlignment;
/**
* The title of the window.
* The title of the window (if it's of text type, otherwise 0).
*/
Gtk::Label * title;
Gtk::Label * titleLabel;
/**
* The right alignment contaner for the close button.
@ -264,10 +264,37 @@ class WhiteWindow : public Gtk::Window
virtual GtkType
child_type_vfunc() const throw ();
/**
* The common part of both constructors.
*
* @param backgroundColor the background color.
* @param cornerImages the corner images.
* @param resizable true if the user can resize the window.
*/
void
constructWindow(Colors::ColorName backgroundColor,
Ptr<CornerImages>::Ref cornerImages,
bool resizable = true)
throw ();
public:
/**
* Constructor.
* Constructor for windows with image titles.
*
* @param title the title of the window.
* @param backgroundColor the background color.
* @param cornerImages the corner images.
* @param resizable true if the user can resize the window.
*/
WhiteWindow(WidgetFactory::ImageType title,
Colors::ColorName backgroundColor,
Ptr<CornerImages>::Ref cornerImages,
bool resizable = true)
throw ();
/**
* Constructor for windows with text titles.
*
* @param title the title of the window.
* @param backgroundColor the background color.

View file

@ -22,7 +22,7 @@
Author : $Author: fgerlits $
Version : $Revision: 1.10 $
Version : $Revision: 1.11 $
Location : $Source: /home/paul/cvs2svn-livesupport/newcvsrepo/livesupport/modules/widgets/include/LiveSupport/Widgets/WidgetFactory.h,v $
------------------------------------------------------------------------------*/
@ -87,7 +87,7 @@ using namespace LiveSupport::Core;
* </code></pre>
*
* @author $Author: fgerlits $
* @version $Revision: 1.10 $
* @version $Revision: 1.11 $
*/
class WidgetFactory :
virtual public Configurable
@ -105,6 +105,13 @@ class WidgetFactory :
smallPlayButton, smallPauseButton, smallStopButton }
ImageButtonType;
/**
* The list of available miscellaneous images.
*/
typedef enum { resizeImage,
scratchpadWindowTitleImage }
ImageType;
private:
/**
@ -167,11 +174,6 @@ class WidgetFactory :
*/
Glib::RefPtr<Gdk::Pixbuf> comboBoxRightImage;
/**
* The image for the resize handle.
*/
Glib::RefPtr<Gdk::Pixbuf> resizeImage;
/**
* The default constructor.
*/
@ -311,14 +313,14 @@ class WidgetFactory :
}
/**
* Create and return a container holding a resize image.
* Create and return a container holding an image.
* It is the reponsibility of the caller to dispose of the created
* object properly.
*
* @return the container holding the resize image.
* @return the container holding the requested image.
*/
Gtk::Image *
createResizeImage(void) throw ();
createImage(ImageType imageName) throw ();
/**
* Create and return a ZebraTreeView instance.