updated code, so that all child widgets are Gtk::manage'd

This commit is contained in:
maroy 2005-02-18 13:54:24 +00:00
parent 9f224b6fb5
commit 59c4e916c0
15 changed files with 167 additions and 111 deletions

View file

@ -22,7 +22,7 @@
Author : $Author: maroy $
Version : $Revision: 1.4 $
Version : $Revision: 1.5 $
Location : $Source: /home/paul/cvs2svn-livesupport/newcvsrepo/livesupport/modules/widgets/include/LiveSupport/Widgets/BlueBin.h,v $
------------------------------------------------------------------------------*/
@ -63,7 +63,7 @@ using namespace LiveSupport::Core;
* A container holding exactly one child, habing a light blue border to it.
*
* @author $Author: maroy $
* @version $Revision: 1.4 $
* @version $Revision: 1.5 $
*/
class BlueBin : public Gtk::Bin
{
@ -112,6 +112,7 @@ class BlueBin : public Gtk::Bin
int x,
int y) throw ();
protected:
/**
* Return the background color.

View file

@ -22,7 +22,7 @@
Author : $Author: maroy $
Version : $Revision: 1.2 $
Version : $Revision: 1.3 $
Location : $Source: /home/paul/cvs2svn-livesupport/newcvsrepo/livesupport/modules/widgets/include/LiveSupport/Widgets/Button.h,v $
------------------------------------------------------------------------------*/
@ -63,7 +63,7 @@ using namespace LiveSupport::Core;
* A button holding a text.
*
* @author $Author: maroy $
* @version $Revision: 1.2 $
* @version $Revision: 1.3 $
*/
class Button : public Gtk::Button
{
@ -86,7 +86,7 @@ class Button : public Gtk::Button
/**
* The text displayed inside the button.
*/
Ptr<Gtk::Label>::Ref label;
Gtk::Label * label;
/**
* The state of the button.

View file

@ -22,7 +22,7 @@
Author : $Author: maroy $
Version : $Revision: 1.1 $
Version : $Revision: 1.2 $
Location : $Source: /home/paul/cvs2svn-livesupport/newcvsrepo/livesupport/modules/widgets/include/LiveSupport/Widgets/ComboBoxText.h,v $
------------------------------------------------------------------------------*/
@ -64,7 +64,7 @@ using namespace LiveSupport::Core;
* A combo box holding text entries.
*
* @author $Author: maroy $
* @version $Revision: 1.1 $
* @version $Revision: 1.2 $
*/
class ComboBoxText : public Gtk::ComboBoxText
{
@ -82,7 +82,7 @@ class ComboBoxText : public Gtk::ComboBoxText
/**
* The text displayed inside the button.
*/
Ptr<Gtk::Label>::Ref label;
Gtk::Label * label;
/**
* The X coordinate of the label.

View file

@ -22,7 +22,7 @@
Author : $Author: maroy $
Version : $Revision: 1.1 $
Version : $Revision: 1.2 $
Location : $Source: /home/paul/cvs2svn-livesupport/newcvsrepo/livesupport/modules/widgets/include/LiveSupport/Widgets/EntryBin.h,v $
------------------------------------------------------------------------------*/
@ -64,7 +64,7 @@ using namespace LiveSupport::Core;
* A container, holding a Gtk::Entry as its only child.
*
* @author $Author: maroy $
* @version $Revision: 1.1 $
* @version $Revision: 1.2 $
*/
class EntryBin : public BlueBin
{
@ -72,7 +72,7 @@ class EntryBin : public BlueBin
/**
* The text entry for this container.
*/
Ptr<Gtk::Entry>::Ref entry;
Gtk::Entry * entry;
public:
@ -97,7 +97,7 @@ class EntryBin : public BlueBin
*
* @return the entry held in this container.
*/
Ptr<Gtk::Entry>::Ref
Gtk::Entry *
getEntry(void) throw ()
{
return entry;

View file

@ -22,7 +22,7 @@
Author : $Author: maroy $
Version : $Revision: 1.3 $
Version : $Revision: 1.4 $
Location : $Source: /home/paul/cvs2svn-livesupport/newcvsrepo/livesupport/modules/widgets/include/LiveSupport/Widgets/WhiteWindow.h,v $
------------------------------------------------------------------------------*/
@ -69,7 +69,7 @@ using namespace LiveSupport::Core;
* A container holding exactly one child, habing a light blue border to it.
*
* @author $Author: maroy $
* @version $Revision: 1.3 $
* @version $Revision: 1.4 $
*/
class WhiteWindow : public Gtk::Window
{
@ -77,42 +77,42 @@ class WhiteWindow : public Gtk::Window
/**
* The rounded container for the window.
*/
Ptr<BlueBin>::Ref blueBin;
BlueBin * blueBin;
/**
* The layout of the window.
*/
Ptr<Gtk::Table>::Ref layout;
Gtk::Table * layout;
/**
* The event box for the title, enabling capturing mouse events.
*/
Ptr<Gtk::EventBox>::Ref titleEventBox;
Gtk::EventBox * titleEventBox;
/**
* The left alignment contaner for the title.
*/
Ptr<Gtk::Alignment>::Ref titleAlignment;
Gtk::Alignment * titleAlignment;
/**
* The title of the window.
*/
Ptr<Gtk::Label>::Ref title;
Gtk::Label * title;
/**
* The right alignment contaner for the close button.
*/
Ptr<Gtk::Alignment>::Ref closeButtonAlignment;
Gtk::Alignment * closeButtonAlignment;
/**
* The close button.
*/
Ptr<ImageButton>::Ref closeButton;
ImageButton * closeButton;
/**
* Just a container for the main content of the window.
*/
Ptr<Gtk::Alignment>::Ref childContainer;
Gtk::Alignment * childContainer;
/**
* The event handler for the title being clicked on.
@ -247,6 +247,22 @@ class WhiteWindow : public Gtk::Window
*/
virtual
~WhiteWindow(void) throw ();
/**
* Set the title of the window.
*
* @param title the title of the window.
*/
void
set_title(const Glib::ustring & title) throw ();
/**
* Get the title of the window.
*
* @return the title of the window.
*/
Glib::ustring
get_title(void) const throw ();
};

View file

@ -22,7 +22,7 @@
Author : $Author: maroy $
Version : $Revision: 1.5 $
Version : $Revision: 1.6 $
Location : $Source: /home/paul/cvs2svn-livesupport/newcvsrepo/livesupport/modules/widgets/include/LiveSupport/Widgets/WidgetFactory.h,v $
------------------------------------------------------------------------------*/
@ -84,7 +84,7 @@ using namespace LiveSupport::Core;
* </code></pre>
*
* @author $Author: maroy $
* @version $Revision: 1.5 $
* @version $Revision: 1.6 $
*/
class WidgetFactory :
virtual public Configurable
@ -241,50 +241,64 @@ class WidgetFactory :
/**
* Create and return a button.
* It is the reponsibility of the caller to dispose of the created
* object properly.
*
* @param label the label shown inside the button.
* @return a button with the specified label.
*/
Ptr<Button>::Ref
Button *
createButton(const Glib::ustring & label) throw ();
/**
* Create a stock button.
* It is the reponsibility of the caller to dispose of the created
* object properly.
*
* @param type the type of the button.
* @return a button of the requested type, or 0
*/
Ptr<ImageButton>::Ref
ImageButton *
createButton(ButtonType type) throw ();
/**
* Create a combo box, that holds text entries.
* It is the reponsibility of the caller to dispose of the created
* object properly.
*
* @return a combo box, that holds text entries.
*/
Ptr<ComboBoxText>::Ref
ComboBoxText *
createComboBoxText(void) throw ();
/**
* Create and return a blue singular container.
* It is the reponsibility of the caller to dispose of the created
* object properly.
*
* @return a blue singular container.
*/
Ptr<BlueBin>::Ref
BlueBin *
createBlueBin(void) throw ();
/**
* Create and return a dark blue singular container.
* It is the reponsibility of the caller to dispose of the created
* object properly.
*
* @return a dark blue singular container.
*/
Ptr<BlueBin>::Ref
BlueBin *
createDarkBlueBin(void) throw ();
/**
* Create and return a singular container holding a text entry.
* It is the reponsibility of the caller to dispose of the created
* object properly.
*
* @return a singular container holding a text entry.
*/
Ptr<EntryBin>::Ref
EntryBin *
createEntryBin(void) throw ();
/**