made windows and the image buttons transparent, at last
fix for issue #793, see http://bugs.campware.org/view.php?id=793
This commit is contained in:
parent
a7baf17231
commit
7cbec7fbf2
11 changed files with 274 additions and 30 deletions
|
@ -21,8 +21,8 @@
|
|||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
|
||||
|
||||
Author : $Author: fgerlits $
|
||||
Version : $Revision: 1.6 $
|
||||
Author : $Author: maroy $
|
||||
Version : $Revision: 1.7 $
|
||||
Location : $Source: /home/paul/cvs2svn-livesupport/newcvsrepo/livesupport/modules/widgets/include/LiveSupport/Widgets/BlueBin.h,v $
|
||||
|
||||
------------------------------------------------------------------------------*/
|
||||
|
@ -44,6 +44,7 @@
|
|||
|
||||
#include "LiveSupport/Core/Ptr.h"
|
||||
#include "LiveSupport/Widgets/CornerImages.h"
|
||||
#include "LiveSupport/Widgets/CornerBitmaps.h"
|
||||
#include "LiveSupport/Widgets/Colors.h"
|
||||
|
||||
|
||||
|
@ -63,12 +64,19 @@ using namespace LiveSupport::Core;
|
|||
/**
|
||||
* A container holding exactly one child, habing a light blue border to it.
|
||||
*
|
||||
* @author $Author: fgerlits $
|
||||
* @version $Revision: 1.6 $
|
||||
* @author $Author: maroy $
|
||||
* @version $Revision: 1.7 $
|
||||
*/
|
||||
class BlueBin : public Gtk::Bin
|
||||
{
|
||||
private:
|
||||
/**
|
||||
* Flag to indicate if the bin should try to make its border
|
||||
* transparent (only where the border images are transparent,
|
||||
* of course).
|
||||
*/
|
||||
bool transparentBorder;
|
||||
|
||||
/**
|
||||
* The Gdk::Window object, used to draw inside this button.
|
||||
*/
|
||||
|
@ -94,6 +102,11 @@ class BlueBin : public Gtk::Bin
|
|||
*/
|
||||
Ptr<CornerImages>::Ref cornerImages;
|
||||
|
||||
/**
|
||||
* The corner bitmaps, for masking for transparency.
|
||||
*/
|
||||
Ptr<CornerBitmaps>::Ref cornerBitmaps;
|
||||
|
||||
/**
|
||||
* Default constructor.
|
||||
*/
|
||||
|
@ -221,9 +234,13 @@ class BlueBin : public Gtk::Bin
|
|||
*
|
||||
* @param backgroundColor the RGB value for the background color.
|
||||
* @param cornerImages the corner images.
|
||||
* @param transparentBorder flag to indicate if the widget should
|
||||
* make its border transparent, where the border images
|
||||
* are transparent themselves
|
||||
*/
|
||||
BlueBin(Colors::ColorName backgroundColor,
|
||||
Ptr<CornerImages>::Ref cornerImages)
|
||||
Ptr<CornerImages>::Ref cornerImages,
|
||||
bool transparentBorder = false)
|
||||
throw ();
|
||||
|
||||
/**
|
||||
|
|
|
@ -0,0 +1,138 @@
|
|||
/*------------------------------------------------------------------------------
|
||||
|
||||
Copyright (c) 2004 Media Development Loan Fund
|
||||
|
||||
This file is part of the LiveSupport project.
|
||||
http://livesupport.campware.org/
|
||||
To report bugs, send an e-mail to bugs@campware.org
|
||||
|
||||
LiveSupport is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
LiveSupport is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with LiveSupport; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
|
||||
|
||||
Author : $Author: maroy $
|
||||
Version : $Revision: 1.1 $
|
||||
Location : $Source: /home/paul/cvs2svn-livesupport/newcvsrepo/livesupport/modules/widgets/include/LiveSupport/Widgets/CornerBitmaps.h,v $
|
||||
|
||||
------------------------------------------------------------------------------*/
|
||||
#ifndef LiveSupport_Widgets_CornerBitmaps_h
|
||||
#define LiveSupport_Widgets_CornerBitmaps_h
|
||||
|
||||
#ifndef __cplusplus
|
||||
#error This is a C++ include file
|
||||
#endif
|
||||
|
||||
|
||||
/* ============================================================ include files */
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include "configure.h"
|
||||
#endif
|
||||
|
||||
#include <stdexcept>
|
||||
|
||||
#include "gdkmm/bitmap.h"
|
||||
|
||||
|
||||
namespace LiveSupport {
|
||||
namespace Widgets {
|
||||
|
||||
/* ================================================================ constants */
|
||||
|
||||
|
||||
/* =================================================================== macros */
|
||||
|
||||
|
||||
/* =============================================================== data types */
|
||||
|
||||
/**
|
||||
* A helper class to hold a set of corner bitmaps.
|
||||
*
|
||||
* @author $Author: maroy $
|
||||
* @version $Revision: 1.1 $
|
||||
*/
|
||||
class CornerBitmaps
|
||||
{
|
||||
public:
|
||||
/**
|
||||
* The top left image.
|
||||
*/
|
||||
Glib::RefPtr<Gdk::Bitmap> topLeftBitmap;
|
||||
|
||||
/**
|
||||
* The top right image.
|
||||
*/
|
||||
Glib::RefPtr<Gdk::Bitmap> topRightBitmap;
|
||||
|
||||
/**
|
||||
* The bottom left image.
|
||||
*/
|
||||
Glib::RefPtr<Gdk::Bitmap> bottomLeftBitmap;
|
||||
|
||||
/**
|
||||
* The bottom right image.
|
||||
*/
|
||||
Glib::RefPtr<Gdk::Bitmap> bottomRightBitmap;
|
||||
|
||||
/**
|
||||
* The default constructor.
|
||||
*/
|
||||
CornerBitmaps(void) throw ()
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
* Constructor with image references.
|
||||
* If any of the images is not available, the result is undefined.
|
||||
*
|
||||
* @param topLeftBitmap the top left bitmap of the border
|
||||
* @param topRightBitmap the top right bitmap of the border
|
||||
* @param bottomLeftBitmap the bottom left bitmap of the border
|
||||
* @param bottomRightBitmap the bottom right bitmap of the border
|
||||
*/
|
||||
CornerBitmaps(Glib::RefPtr<Gdk::Bitmap> topLeftBitmap,
|
||||
Glib::RefPtr<Gdk::Bitmap> topRightBitmap,
|
||||
Glib::RefPtr<Gdk::Bitmap> bottomLeftBitmap,
|
||||
Glib::RefPtr<Gdk::Bitmap> bottomRightBitmap)
|
||||
throw ()
|
||||
{
|
||||
this->topLeftBitmap = topLeftBitmap;
|
||||
this->topRightBitmap = topRightBitmap;
|
||||
this->bottomLeftBitmap = bottomLeftBitmap;
|
||||
this->bottomRightBitmap = bottomRightBitmap;
|
||||
}
|
||||
|
||||
/**
|
||||
* A virtual destructor, as this class has virtual functions.
|
||||
*/
|
||||
virtual
|
||||
~CornerBitmaps(void) throw ()
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
};
|
||||
|
||||
|
||||
/* ================================================= external data structures */
|
||||
|
||||
|
||||
/* ====================================================== function prototypes */
|
||||
|
||||
|
||||
} // namespace Widgets
|
||||
} // namespace LiveSupport
|
||||
|
||||
#endif // LiveSupport_Widgets_CornerBitmaps_h
|
||||
|
|
@ -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/ImageButton.h,v $
|
||||
|
||||
------------------------------------------------------------------------------*/
|
||||
|
@ -60,7 +60,7 @@ namespace Widgets {
|
|||
* to represent it.
|
||||
*
|
||||
* @author $Author: maroy $
|
||||
* @version $Revision: 1.1 $
|
||||
* @version $Revision: 1.2 $
|
||||
*/
|
||||
class ImageButton : public Gtk::Button
|
||||
{
|
||||
|
@ -95,6 +95,16 @@ class ImageButton : public Gtk::Button
|
|||
*/
|
||||
Glib::RefPtr<Gdk::Pixbuf> rollImage;
|
||||
|
||||
/**
|
||||
* The transparency mask for the button, in passive state.
|
||||
*/
|
||||
Glib::RefPtr<Gdk::Bitmap> passiveMask;
|
||||
|
||||
/**
|
||||
* The transparency mask for the button, in rollover state.
|
||||
*/
|
||||
Glib::RefPtr<Gdk::Bitmap> rollMask;
|
||||
|
||||
/**
|
||||
* Default constructor.
|
||||
*/
|
||||
|
|
|
@ -21,8 +21,8 @@
|
|||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
|
||||
|
||||
Author : $Author: fgerlits $
|
||||
Version : $Revision: 1.11 $
|
||||
Author : $Author: maroy $
|
||||
Version : $Revision: 1.12 $
|
||||
Location : $Source: /home/paul/cvs2svn-livesupport/newcvsrepo/livesupport/modules/widgets/include/LiveSupport/Widgets/WidgetFactory.h,v $
|
||||
|
||||
------------------------------------------------------------------------------*/
|
||||
|
@ -86,8 +86,8 @@ using namespace LiveSupport::Core;
|
|||
* <!ATTLIST widgetFactory path CDATA #REQUIRED >
|
||||
* </code></pre>
|
||||
*
|
||||
* @author $Author: fgerlits $
|
||||
* @version $Revision: 1.11 $
|
||||
* @author $Author: maroy $
|
||||
* @version $Revision: 1.12 $
|
||||
*/
|
||||
class WidgetFactory :
|
||||
virtual public Configurable
|
||||
|
@ -102,7 +102,8 @@ class WidgetFactory :
|
|||
* The types of available image buttons.
|
||||
*/
|
||||
typedef enum { deleteButton,
|
||||
smallPlayButton, smallPauseButton, smallStopButton }
|
||||
smallPlayButton, smallPauseButton, smallStopButton,
|
||||
hugePlayButton }
|
||||
ImageButtonType;
|
||||
|
||||
/**
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue