]> git.sesse.net Git - vlc/commitdiff
* controls/*, src/generic_window.cpp, src/generic_layout.cpp: a visibiliy
authorCyril Deguet <asmax@videolan.org>
Sun, 29 Feb 2004 16:49:55 +0000 (16:49 +0000)
committerCyril Deguet <asmax@videolan.org>
Sun, 29 Feb 2004 16:49:55 +0000 (16:49 +0000)
variable is now owned by CtrlGeneric, and handled directly by the layout
and the window (at the moment only the slider control uses it)
* theme/skin.dtd, parser/builder.cpp, parser, skin_parser.cpp: added
the "color" attribute for control text

29 files changed:
modules/gui/skins2/controls/ctrl_button.cpp
modules/gui/skins2/controls/ctrl_button.hpp
modules/gui/skins2/controls/ctrl_checkbox.cpp
modules/gui/skins2/controls/ctrl_checkbox.hpp
modules/gui/skins2/controls/ctrl_flat.hpp
modules/gui/skins2/controls/ctrl_generic.cpp
modules/gui/skins2/controls/ctrl_generic.hpp
modules/gui/skins2/controls/ctrl_image.cpp
modules/gui/skins2/controls/ctrl_image.hpp
modules/gui/skins2/controls/ctrl_list.cpp
modules/gui/skins2/controls/ctrl_list.hpp
modules/gui/skins2/controls/ctrl_move.cpp
modules/gui/skins2/controls/ctrl_move.hpp
modules/gui/skins2/controls/ctrl_radialslider.cpp
modules/gui/skins2/controls/ctrl_radialslider.hpp
modules/gui/skins2/controls/ctrl_resize.cpp
modules/gui/skins2/controls/ctrl_resize.hpp
modules/gui/skins2/controls/ctrl_slider.cpp
modules/gui/skins2/controls/ctrl_slider.hpp
modules/gui/skins2/controls/ctrl_text.cpp
modules/gui/skins2/controls/ctrl_text.hpp
modules/gui/skins2/parser/builder.cpp
modules/gui/skins2/parser/builder_data.def
modules/gui/skins2/parser/builder_data.hpp
modules/gui/skins2/parser/skin_parser.cpp
modules/gui/skins2/src/generic_layout.cpp
modules/gui/skins2/src/generic_window.cpp
modules/gui/skins2/theme/skin.dtd
modules/gui/skins2/theme/theme.xml

index 7ef3a3548fb9eda547777b7608b1ce86fad48ba6..324e4c901f30901bfb54ef69aa7150ca0fed76b8 100755 (executable)
@@ -2,7 +2,7 @@
  * ctrl_button.cpp
  *****************************************************************************
  * Copyright (C) 2003 VideoLAN
- * $Id: ctrl_button.cpp,v 1.1 2004/01/03 23:31:33 asmax Exp $
+ * $Id: ctrl_button.cpp,v 1.2 2004/02/29 16:49:55 asmax Exp $
  *
  * Authors: Cyril Deguet     <asmax@via.ecp.fr>
  *          Olivier Teulière <ipkiss@via.ecp.fr>
 CtrlButton::CtrlButton( intf_thread_t *pIntf, const GenericBitmap &rBmpUp,
                         const GenericBitmap &rBmpOver,
                         const GenericBitmap &rBmpDown, CmdGeneric &rCommand,
-                        const UString &rTooltip, const UString &rHelp ):
-    CtrlGeneric( pIntf, rHelp ), m_fsm( pIntf ), m_rCommand( rCommand ),
-    m_tooltip( rTooltip ),
+                        const UString &rTooltip, const UString &rHelp,
+                        VarBool *pVisible ):
+    CtrlGeneric( pIntf, rHelp, pVisible ), m_fsm( pIntf ),
+    m_rCommand( rCommand ), m_tooltip( rTooltip ),
     m_cmdUpOverDownOver( this, &transUpOverDownOver ),
     m_cmdDownOverUpOver( this, &transDownOverUpOver ),
     m_cmdDownOverDown( this, &transDownOverDown ),
index bf605a86b0f3c25833d38db68930f0777416b261..2917ba709769f3950eafa87382835b27690fa8e4 100644 (file)
@@ -2,7 +2,7 @@
  * ctrl_button.hpp
  *****************************************************************************
  * Copyright (C) 2003 VideoLAN
- * $Id: ctrl_button.hpp,v 1.1 2004/01/03 23:31:33 asmax Exp $
+ * $Id: ctrl_button.hpp,v 1.2 2004/02/29 16:49:55 asmax Exp $
  *
  * Authors: Cyril Deguet     <asmax@via.ecp.fr>
  *          Olivier Teulière <ipkiss@via.ecp.fr>
@@ -42,7 +42,7 @@ class CtrlButton: public CtrlGeneric
                     const GenericBitmap &rBmpOver,
                     const GenericBitmap &rBmpDown,
                     CmdGeneric &rCommand, const UString &rTooltip,
-                    const UString &rHelp );
+                    const UString &rHelp, VarBool *pVisible );
 
         virtual ~CtrlButton();
 
index d53a4041454976ce566a259be412a9a96b6841fe..59c43e38b310a06c432cec68eeaaea36098bad04 100755 (executable)
@@ -2,7 +2,7 @@
  * ctrl_checkbox.cpp
  *****************************************************************************
  * Copyright (C) 2003 VideoLAN
- * $Id: ctrl_checkbox.cpp,v 1.2 2004/01/18 19:54:46 asmax Exp $
+ * $Id: ctrl_checkbox.cpp,v 1.3 2004/02/29 16:49:55 asmax Exp $
  *
  * Authors: Cyril Deguet     <asmax@via.ecp.fr>
  *          Olivier Teulière <ipkiss@via.ecp.fr>
@@ -41,8 +41,10 @@ CtrlCheckbox::CtrlCheckbox( intf_thread_t *pIntf,
                             CmdGeneric &rCommand1, CmdGeneric &rCommand2,
                             const UString &rTooltip1,
                             const UString &rTooltip2,
-                            VarBool &rVariable, const UString &rHelp ):
-    CtrlGeneric( pIntf, rHelp ), m_fsm( pIntf ), m_rVariable( rVariable ),
+                            VarBool &rVariable, const UString &rHelp,
+                            VarBool *pVisible ):
+    CtrlGeneric( pIntf, rHelp, pVisible ), m_fsm( pIntf ),
+    m_rVariable( rVariable ),
     m_rCommand1( rCommand1 ), m_rCommand2( rCommand2 ),
     m_tooltip1( rTooltip1 ), m_tooltip2( rTooltip2 ),
     m_cmdUpOverDownOver( this, &transUpOverDownOver ),
@@ -247,7 +249,7 @@ void CtrlCheckbox::transHiddenUp( SkinObject *pCtrl )
 }
 
 
-void CtrlCheckbox::onUpdate( Subject<VarBool> &rVariable )
+void CtrlCheckbox::onVarBoolUpdate( VarBool &rVariable )
 {
     changeButton();
 }
index 7dbd244483f53278f2fc34f9e233829313902e40..ec827b5aadf9100c5b523e815a41ddda55f0736f 100644 (file)
@@ -2,7 +2,7 @@
  * ctrl_checkbox.hpp
  *****************************************************************************
  * Copyright (C) 2003 VideoLAN
- * $Id: ctrl_checkbox.hpp,v 1.1 2004/01/03 23:31:33 asmax Exp $
+ * $Id: ctrl_checkbox.hpp,v 1.2 2004/02/29 16:49:55 asmax Exp $
  *
  * Authors: Cyril Deguet     <asmax@via.ecp.fr>
  *          Olivier Teulière <ipkiss@via.ecp.fr>
 class GenericBitmap;
 class OSGraphics;
 class CmdGeneric;
-class VarBool;
 
 
 /// Base class for checkbox controls
-class CtrlCheckbox: public CtrlGeneric, public Observer<VarBool>
+class CtrlCheckbox: public CtrlGeneric
 {
     public:
         /// Create a checkbox with 6 images
@@ -49,7 +48,8 @@ class CtrlCheckbox: public CtrlGeneric, public Observer<VarBool>
                       const GenericBitmap &rBmpDown2,
                       CmdGeneric &rCommand1, CmdGeneric &rCommand2,
                       const UString &rTooltip1, const UString &rTooltip2,
-                      VarBool &rVariable, const UString &rHelp );
+                      VarBool &rVariable, const UString &rHelp,
+                      VarBool *pVisible);
 
         virtual ~CtrlCheckbox();
 
@@ -112,7 +112,7 @@ class CtrlCheckbox: public CtrlGeneric, public Observer<VarBool>
         static void transHiddenUp( SkinObject *pCtrl );
 
         /// Method called when the observed variable is modified
-        virtual void onUpdate( Subject<VarBool> &rVariable );
+        virtual void onVarBoolUpdate( VarBool &rVariable );
 
         /// Helper function to update the current state of images
         void changeButton();
index f113e26ee384001d3011d96816d354aeecd2bbd7..78f495bdd730b5538bc16afaca188ee82eed3325 100644 (file)
@@ -2,7 +2,7 @@
  * ctrl_flat.hpp
  *****************************************************************************
  * Copyright (C) 2003 VideoLAN
- * $Id: ctrl_flat.hpp,v 1.1 2004/01/03 23:31:33 asmax Exp $
+ * $Id: ctrl_flat.hpp,v 1.2 2004/02/29 16:49:55 asmax Exp $
  *
  * Authors: Cyril Deguet     <asmax@via.ecp.fr>
  *          Olivier Teulière <ipkiss@via.ecp.fr>
 class CtrlFlat: public CtrlGeneric
 {
     protected:
-        CtrlFlat( intf_thread_t *pIntf, const UString &rHelp ):
-            CtrlGeneric( pIntf, rHelp ) {}
+        CtrlFlat( intf_thread_t *pIntf, const UString &rHelp,
+                  VarBool *pVisible ):
+            CtrlGeneric( pIntf, rHelp, pVisible ) {}
+
         virtual ~CtrlFlat() {}
 };
 
index d6dabfa910d9a6561f4d18de22d5bca6e0b3f09d..5ddd0321bc04fbc198da2cb7e389d24f150cf9f9 100755 (executable)
@@ -2,7 +2,7 @@
  * ctrl_generic.cpp
  *****************************************************************************
  * Copyright (C) 2003 VideoLAN
- * $Id: ctrl_generic.cpp,v 1.1 2004/01/03 23:31:33 asmax Exp $
+ * $Id: ctrl_generic.cpp,v 1.2 2004/02/29 16:49:55 asmax Exp $
  *
  * Authors: Cyril Deguet     <asmax@via.ecp.fr>
  *          Olivier Teulière <ipkiss@via.ecp.fr>
 #include "../src/generic_window.hpp"
 #include "../src/os_graphics.hpp"
 #include "../utils/position.hpp"
+#include "../utils/var_bool.hpp"
 
 
-CtrlGeneric::CtrlGeneric( intf_thread_t *pIntf, const UString &rHelp ):
+CtrlGeneric::CtrlGeneric( intf_thread_t *pIntf, const UString &rHelp,
+                          VarBool *pVisible):
     SkinObject( pIntf ), m_pLayout( NULL ), m_pPosition( NULL ),
-    m_help( rHelp )
+    m_help( rHelp ), m_pVisible( pVisible )
 {
+    // Observe the visibility variable
+    if( m_pVisible )
+    {
+        m_pVisible->addObserver( this );
+    }
 }
 
 
@@ -42,6 +49,10 @@ CtrlGeneric::~CtrlGeneric()
     {
         delete m_pPosition;
     }
+    if( m_pVisible )
+    {
+        m_pVisible->delObserver( this );
+    }
 }
 
 
@@ -108,3 +119,25 @@ GenericWindow *CtrlGeneric::getWindow() const
     return NULL;
 }
 
+
+bool CtrlGeneric::isVisible() const
+{
+    return !m_pVisible || m_pVisible->get();
+}
+
+
+void CtrlGeneric::onUpdate( Subject<VarBool> &rVariable )
+{
+    // Is it the visibily variable ?
+    if( &rVariable == m_pVisible )
+    {
+        // Redraw the layout
+        notifyLayout();
+    }
+    else
+    {
+        // Call the user-defined callback
+        onVarBoolUpdate( (VarBool&)rVariable );
+    }
+}
+
index 447417c68bf6c3d7d52fdd044972b1a4f5b87dcd..0753832c6d18a6aa608a0dfb21e5af8ec4d586e7 100644 (file)
@@ -2,7 +2,7 @@
  * ctrl_generic.hpp
  *****************************************************************************
  * Copyright (C) 2003 VideoLAN
- * $Id: ctrl_generic.hpp,v 1.1 2004/01/03 23:31:33 asmax Exp $
+ * $Id: ctrl_generic.hpp,v 1.2 2004/02/29 16:49:55 asmax Exp $
  *
  * Authors: Cyril Deguet     <asmax@via.ecp.fr>
  *          Olivier Teulière <ipkiss@via.ecp.fr>
 #include "../utils/pointer.hpp"
 #include "../utils/fsm.hpp"
 #include "../utils/ustring.hpp"
+#include "../utils/observer.hpp"
 
 class EvtGeneric;
 class OSGraphics;
 class GenericLayout;
 class Position;
 class GenericWindow;
+class VarBool;
 
 
 /// Base class for controls
-class CtrlGeneric: public SkinObject
+class CtrlGeneric: public SkinObject, public Observer<VarBool>
 {
     public:
         virtual ~CtrlGeneric();
@@ -73,8 +75,13 @@ class CtrlGeneric: public SkinObject
         /// Return true if the control can gain the focus
         virtual bool isFocusable() const { return false; }
 
+        /// Return true if the control is visible
+        virtual bool isVisible() const;
+
     protected:
-        CtrlGeneric( intf_thread_t *pIntf, const UString &rHelp );
+        // If pVisible is NULL, the control is always visible
+        CtrlGeneric( intf_thread_t *pIntf, const UString &rHelp,
+                     VarBool *pVisible = NULL );
 
         /// Tell the layout when the image has changed
         virtual void notifyLayout() const;
@@ -95,6 +102,9 @@ class CtrlGeneric: public SkinObject
         /// the Position object is set
         virtual void onPositionChange() {}
 
+        /// Overload this method to get notified of bool variable changes
+        virtual void onVarBoolUpdate( VarBool &rVar ) {}
+
     private:
         /// Associated layout
         GenericLayout *m_pLayout;
@@ -102,6 +112,11 @@ class CtrlGeneric: public SkinObject
         Position *m_pPosition;
         /// Help text
         UString m_help;
+        /// Visibilty variable
+        VarBool *m_pVisible;
+
+        /// Method called when an observed bool variable is changed
+        virtual void onUpdate( Subject<VarBool> &rVariable );
 };
 
 typedef CountedPtr<CtrlGeneric> CtrlGenericPtr;
index c482b80e2a270a7e62deeb351299fee861415565..507764f02eaf9147227e5419ff088071b6622d0d 100755 (executable)
@@ -2,7 +2,7 @@
  * ctrl_image.cpp
  *****************************************************************************
  * Copyright (C) 2003 VideoLAN
- * $Id: ctrl_image.cpp,v 1.2 2004/02/01 14:44:11 asmax Exp $
+ * $Id: ctrl_image.cpp,v 1.3 2004/02/29 16:49:55 asmax Exp $
  *
  * Authors: Cyril Deguet     <asmax@via.ecp.fr>
  *          Olivier Teulière <ipkiss@via.ecp.fr>
@@ -32,8 +32,8 @@
 
 
 CtrlImage::CtrlImage( intf_thread_t *pIntf, const GenericBitmap &rBitmap,
-                      const UString &rHelp ):
-    CtrlFlat( pIntf, rHelp ), m_rBitmap( rBitmap )
+                      const UString &rHelp, VarBool *pVisible ):
+    CtrlFlat( pIntf, rHelp, pVisible ), m_rBitmap( rBitmap )
 {
     OSFactory *pOsFactory = OSFactory::instance( pIntf );
     // Create an initial unscaled image in the buffer
index 705d477ac74a305345eca2e4edf7d48be307938e..a3301bde1e59f36ddb53a5fa1aab1098d51f7ab8 100644 (file)
@@ -2,7 +2,7 @@
  * ctrl_image.hpp
  *****************************************************************************
  * Copyright (C) 2003 VideoLAN
- * $Id: ctrl_image.hpp,v 1.1 2004/01/03 23:31:33 asmax Exp $
+ * $Id: ctrl_image.hpp,v 1.2 2004/02/29 16:49:55 asmax Exp $
  *
  * Authors: Cyril Deguet     <asmax@via.ecp.fr>
  *          Olivier Teulière <ipkiss@via.ecp.fr>
@@ -38,7 +38,7 @@ class CtrlImage: public CtrlFlat
     public:
         // Create an image with the given bitmap (which is NOT copied)
         CtrlImage( intf_thread_t *pIntf, const GenericBitmap &rBitmap,
-                   const UString &rHelp );
+                   const UString &rHelp, VarBool *pVisible );
         virtual ~CtrlImage();
 
         /// Handle an event on the control
index 568e8fed668dbba6380574b4ece8aa1fe9a42a40..ea4056d7e6db893710fa6a0616bc63e51932f3f7 100644 (file)
@@ -2,7 +2,7 @@
  * ctrl_list.cpp
  *****************************************************************************
  * Copyright (C) 2003 VideoLAN
- * $Id: ctrl_list.cpp,v 1.2 2004/02/27 13:24:12 gbazin Exp $
+ * $Id: ctrl_list.cpp,v 1.3 2004/02/29 16:49:55 asmax Exp $
  *
  * Authors: Cyril Deguet     <asmax@via.ecp.fr>
  *          Olivier Teulière <ipkiss@via.ecp.fr>
@@ -41,8 +41,8 @@
 CtrlList::CtrlList( intf_thread_t *pIntf, VarList &rList, GenericFont &rFont,
                     uint32_t fgColor, uint32_t playColor, uint32_t bgColor1,
                     uint32_t bgColor2, uint32_t selColor,
-                    const UString &rHelp ):
-    CtrlGeneric( pIntf, rHelp ), m_rList( rList ), m_rFont( rFont ),
+                    const UString &rHelp, VarBool *pVisible ):
+    CtrlGeneric( pIntf, rHelp, pVisible ), m_rList( rList ), m_rFont( rFont ),
     m_fgColor( fgColor ), m_playColor( playColor ), m_bgColor1( bgColor1 ),
     m_bgColor2( bgColor2 ), m_selColor( selColor ), m_pLastSelected( NULL ),
     m_pImage( NULL ), m_lastPos( 0 )
index bfbc1f7ee33e392a29142917ade9b006103e807c..ae84d7049c1b6a2cee531894647d6747480c9e1b 100644 (file)
@@ -2,7 +2,7 @@
  * ctrl_list.hpp
  *****************************************************************************
  * Copyright (C) 2003 VideoLAN
- * $Id: ctrl_list.hpp,v 1.1 2004/01/03 23:31:33 asmax Exp $
+ * $Id: ctrl_list.hpp,v 1.2 2004/02/29 16:49:55 asmax Exp $
  *
  * Authors: Cyril Deguet     <asmax@via.ecp.fr>
  *          Olivier Teulière <ipkiss@via.ecp.fr>
@@ -41,7 +41,7 @@ class CtrlList: public CtrlGeneric, public Observer<VarList>,
         CtrlList( intf_thread_t *pIntf, VarList &rList, GenericFont &rFont,
                   uint32_t fgcolor, uint32_t playcolor, uint32_t bgcolor1,
                   uint32_t bgcolor2, uint32_t selColor,
-                  const UString &rHelp );
+                  const UString &rHelp, VarBool *pVisible );
         virtual ~CtrlList();
 
         /// Handle an event on the control.
index 901f20016d2ffb63d0282cace8d8defe41063b50..f341c6758625b0e011cb92f1f611a4e3f58ed42e 100755 (executable)
@@ -2,7 +2,7 @@
  * ctrl_move.cpp
  *****************************************************************************
  * Copyright (C) 2003 VideoLAN
- * $Id: ctrl_move.cpp,v 1.1 2004/01/03 23:31:33 asmax Exp $
+ * $Id: ctrl_move.cpp,v 1.2 2004/02/29 16:49:55 asmax Exp $
  *
  * Authors: Cyril Deguet     <asmax@via.ecp.fr>
  *          Olivier Teulière <ipkiss@via.ecp.fr>
@@ -33,8 +33,8 @@
 
 CtrlMove::CtrlMove( intf_thread_t *pIntf, WindowManager &rWindowManager,
                     CtrlFlat &rCtrl, GenericWindow &rWindow,
-                    const UString &rHelp ):
-    CtrlFlat( pIntf, rHelp ), m_fsm( pIntf ),
+                    const UString &rHelp, VarBool *pVisible ):
+    CtrlFlat( pIntf, rHelp, pVisible ), m_fsm( pIntf ),
     m_rWindowManager( rWindowManager ),
     m_rCtrl( rCtrl ), m_rWindow( rWindow ),
     m_cmdMovingMoving( this, &transMovingMoving ),
index 47dabb3edf88b85c345dfdd487781040af837b2f..43e538fab49d41da93b5c40db248b924126631e6 100644 (file)
@@ -2,7 +2,7 @@
  * ctrl_move.hpp
  *****************************************************************************
  * Copyright (C) 2003 VideoLAN
- * $Id: ctrl_move.hpp,v 1.1 2004/01/03 23:31:33 asmax Exp $
+ * $Id: ctrl_move.hpp,v 1.2 2004/02/29 16:49:55 asmax Exp $
  *
  * Authors: Cyril Deguet     <asmax@via.ecp.fr>
  *          Olivier Teulière <ipkiss@via.ecp.fr>
@@ -39,7 +39,7 @@ class CtrlMove: public CtrlFlat
     public:
         CtrlMove( intf_thread_t *pIntf, WindowManager &rWindowManager,
                   CtrlFlat &rCtrl, GenericWindow &rWindow,
-                  const UString &rHelp );
+                  const UString &rHelp, VarBool *pVisible );
         virtual ~CtrlMove() {}
 
         /// Handle an event
index fa03d14d5a317ffaeb40f7dba421b800a4b28a84..dcf763c66cf2f4c604b67e2932eafb62b4f3b3b6 100644 (file)
@@ -2,7 +2,7 @@
  * ctrl_radialslider.cpp
  *****************************************************************************
  * Copyright (C) 2003 VideoLAN
- * $Id: ctrl_radialslider.cpp,v 1.2 2004/01/11 17:12:17 asmax Exp $
+ * $Id: ctrl_radialslider.cpp,v 1.3 2004/02/29 16:49:55 asmax Exp $
  *
  * Authors: Cyril Deguet     <asmax@via.ecp.fr>
  *          Olivier Teulière <ipkiss@via.ecp.fr>
@@ -36,8 +36,9 @@
 CtrlRadialSlider::CtrlRadialSlider( intf_thread_t *pIntf,
                                     const GenericBitmap &rBmpSeq, int numImg,
                                     VarPercent &rVariable, float minAngle,
-                                    float maxAngle, const UString &rHelp ):
-    CtrlGeneric( pIntf, rHelp ), m_fsm( pIntf ), m_numImg( numImg ),
+                                    float maxAngle, const UString &rHelp,
+                                    VarBool *pVisible ):
+    CtrlGeneric( pIntf, rHelp, pVisible ), m_fsm( pIntf ), m_numImg( numImg ),
     m_rVariable( rVariable ), m_minAngle( minAngle ), m_maxAngle( maxAngle ),
     m_cmdUpDown( this, &transUpDown ), m_cmdDownUp( this, &transDownUp ),
     m_cmdMove( this, &transMove ), m_position( 0 ), m_lastPos( 0 )
index 6b34dca85e164eca599263f6d634faadae3ad0f8..b71f4dc3a38aa4e4097094d3e80d4995ea255f4b 100644 (file)
@@ -2,7 +2,7 @@
  * ctrl_radialslider.hpp
  *****************************************************************************
  * Copyright (C) 2003 VideoLAN
- * $Id: ctrl_radialslider.hpp,v 1.2 2004/01/11 17:12:17 asmax Exp $
+ * $Id: ctrl_radialslider.hpp,v 1.3 2004/02/29 16:49:55 asmax Exp $
  *
  * Authors: Cyril Deguet     <asmax@via.ecp.fr>
  *          Olivier Teulière <ipkiss@via.ecp.fr>
@@ -43,7 +43,8 @@ class CtrlRadialSlider: public CtrlGeneric, public Observer<VarPercent>
         /// composed of numImg subimages of the same size
         CtrlRadialSlider( intf_thread_t *pIntf, const GenericBitmap &rBmpSeq,
                           int numImg, VarPercent &rVariable, float minAngle,
-                          float maxAngle, const UString &rHelp );
+                          float maxAngle, const UString &rHelp,
+                          VarBool *pVisible );
 
         virtual ~CtrlRadialSlider();
 
index 3cb5512e71fb955db1a47192a4cf767d95040ea0..2dc06876721959fbed145324dea94b4ba1fab040 100755 (executable)
@@ -2,7 +2,7 @@
  * ctrl_resize.cpp
  *****************************************************************************
  * Copyright (C) 2003 VideoLAN
- * $Id: ctrl_resize.cpp,v 1.1 2004/01/03 23:31:33 asmax Exp $
+ * $Id: ctrl_resize.cpp,v 1.2 2004/02/29 16:49:55 asmax Exp $
  *
  * Authors: Cyril Deguet     <asmax@via.ecp.fr>
  *          Olivier Teulière <ipkiss@via.ecp.fr>
@@ -33,8 +33,9 @@
 
 
 CtrlResize::CtrlResize( intf_thread_t *pIntf, CtrlFlat &rCtrl,
-                        GenericLayout &rLayout, const UString &rHelp ):
-    CtrlFlat( pIntf, rHelp ), m_fsm( pIntf ), m_rCtrl( rCtrl ),
+                        GenericLayout &rLayout, const UString &rHelp,
+                        VarBool *pVisible ):
+    CtrlFlat( pIntf, rHelp, pVisible ), m_fsm( pIntf ), m_rCtrl( rCtrl ),
     m_rLayout( rLayout ), m_cmdResizeResize( this, &transResizeResize ),
     m_cmdStillResize( this, &transStillResize ),
     m_cmdResizeStill( this, &transResizeStill )
index 93e093ef8293b3754e2a554a95c74029094afd21..0423d42e036c1946268b94cace5e035cc72e69a3 100644 (file)
@@ -2,7 +2,7 @@
  * ctrl_resize.hpp
  *****************************************************************************
  * Copyright (C) 2003 VideoLAN
- * $Id: ctrl_resize.hpp,v 1.1 2004/01/03 23:31:33 asmax Exp $
+ * $Id: ctrl_resize.hpp,v 1.2 2004/02/29 16:49:55 asmax Exp $
  *
  * Authors: Cyril Deguet     <asmax@via.ecp.fr>
  *          Olivier Teulière <ipkiss@via.ecp.fr>
@@ -37,7 +37,8 @@ class CtrlResize: public CtrlFlat
 {
     public:
         CtrlResize( intf_thread_t *pIntf, CtrlFlat &rCtrl,
-                    GenericLayout &rLayout, const UString &rHelp );
+                    GenericLayout &rLayout, const UString &rHelp,
+                    VarBool *pVisible );
         virtual ~CtrlResize() {}
 
         /// Handle an event
index 2b20657ec51f9fcf7d84c75dc1d34e2d0ad005d1..95321efa93a6787a127a94c45a22d446f69df77d 100644 (file)
@@ -2,7 +2,7 @@
  * ctrl_slider.cpp
  *****************************************************************************
  * Copyright (C) 2003 VideoLAN
- * $Id: ctrl_slider.cpp,v 1.3 2004/02/01 21:13:04 ipkiss Exp $
+ * $Id: ctrl_slider.cpp,v 1.4 2004/02/29 16:49:55 asmax Exp $
  *
  * Authors: Cyril Deguet     <asmax@via.ecp.fr>
  *          Olivier Teulière <ipkiss@via.ecp.fr>
@@ -47,8 +47,8 @@ CtrlSliderCursor::CtrlSliderCursor( intf_thread_t *pIntf,
                                     VarBool *pVisible,
                                     const UString &rTooltip,
                                     const UString &rHelp ):
-    CtrlGeneric( pIntf, rHelp ), m_fsm( pIntf ), m_rVariable( rVariable ),
-    m_pVisible( pVisible ), m_tooltip( rTooltip ),
+    CtrlGeneric( pIntf, rHelp, pVisible ), m_fsm( pIntf ),
+    m_rVariable( rVariable ), m_tooltip( rTooltip ),
     m_width( rCurve.getWidth() ), m_height( rCurve.getHeight() ),
     m_cmdOverDown( this, &transOverDown ),
     m_cmdDownOver( this, &transDownOver ), m_cmdOverUp( this, &transOverUp ),
@@ -91,12 +91,6 @@ CtrlSliderCursor::CtrlSliderCursor( intf_thread_t *pIntf,
     // Observe the position variable
     m_rVariable.addObserver( this );
 
-    // Observe the visibility variable
-    if( m_pVisible )
-    {
-        m_pVisible->addObserver( this );
-    }
-
     // Initial position of the cursor
     m_lastPercentage = m_rVariable.get();
 }
@@ -105,10 +99,6 @@ CtrlSliderCursor::CtrlSliderCursor( intf_thread_t *pIntf,
 CtrlSliderCursor::~CtrlSliderCursor()
 {
     m_rVariable.delObserver( this );
-    if( m_pVisible )
-    {
-        m_pVisible->delObserver( this );
-    }
     SKINS_DELETE( m_pImgUp );
     SKINS_DELETE( m_pImgDown );
     SKINS_DELETE( m_pImgOver );
@@ -150,7 +140,7 @@ bool CtrlSliderCursor::mouseOver( int x, int y ) const
 
 void CtrlSliderCursor::draw( OSGraphics &rImage, int xDest, int yDest )
 {
-    if( m_pImg && (!m_pVisible || m_pVisible->get()) )
+    if( m_pImg )
     {
         // Compute the position of the cursor
         int xPos, yPos;
@@ -177,13 +167,6 @@ void CtrlSliderCursor::onUpdate( Subject<VarPercent> &rVariable )
 }
 
 
-void CtrlSliderCursor::onUpdate( Subject<VarBool> &rVariable )
-{
-    // The visibility variable has changed
-    notifyLayout();
-}
-
-
 void CtrlSliderCursor::transOverDown( SkinObject *pCtrl )
 {
     CtrlSliderCursor *pThis = (CtrlSliderCursor*)pCtrl;
@@ -320,8 +303,8 @@ CtrlSliderBg::CtrlSliderBg( intf_thread_t *pIntf, CtrlSliderCursor &rCursor,
                             const Bezier &rCurve, VarPercent &rVariable,
                             int thickness, VarBool *pVisible,
                             const UString &rHelp ):
-    CtrlGeneric( pIntf, rHelp ), m_rCursor( rCursor ), m_rVariable( rVariable ),
-    m_thickness( thickness ), m_pVisible( pVisible ), m_curve( rCurve ),
+    CtrlGeneric( pIntf, rHelp, pVisible ), m_rCursor( rCursor ),
+    m_rVariable( rVariable ), m_thickness( thickness ), m_curve( rCurve ),
     m_width( rCurve.getWidth() ), m_height( rCurve.getHeight() )
 {
 }
@@ -329,11 +312,6 @@ CtrlSliderBg::CtrlSliderBg( intf_thread_t *pIntf, CtrlSliderCursor &rCursor,
 
 bool CtrlSliderBg::mouseOver( int x, int y ) const
 {
-    if( m_pVisible && !m_pVisible->get() )
-    {
-        return false;
-    }
-
     // Compute the resize factors
     float factorX, factorY;
     getResizeFactors( factorX, factorY );
@@ -392,13 +370,6 @@ void CtrlSliderBg::handleEvent( EvtGeneric &rEvent )
 }
 
 
-void CtrlSliderBg::onUpdate( Subject<VarBool> &rVariable )
-{
-    // The visibility variable has changed
-    notifyLayout();
-}
-
-
 void CtrlSliderBg::getResizeFactors( float &rFactorX, float &rFactorY ) const
 {
     // Get the position of the control
index 2f9a272ac9e96e24bec994b2717b58ab350f0264..4464cefcac45388e0ee6c38e52a1966bf40ebd32 100755 (executable)
@@ -2,7 +2,7 @@
  * ctrl_slider.hpp
  *****************************************************************************
  * Copyright (C) 2003 VideoLAN
- * $Id: ctrl_slider.hpp,v 1.2 2004/01/11 17:12:17 asmax Exp $
+ * $Id: ctrl_slider.hpp,v 1.3 2004/02/29 16:49:55 asmax Exp $
  *
  * Authors: Cyril Deguet     <asmax@via.ecp.fr>
  *          Olivier Teulière <ipkiss@via.ecp.fr>
 class GenericBitmap;
 class OSGraphics;
 class VarPercent;
-class VarBool;
 
 
 /// Cursor of a slider
-class CtrlSliderCursor: public CtrlGeneric, public Observer<VarPercent>,
-    public Observer<VarBool>
+class CtrlSliderCursor: public CtrlGeneric, public Observer<VarPercent>
 {
     public:
         /// Create a cursor with 3 images (which are NOT copied, be careful)
@@ -70,8 +68,6 @@ class CtrlSliderCursor: public CtrlGeneric, public Observer<VarPercent>,
         FSM m_fsm;
         /// Variable associated to the cursor
         VarPercent &m_rVariable;
-        /// Visibility variable
-        VarBool *m_pVisible;
         /// Tooltip text
         const UString m_tooltip;
         /// Initial size of the control
@@ -109,9 +105,6 @@ class CtrlSliderCursor: public CtrlGeneric, public Observer<VarPercent>,
         /// Method called when the position variable is modified
         virtual void onUpdate( Subject<VarPercent> &rVariable );
 
-        /// Method called when the visibility variable is modified
-        virtual void onUpdate( Subject<VarBool> &rVariable );
-
         /// Methode to compute the resize factors
         void getResizeFactors( float &rFactorX, float &rFactorY ) const;
 };
@@ -121,7 +114,6 @@ class CtrlSliderCursor: public CtrlGeneric, public Observer<VarPercent>,
 class CtrlSliderBg: public CtrlGeneric
 {
     public:
-        /// If pVisible is NULL, the control is always visible
         CtrlSliderBg( intf_thread_t *pIntf, CtrlSliderCursor &rCursor,
                       const Bezier &rCurve, VarPercent &rVariable,
                       int thickness, VarBool *pVisible, const UString &rHelp );
@@ -140,8 +132,6 @@ class CtrlSliderBg: public CtrlGeneric
         VarPercent &m_rVariable;
         /// Thickness of the curve
         int m_thickness;
-        /// Visibility variable
-        VarBool *m_pVisible;
         /// Bezier curve of the slider
         const Bezier m_curve;
         /// Initial size of the control
@@ -149,9 +139,6 @@ class CtrlSliderBg: public CtrlGeneric
 
         /// Methode to compute the resize factors
         void getResizeFactors( float &rFactorX, float &rFactorY ) const;
-
-        /// Method called when the visibility variable is modified
-        virtual void onUpdate( Subject<VarBool> &rVariable );
 };
 
 
index 6c1cae89106efbd832e01f13dfd04eb6b712fd31..e7259ef7eb178ecc25516cf0bee6cc0c1c5b539c 100755 (executable)
@@ -2,7 +2,7 @@
  * ctrl_text.cpp
  *****************************************************************************
  * Copyright (C) 2003 VideoLAN
- * $Id: ctrl_text.cpp,v 1.1 2004/01/03 23:31:33 asmax Exp $
+ * $Id: ctrl_text.cpp,v 1.2 2004/02/29 16:49:55 asmax Exp $
  *
  * Authors: Cyril Deguet     <asmax@via.ecp.fr>
  *          Olivier Teulière <ipkiss@via.ecp.fr>
@@ -42,9 +42,9 @@
 
 CtrlText::CtrlText( intf_thread_t *pIntf, VarText &rVariable,
                     const GenericFont &rFont, const UString &rHelp,
-                    uint32_t color ):
-    CtrlGeneric( pIntf, rHelp ), m_fsm( pIntf ), m_rVariable( rVariable ),
-    m_cmdToManual( this, &transToManual ),
+                    uint32_t color, VarBool *pVisible ):
+    CtrlGeneric( pIntf, rHelp, pVisible ), m_fsm( pIntf ),
+    m_rVariable( rVariable ), m_cmdToManual( this, &transToManual ),
     m_cmdManualMoving( this, &transManualMoving ),
     m_cmdManualStill( this, &transManualStill ),
     m_cmdMove( this, &transMove ),
index 130254903e94f25949e858fb91786ac8f663f6ab..2df56db536867161e55fc287578efd4fdd9f99b8 100644 (file)
@@ -2,7 +2,7 @@
  * ctrl_text.hpp
  *****************************************************************************
  * Copyright (C) 2003 VideoLAN
- * $Id: ctrl_text.hpp,v 1.1 2004/01/03 23:31:33 asmax Exp $
+ * $Id: ctrl_text.hpp,v 1.2 2004/02/29 16:49:55 asmax Exp $
  *
  * Authors: Cyril Deguet     <asmax@via.ecp.fr>
  *          Olivier Teulière <ipkiss@via.ecp.fr>
@@ -44,7 +44,7 @@ class CtrlText: public CtrlGeneric, public Observer<VarText>
         /// Create a text control with the optional given color
         CtrlText( intf_thread_t *pIntf, VarText &rVariable,
                   const GenericFont &rFont, const UString &rHelp,
-                  uint32_t color = 0 );
+                  uint32_t color, VarBool *pVisible );
         virtual ~CtrlText();
 
         /// Handle an event
index 6c08c68314ab6ea9c469132e5fa84be476c62380..051c355cf4688cafb92855c641b8827f4b1da463 100755 (executable)
@@ -2,7 +2,7 @@
  * builder.cpp
  *****************************************************************************
  * Copyright (C) 2003 VideoLAN
- * $Id: builder.cpp,v 1.6 2004/02/27 13:24:12 gbazin Exp $
+ * $Id: builder.cpp,v 1.7 2004/02/29 16:49:55 asmax Exp $
  *
  * Authors: Cyril Deguet     <asmax@via.ecp.fr>
  *          Olivier Teulière <ipkiss@via.ecp.fr>
@@ -216,7 +216,7 @@ void Builder::addButton( const BuilderData::Button &rData )
 
     CtrlButton *pButton = new CtrlButton( getIntf(), *pBmpUp, *pBmpOver,
         *pBmpDown, *pCommand, UString( getIntf(), rData.m_tooltip.c_str() ),
-        UString( getIntf(), rData.m_help.c_str() ) );
+        UString( getIntf(), rData.m_help.c_str() ), NULL );
 
     // Compute the position of the control
     // XXX (we suppose all the images have the same size...)
@@ -287,7 +287,7 @@ void Builder::addCheckbox( const BuilderData::Checkbox &rData )
         *pBmpOver1, *pBmpDown1, *pBmpUp2, *pBmpOver2, *pBmpDown2, *pCommand1,
         *pCommand2, UString( getIntf(), rData.m_tooltip1.c_str() ),
         UString( getIntf(), rData.m_tooltip2.c_str() ), *pVar,
-        UString( getIntf(), rData.m_help.c_str() ) );
+        UString( getIntf(), rData.m_help.c_str() ), NULL );
 
     // Compute the position of the control
     // XXX (we suppose all the images have the same size...)
@@ -322,7 +322,8 @@ void Builder::addImage( const BuilderData::Image &rData )
     }
 
     CtrlImage *pImage = new CtrlImage( getIntf(), *pBmp,
-                                UString( getIntf(), rData.m_help.c_str() ) );
+                                UString( getIntf(), rData.m_help.c_str() ),
+                                NULL);
 
     // Compute the position of the control
     const Position pos = makePosition( rData.m_leftTop, rData.m_rightBottom,
@@ -334,13 +335,14 @@ void Builder::addImage( const BuilderData::Image &rData )
     if( rData.m_onclickId == "move" )
     {
         CtrlMove *pMove = new CtrlMove( getIntf(), m_pTheme->getWindowManager(),
-             *pImage, *pWindow, UString( getIntf(), rData.m_help.c_str() ) );
+             *pImage, *pWindow, UString( getIntf(), rData.m_help.c_str() ),
+             NULL);
         pLayout->addControl( pMove, pos, rData.m_layer );
     }
     else if( rData.m_onclickId == "resize" )
     {
         CtrlResize *pResize = new CtrlResize( getIntf(), *pImage, *pLayout,
-                UString( getIntf(), rData.m_help.c_str() ) );
+                UString( getIntf(), rData.m_help.c_str() ), NULL );
         pLayout->addControl( pResize, pos, rData.m_layer );
     }
     else
@@ -375,7 +377,7 @@ void Builder::addText( const BuilderData::Text &rData )
     m_pTheme->m_vars.push_back( VariablePtr( pVar ) );
 
     CtrlText *pText = new CtrlText( getIntf(), *pVar, *pFont,
-            UString( getIntf(), rData.m_help.c_str() ) );
+            UString( getIntf(), rData.m_help.c_str() ), rData.m_color, NULL );
 
     int height = pFont->getSize();
 
@@ -414,7 +416,8 @@ void Builder::addRadialSlider( const BuilderData::RadialSlider &rData )
     CtrlRadialSlider *pRadial =
         new CtrlRadialSlider( getIntf(), *pSeq, rData.m_nbImages, *pVar,
                               rData.m_minAngle, rData.m_maxAngle,
-                              UString( getIntf(), rData.m_help.c_str() ) );
+                              UString( getIntf(), rData.m_help.c_str() ),
+                              NULL );
 
     // XXX: resizing is not supported
     // Compute the position of the control
@@ -524,7 +527,7 @@ void Builder::addList( const BuilderData::List &rData )
     CtrlList *pList = new CtrlList( getIntf(), *pVar, *pFont,
        rData.m_fgColor, rData.m_playColor, rData.m_bgColor1,
        rData.m_bgColor2, rData.m_selColor,
-       UString( getIntf(), rData.m_help.c_str() ) );
+       UString( getIntf(), rData.m_help.c_str() ), NULL );
 
     // Compute the position of the control
     const Position pos = makePosition( rData.m_leftTop, rData.m_rightBottom,
index a770a7921c96ee620b7299acb0d3508cf825fae5..eb9804f9053e5f14ed430f2aab3004bc59ab15ff 100644 (file)
@@ -7,7 +7,7 @@ Anchor xPos:int yPos:int range:int priority:int windowId:string
 Button id:string xPos:int yPos:int leftTop:string rightBottom:string upId:string downId:string overId:string actionId:string tooltip:string help:string layer:int windowId:string layoutId:string
 Checkbox id:string xPos:int yPos:int leftTop:string rightBottom:string up1Id:string down1Id:string over1Id:string up2Id:string down2Id:string over2Id:string state:string action1:string action2:string tooltip1:string tooltip2:string help:string layer:int windowId:string layoutId:string
 Image id:string xPos:int yPos:int leftTop:string rightBottom:string visible:bool bmpId:string onclickId:string help:string layer:int windowId:string layoutId:string
-Text id:string xPos:int yPos:int fontId:string text:string width:int help:string layer:int windowId:string layoutId:string
+Text id:string xPos:int yPos:int fontId:string text:string width:int color:uint32_t help:string layer:int windowId:string layoutId:string
 RadialSlider id:string visible:string xPos:int yPos:int leftTop:string rightBottom:string sequence:string nbImages:int minAngle:float maxAngle:float value:string tooltip:string help:string layer:int windowId:string layoutId:string
 Slider id:string visible:string xPos:int yPos:int leftTop:string rightBottom:string upId:string downId:string overId:string points:string thickness:int value:string tooltip:string help:string layer:int windowId:string layoutId:string
 List id:string xPos:int yPos:int width:int height:int leftTop:string rightBottom:string fontId:string var:string fgColor:uint32_t playColor:uint32_t bgColor1:uint32_t bgColor2:uint32_t selColor:uint32_t help:string layer:int windowId:string layoutId:string
index b0839630d18d97c5cc1e5c98aa61be7b2999a7ba..1c1353a772f961627e358986a233ecd04d81c5a5 100644 (file)
@@ -2,7 +2,7 @@
  * builder_data.hpp
  *****************************************************************************
  * Copyright (C) 2003 VideoLAN
- * $Id: builder_data.hpp,v 1.4 2004/02/27 13:24:12 gbazin Exp $
+ * $Id: builder_data.hpp,v 1.5 2004/02/29 16:49:55 asmax Exp $
  *
  * Authors: Cyril Deguet     <asmax@via.ecp.fr>
  *          Olivier Teulière <ipkiss@via.ecp.fr>
 #ifndef BUILDER_DATA_HPP
 #define BUILDER_DATA_HPP
 
+using namespace std;
+
 #include <vlc/vlc.h>
 #include <list>
+#include <map>
 #include <string>
 
-using namespace std;
-
 /// Structure for mapping data from XML file
 struct BuilderData
 {
@@ -206,8 +207,8 @@ m_id( id ), m_xPos( xPos ), m_yPos( yPos ), m_leftTop( leftTop ), m_rightBottom(
     /// Type definition
     struct Text
     {
-        Text( const string & id, int xPos, int yPos, const string & fontId, const string & text, int width, const string & help, int layer, const string & windowId, const string & layoutId ):
-m_id( id ), m_xPos( xPos ), m_yPos( yPos ), m_fontId( fontId ), m_text( text ), m_width( width ), m_help( help ), m_layer( layer ), m_windowId( windowId ), m_layoutId( layoutId ) {}
+        Text( const string & id, int xPos, int yPos, const string & fontId, const string & text, int width, uint32_t color, const string & help, int layer, const string & windowId, const string & layoutId ):
+m_id( id ), m_xPos( xPos ), m_yPos( yPos ), m_fontId( fontId ), m_text( text ), m_width( width ), m_color( color ), m_help( help ), m_layer( layer ), m_windowId( windowId ), m_layoutId( layoutId ) {}
 
         const string m_id;
         int m_xPos;
@@ -215,6 +216,7 @@ m_id( id ), m_xPos( xPos ), m_yPos( yPos ), m_fontId( fontId ), m_text( text ),
         const string m_fontId;
         const string m_text;
         int m_width;
+        uint32_t m_color;
         const string m_help;
         int m_layer;
         const string m_windowId;
index d3558363edc5b9a2edef91d650b16d80114c9943..345776f13b8da5139fd1d53c9f04f78ce63ced2e 100644 (file)
@@ -2,7 +2,7 @@
  * skin_parser.cpp
  *****************************************************************************
  * Copyright (C) 2004 VideoLAN
- * $Id: skin_parser.cpp,v 1.1 2004/01/25 11:44:19 asmax Exp $
+ * $Id: skin_parser.cpp,v 1.2 2004/02/29 16:49:55 asmax Exp $
  *
  * Authors: Cyril Deguet     <asmax@via.ecp.fr>
  *
@@ -163,7 +163,8 @@ void SkinParser::handleBeginElement( const string &rName, AttrList_t &attr )
     {
         const BuilderData::Text textData( attr["id"], atoi( attr["x"] ) +
                 m_xOffset, atoi( attr["y"] ) + m_yOffset, attr["font"],
-                attr["text"], atoi( attr["width"] ), attr["help"], m_curLayer,
+                attr["text"], atoi( attr["width"] ),
+                ConvertColor( attr["color"] ), attr["help"], m_curLayer,
                 m_curWindowId, m_curLayoutId );
         m_curLayer++;
         m_data.m_listText.push_back( textData );
index 5e3ac4947c7a61bd7284b8325de3e4ec7938fe66..91e5fceec08f485e9e164f3315fb14c7bedbb39d 100644 (file)
@@ -2,7 +2,7 @@
  * generic_layout.cpp
  *****************************************************************************
  * Copyright (C) 2003 VideoLAN
- * $Id: generic_layout.cpp,v 1.1 2004/01/03 23:31:33 asmax Exp $
+ * $Id: generic_layout.cpp,v 1.2 2004/02/29 16:49:55 asmax Exp $
  *
  * Authors: Cyril Deguet     <asmax@via.ecp.fr>
  *          Olivier Teulière <ipkiss@via.ecp.fr>
@@ -123,6 +123,7 @@ const list<LayeredControl> &GenericLayout::getControlList() const
 
 void GenericLayout::onControlUpdate( const CtrlGeneric &rCtrl )
 {
+    // TODO: refresh only the needed area if possible
     refreshAll();
 }
 
@@ -181,11 +182,11 @@ void GenericLayout::refreshAll()
     list<LayeredControl>::const_iterator iter;
     for( iter = m_controlList.begin(); iter != m_controlList.end(); iter++ )
     {
-        const Position *pPos = (*iter).m_pControl->getPosition();
-        if( pPos )
+        CtrlGeneric *pCtrl = (*iter).m_pControl;
+        const Position *pPos = pCtrl->getPosition();
+        if( pCtrl->isVisible() && pPos )
         {
-            (*iter).m_pControl->draw( *m_pImage, pPos->getLeft(),
-                                      pPos->getTop() );
+            pCtrl->draw( *m_pImage, pPos->getLeft(), pPos->getTop() );
         }
     }
 
index d551b0e0fedfea5b712dec69ea13e87c3b28c62c..7803ef86d5f27d43a6337dc283c39ff0cb0e472c 100644 (file)
@@ -2,7 +2,7 @@
  * generic_window.cpp
  *****************************************************************************
  * Copyright (C) 2003 VideoLAN
- * $Id: generic_window.cpp,v 1.2 2004/01/25 21:38:57 asmax Exp $
+ * $Id: generic_window.cpp,v 1.3 2004/02/29 16:49:55 asmax Exp $
  *
  * Authors: Cyril Deguet     <asmax@via.ecp.fr>
  *          Olivier Teulière <ipkiss@via.ecp.fr>
@@ -503,8 +503,9 @@ CtrlGeneric *GenericWindow::findHitControl( int xPos, int yPos )
             int xRel = xPos - pos->getLeft();
             int yRel = yPos - pos->getTop();
 
+            CtrlGeneric *pCtrl = (*iter).m_pControl;
             // Control hit ?
-            if( (*iter).m_pControl->mouseOver( xRel, yRel ) )
+            if( pCtrl->isVisible() && pCtrl->mouseOver( xRel, yRel ) )
             {
                 pNewHitControl = (*iter).m_pControl;
                 break;
index c2753c8e0e2544191cbee2487b68e43be0a05992..aebc0f6dcdadc833bc938c383b862467172f9934 100644 (file)
         y           CDATA   "0"
         text        CDATA   "\0"
         font        CDATA   #REQUIRED
-        align       CDATA   "left"
+        color       CDATA   "#000000"
         width       CDATA   "0"
-        display     CDATA   "none"
-        scroll      CDATA   "true"
-        scrollspace CDATA   "20"
         help        CDATA   "\0"
     >
 <!ELEMENT Playlist (Slider)>
index aaed2c8b65734c4b894779a7206c4df31de48a0b..e96bd82448380816fa6d63f13d5c6e343d08d1d1 100644 (file)
@@ -77,7 +77,7 @@
     <Group x="0" y="0">\r
       <Anchor x="7" y="151" priority="100"/>\r
       <Image x="0" y="0" image="mainbody" onclick="move"/>\r
-      <Text font="default_font" width="70" x="287" y="79" text="$T"/>\r
+      <Text font="default_font" width="70" x="287" y="79" text="$T" color="#000000"/>\r
       <Button x="42" y="42" up="preferences" down="preferences_onclick" over="preferences" action="dialogs.prefs()" tooltiptext="Preferences"/>\r
       <Button x="17" y="64" up="stop" down="stop_onclick" over="stop" action="vlc.stop()" tooltiptext="Stop"/>\r
       <CheckBox x="42" y="87" up1="playlist_button" down1="playlist_button_onclick" up2="playlist_button2" down2="playlist_button_onclick2" state="playlist_window.isVisible" action1="playlist_window.show()" action2="playlist_window.hide()" tooltiptext1="Show Playlist" tooltiptext2="Hide Playlist"/>\r