]> git.sesse.net Git - vlc/commitdiff
Skins2: Cosmetics, 100% pure. We don't indent for labels in C, we don't in C++.
authorJP Dinger <jpd@videolan.org>
Sat, 12 Sep 2009 15:14:01 +0000 (17:14 +0200)
committerJP Dinger <jpd@videolan.org>
Sat, 5 Dec 2009 21:25:40 +0000 (22:25 +0100)
120 files changed:
modules/gui/skins2/commands/async_queue.hpp
modules/gui/skins2/commands/cmd_add_item.hpp
modules/gui/skins2/commands/cmd_audio.hpp
modules/gui/skins2/commands/cmd_change_skin.hpp
modules/gui/skins2/commands/cmd_generic.hpp
modules/gui/skins2/commands/cmd_layout.hpp
modules/gui/skins2/commands/cmd_minimize.hpp
modules/gui/skins2/commands/cmd_muxer.hpp
modules/gui/skins2/commands/cmd_playlist.hpp
modules/gui/skins2/commands/cmd_playtree.hpp
modules/gui/skins2/commands/cmd_resize.hpp
modules/gui/skins2/commands/cmd_show_window.hpp
modules/gui/skins2/commands/cmd_update_item.hpp
modules/gui/skins2/commands/cmd_vars.hpp
modules/gui/skins2/commands/cmd_voutwindow.hpp
modules/gui/skins2/controls/ctrl_button.hpp
modules/gui/skins2/controls/ctrl_checkbox.hpp
modules/gui/skins2/controls/ctrl_flat.hpp
modules/gui/skins2/controls/ctrl_generic.hpp
modules/gui/skins2/controls/ctrl_image.hpp
modules/gui/skins2/controls/ctrl_list.hpp
modules/gui/skins2/controls/ctrl_move.hpp
modules/gui/skins2/controls/ctrl_radialslider.hpp
modules/gui/skins2/controls/ctrl_resize.hpp
modules/gui/skins2/controls/ctrl_slider.hpp
modules/gui/skins2/controls/ctrl_text.hpp
modules/gui/skins2/controls/ctrl_tree.hpp
modules/gui/skins2/controls/ctrl_video.hpp
modules/gui/skins2/events/evt_enter.hpp
modules/gui/skins2/events/evt_focus.hpp
modules/gui/skins2/events/evt_generic.hpp
modules/gui/skins2/events/evt_input.hpp
modules/gui/skins2/events/evt_key.hpp
modules/gui/skins2/events/evt_leave.hpp
modules/gui/skins2/events/evt_menu.hpp
modules/gui/skins2/events/evt_motion.hpp
modules/gui/skins2/events/evt_mouse.hpp
modules/gui/skins2/events/evt_refresh.hpp
modules/gui/skins2/events/evt_scroll.hpp
modules/gui/skins2/events/evt_special.hpp
modules/gui/skins2/macosx/macosx_dragdrop.hpp
modules/gui/skins2/macosx/macosx_factory.hpp
modules/gui/skins2/macosx/macosx_graphics.hpp
modules/gui/skins2/macosx/macosx_loop.hpp
modules/gui/skins2/macosx/macosx_popup.hpp
modules/gui/skins2/macosx/macosx_timer.hpp
modules/gui/skins2/macosx/macosx_tooltip.hpp
modules/gui/skins2/macosx/macosx_window.hpp
modules/gui/skins2/parser/builder.hpp
modules/gui/skins2/parser/expr_evaluator.hpp
modules/gui/skins2/parser/interpreter.hpp
modules/gui/skins2/parser/skin_parser.hpp
modules/gui/skins2/parser/xmlparser.hpp
modules/gui/skins2/src/anchor.hpp
modules/gui/skins2/src/anim_bitmap.hpp
modules/gui/skins2/src/bitmap_font.hpp
modules/gui/skins2/src/dialogs.hpp
modules/gui/skins2/src/file_bitmap.hpp
modules/gui/skins2/src/ft2_bitmap.hpp
modules/gui/skins2/src/ft2_font.hpp
modules/gui/skins2/src/generic_bitmap.hpp
modules/gui/skins2/src/generic_font.hpp
modules/gui/skins2/src/generic_layout.cpp
modules/gui/skins2/src/generic_layout.hpp
modules/gui/skins2/src/generic_window.hpp
modules/gui/skins2/src/ini_file.hpp
modules/gui/skins2/src/logger.hpp
modules/gui/skins2/src/os_factory.hpp
modules/gui/skins2/src/os_graphics.hpp
modules/gui/skins2/src/os_loop.hpp
modules/gui/skins2/src/os_popup.hpp
modules/gui/skins2/src/os_timer.hpp
modules/gui/skins2/src/os_tooltip.hpp
modules/gui/skins2/src/os_window.hpp
modules/gui/skins2/src/popup.hpp
modules/gui/skins2/src/scaled_bitmap.hpp
modules/gui/skins2/src/skin_common.hpp
modules/gui/skins2/src/theme.hpp
modules/gui/skins2/src/theme_loader.hpp
modules/gui/skins2/src/theme_repository.hpp
modules/gui/skins2/src/tooltip.hpp
modules/gui/skins2/src/top_window.hpp
modules/gui/skins2/src/var_manager.hpp
modules/gui/skins2/src/vlcproc.hpp
modules/gui/skins2/src/vout_manager.hpp
modules/gui/skins2/src/vout_window.hpp
modules/gui/skins2/src/window_manager.hpp
modules/gui/skins2/utils/bezier.hpp
modules/gui/skins2/utils/fsm.hpp
modules/gui/skins2/utils/observer.hpp
modules/gui/skins2/utils/pointer.hpp
modules/gui/skins2/utils/position.hpp
modules/gui/skins2/utils/ustring.hpp
modules/gui/skins2/utils/var_bool.hpp
modules/gui/skins2/utils/var_list.hpp
modules/gui/skins2/utils/var_percent.hpp
modules/gui/skins2/utils/var_text.hpp
modules/gui/skins2/utils/var_tree.hpp
modules/gui/skins2/utils/variable.hpp
modules/gui/skins2/vars/equalizer.hpp
modules/gui/skins2/vars/playtree.hpp
modules/gui/skins2/vars/time.hpp
modules/gui/skins2/vars/volume.hpp
modules/gui/skins2/win32/win32_dragdrop.hpp
modules/gui/skins2/win32/win32_factory.hpp
modules/gui/skins2/win32/win32_graphics.hpp
modules/gui/skins2/win32/win32_loop.hpp
modules/gui/skins2/win32/win32_popup.hpp
modules/gui/skins2/win32/win32_timer.hpp
modules/gui/skins2/win32/win32_tooltip.hpp
modules/gui/skins2/win32/win32_window.hpp
modules/gui/skins2/x11/x11_display.hpp
modules/gui/skins2/x11/x11_dragdrop.hpp
modules/gui/skins2/x11/x11_factory.hpp
modules/gui/skins2/x11/x11_graphics.hpp
modules/gui/skins2/x11/x11_loop.hpp
modules/gui/skins2/x11/x11_popup.hpp
modules/gui/skins2/x11/x11_timer.hpp
modules/gui/skins2/x11/x11_tooltip.hpp
modules/gui/skins2/x11/x11_window.hpp

index abd246ce0a7c7a414fc746a1ac1745ae0a14f6b2..626b21046f154b6f51031ff402fde2a7d2dddeef 100644 (file)
@@ -17,9 +17,9 @@
  * 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 this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
  *****************************************************************************/
 
 #ifndef ASYNC_QUEUE_HPP
@@ -36,38 +36,38 @@ class OSTimer;
 /// Asynchronous queue for commands
 class AsyncQueue: public SkinObject
 {
-    public:
-        /// Get the instance of AsyncQueue
-        /// Returns NULL if initialization failed.
-        static AsyncQueue *instance( intf_thread_t *pIntf );
+public:
+    /// Get the instance of AsyncQueue
+    /// Returns NULL if initialization failed.
+    static AsyncQueue *instance( intf_thread_t *pIntf );
 
-        /// Destroy the instance of AsyncQueue
-        static void destroy( intf_thread_t *pIntf );
+    /// Destroy the instance of AsyncQueue
+    static void destroy( intf_thread_t *pIntf );
 
-        /// Add a command in the queue, after having removed the commands
-        /// of the same type already in the queue if needed
-        void push( const CmdGenericPtr &rcCommand, bool removePrev = true );
+    /// Add a command in the queue, after having removed the commands
+    /// of the same type already in the queue if needed
+    void push( const CmdGenericPtr &rcCommand, bool removePrev = true );
 
-        /// Remove the commands of the given type
-        void remove( const string &rType , const CmdGenericPtr &rcCommand );
+    /// Remove the commands of the given type
+    void remove( const string &rType , const CmdGenericPtr &rcCommand );
 
-        /// Flush the queue and execute the commands
-        void flush();
+    /// Flush the queue and execute the commands
+    void flush();
 
-    private:
-        /// Command queue
-        list<CmdGenericPtr> m_cmdList;
-        /// Timer
-        OSTimer *m_pTimer;
-        /// Mutex
-        vlc_mutex_t m_lock;
+private:
+    /// Command queue
+    list<CmdGenericPtr> m_cmdList;
+    /// Timer
+    OSTimer *m_pTimer;
+    /// Mutex
+    vlc_mutex_t m_lock;
 
-        // Private because it is a singleton
-        AsyncQueue( intf_thread_t *pIntf );
-        virtual ~AsyncQueue();
+    // Private because it is a singleton
+    AsyncQueue( intf_thread_t *pIntf );
+    virtual ~AsyncQueue();
 
-        // Callback to flush the queue
-        DEFINE_CALLBACK( AsyncQueue, Flush );
+    // Callback to flush the queue
+    DEFINE_CALLBACK( AsyncQueue, Flush );
 };
 
 
index 51eb88d299195000de9a0f81189f2aef8f950620..768ba056cd2200993f55c8be79f195203f39df4f 100644 (file)
@@ -17,9 +17,9 @@
  * 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 this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
  *****************************************************************************/
 
 #ifndef CMD_ADD_ITEM_HPP
 /// "Add item" command
 class CmdAddItem: public CmdGeneric
 {
-    public:
-        CmdAddItem( intf_thread_t *pIntf, const string &rName, bool playNow ):
-            CmdGeneric( pIntf ), m_name( rName ), m_playNow( playNow ) {}
-        virtual ~CmdAddItem() {}
-
-        /// This method does the real job of the command
-        virtual void execute();
-
-        /// Return the type of the command
-        virtual string getType() const { return "add item"; }
-
-    private:
-        /// Name of the item to enqueue
-        string m_name;
-        /// Should we play the item immediately?
-        bool m_playNow;
+public:
+    CmdAddItem( intf_thread_t *pIntf, const string &rName, bool playNow )
+              : CmdGeneric( pIntf ), m_name( rName ), m_playNow( playNow ) { }
+    virtual ~CmdAddItem() { }
+    virtual void execute();
+    virtual string getType() const { return "add item"; }
+
+private:
+    /// Name of the item to enqueue
+    string m_name;
+    /// Should we play the item immediately?
+    bool m_playNow;
 };
 
 #endif
index f3fba5bd5d3aa04f8c56645a8fc9ed1f345c1529..e9c8ee72dedb807fc5ceca8c3c857f8b9fc679ee 100644 (file)
@@ -16,9 +16,9 @@
  * 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 this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
  *****************************************************************************/
 
 #ifndef CMD_AUDIO_HPP
 /// Command to enable/disable the equalizer
 class CmdSetEqualizer: public CmdGeneric
 {
-    public:
-        CmdSetEqualizer( intf_thread_t *pIntf, bool iEnable ):
-            CmdGeneric( pIntf ), m_enable( iEnable ) {}
-        virtual ~CmdSetEqualizer() {}
-
-        /// This method does the real job of the command
-        virtual void execute();
-
-        /// Return the type of the command
-        virtual string getType() const { return "set equalizer"; }
-
-    private:
-        /// Enable or disable the equalizer
-        bool m_enable;
+public:
+    CmdSetEqualizer( intf_thread_t *pIntf, bool iEnable )
+                   : CmdGeneric( pIntf ), m_enable( iEnable ) { }
+    virtual ~CmdSetEqualizer() { }
+    virtual void execute();
+    virtual string getType() const { return "set equalizer"; }
+
+private:
+    /// Enable or disable the equalizer
+    bool m_enable;
 };
 
 
index e832677ba9b522ab6f517efe645b559b4a2e4d96..e686a436d6a5855d86af373bddcd8a8067f3de49 100644 (file)
@@ -17,9 +17,9 @@
  * 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 this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
  *****************************************************************************/
 
 #ifndef CMD_CHANGE_SKIN_HPP
 /// "Change Skin" command
 class CmdChangeSkin: public CmdGeneric
 {
-    public:
-        CmdChangeSkin( intf_thread_t *pIntf, const string &rFile ):
-            CmdGeneric( pIntf ), m_file( rFile ) {}
-        virtual ~CmdChangeSkin() {}
-
-        /// This method does the real job of the command
-        virtual void execute();
-
-        /// Return the type of the command
-        virtual string getType() const { return "change skin"; }
-
-    private:
-        /// Skin file to load
-        string m_file;
+public:
+    CmdChangeSkin( intf_thread_t *pIntf, const string &rFile ):
+        CmdGeneric( pIntf ), m_file( rFile ) { }
+    virtual ~CmdChangeSkin() { }
+    virtual void execute();
+    virtual string getType() const { return "change skin"; }
+
+private:
+    /// Skin file to load
+    string m_file;
 };
 
 #endif
index f53995e8c1cad614a7984b4f54d3f577c8140b25..a20027ce433657d467c0c21346c9f2d7e1549d13 100644 (file)
  * 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 this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
  *****************************************************************************/
 
 #ifndef CMD_GENERIC_HPP
 #define CMD_GENERIC_HPP
 
+#include <string>
+
 #include "../src/skin_common.hpp"
 #include "../utils/pointer.hpp"
 
-#include <string>
-
 
 /// Macro to define the prototype of simple commands
-#define DEFINE_COMMAND( name, type ) \
-class Cmd##name: public CmdGeneric \
-{ \
-    public: \
-        Cmd##name( intf_thread_t *pIntf ): CmdGeneric( pIntf ) {} \
-        virtual ~Cmd##name() {} \
-        virtual void execute(); \
-        virtual string getType() const { return type; } \
-\
+#define DEFINE_COMMAND( name, type )                           \
+class Cmd##name: public CmdGeneric                             \
+{   public:                                                    \
+    Cmd##name( intf_thread_t *pIntf ): CmdGeneric( pIntf ) { } \
+    virtual ~Cmd##name() { }                                   \
+    virtual void execute();                                    \
+    virtual string getType() const { return type; }            \
 };
 
 
 /// Macro to define a "callback" command inside a class
-#define DEFINE_CALLBACK( parent, action ) \
-class Cmd##action: public CmdGeneric \
-{ \
-    public: \
-        Cmd##action( parent *pParent ): \
-            CmdGeneric( pParent->getIntf() ), m_pParent( pParent ) {} \
-        virtual ~Cmd##action() {} \
-        virtual void execute(); \
-        virtual string getType() const { return "Cmd" #parent #action; } \
-    private: \
-        parent *m_pParent; \
-\
-} m_cmd##action; \
+#define DEFINE_CALLBACK( parent, action )                            \
+class Cmd##action: public CmdGeneric                                 \
+{                                                                    \
+public:                                                              \
+    Cmd##action( parent *pParent ):                                  \
+        CmdGeneric( pParent->getIntf() ), m_pParent( pParent ) { }   \
+    virtual ~Cmd##action() { }                                       \
+    virtual void execute();                                          \
+    virtual string getType() const { return "Cmd" #parent #action; } \
+private:                                                             \
+    parent *m_pParent;                                               \
+} m_cmd##action;                                                     \
 friend class Cmd##action;
 
 
 /// Base class for skins commands
 class CmdGeneric: public SkinObject
 {
-    public:
-        virtual ~CmdGeneric() {}
+public:
+    virtual ~CmdGeneric() { }
 
-        /// This method does the real job of the command
-        virtual void execute() = 0;
+    /// This method does the real job of the command
+    virtual void execute() = 0;
 
-        /// Return the type of the command
-        virtual string getType() const { return ""; }
+    /// Return the type of the command
+    virtual string getType() const { return ""; }
 
-        /// During queue reductions, check if we really want to remove
-        /// this command.
-        virtual bool checkRemove( CmdGeneric * ) const { return true; }
+    /// During queue reductions, check if we really want to remove
+    /// this command.
+    virtual bool checkRemove( CmdGeneric * ) const { return true; }
 
-    protected:
-        CmdGeneric( intf_thread_t *pIntf ): SkinObject( pIntf ) {}
+protected:
+    CmdGeneric( intf_thread_t *pIntf ): SkinObject( pIntf ) { }
 };
 
 
index 367a250549f179e06fae7085918124536e087781..aacf3d0c2aa260ba7bb61edcb95f32b7fde9c54a 100644 (file)
@@ -17,9 +17,9 @@
  * 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 this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
  *****************************************************************************/
 
 #ifndef CMD_LAYOUT_HPP
@@ -33,20 +33,16 @@ class GenericLayout;
 /// "Change layout" command
 class CmdLayout: public CmdGeneric
 {
-    public:
-        CmdLayout( intf_thread_t *pIntf, TopWindow &rWindow,
-                   GenericLayout &rLayout );
-        virtual ~CmdLayout() {}
-
-        /// This method does the real job of the command
-        virtual void execute();
-
-        /// Return the type of the command
-        virtual string getType() const { return "change layout"; }
-
-    private:
-        TopWindow &m_rWindow;
-        GenericLayout &m_rLayout;
+public:
+    CmdLayout( intf_thread_t *pIntf, TopWindow &rWindow,
+               GenericLayout &rLayout );
+    virtual ~CmdLayout() { }
+    virtual void execute();
+    virtual string getType() const { return "change layout"; }
+
+private:
+    TopWindow &m_rWindow;
+    GenericLayout &m_rLayout;
 };
 
 #endif
index 14a72c372b209076e56edd2fc828c0bf84b4b1a4..429631244c94b7bd55095abc22c946fcbb6d94cd 100644 (file)
@@ -16,9 +16,9 @@
  * 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 this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
  *****************************************************************************/
 
 #ifndef CMD_MINIMIZE_HPP
@@ -36,48 +36,40 @@ DEFINE_COMMAND(Restore, "restore" )
 /// Command to maximize a window
 class CmdMaximize: public CmdGeneric
 {
-    public:
-        /// Maximize the given layout
-        CmdMaximize( intf_thread_t *pIntf, WindowManager &rWindowManager,
-                     TopWindow &rWindow );
-        virtual ~CmdMaximize() {}
-
-        /// This method does the real job of the command
-        virtual void execute();
-
-        /// Return the type of the command
-        virtual string getType() const { return "maximize"; }
-
-    private:
-        WindowManager &m_rWindowManager;
-        TopWindow &m_rWindow;
+public:
+    /// Maximize the given layout
+    CmdMaximize( intf_thread_t *pIntf, WindowManager &rWindowManager,
+                 TopWindow &rWindow );
+    virtual ~CmdMaximize() { }
+    virtual void execute();
+    virtual string getType() const { return "maximize"; }
+
+private:
+    WindowManager &m_rWindowManager;
+    TopWindow &m_rWindow;
 };
 
 
 /// Command to unmaximize a window
 class CmdUnmaximize: public CmdGeneric
 {
-    public:
-        /// Unmaximize the given layout
-        CmdUnmaximize( intf_thread_t *pIntf, WindowManager &rWindowManager,
-                     TopWindow &rWindow );
-        virtual ~CmdUnmaximize() {}
-
-        /// This method does the real job of the command
-        virtual void execute();
-
-        /// Return the type of the command
-        virtual string getType() const { return "unmaximize"; }
-
-    private:
-        WindowManager &m_rWindowManager;
-        TopWindow &m_rWindow;
+public:
+    /// Unmaximize the given layout
+    CmdUnmaximize( intf_thread_t *pIntf, WindowManager &rWindowManager,
+                 TopWindow &rWindow );
+    virtual ~CmdUnmaximize() { }
+    virtual void execute();
+    virtual string getType() const { return "unmaximize"; }
+
+private:
+    WindowManager &m_rWindowManager;
+    TopWindow &m_rWindow;
 };
 
 
-DEFINE_COMMAND(AddInTray, "add in tray" )
-DEFINE_COMMAND(RemoveFromTray, "remove from tray" )
-DEFINE_COMMAND(AddInTaskBar, "add in taskbar" )
-DEFINE_COMMAND(RemoveFromTaskBar, "remove from taskbar" )
+DEFINE_COMMAND( AddInTray,         "add in tray" )
+DEFINE_COMMAND( RemoveFromTray,    "remove from tray" )
+DEFINE_COMMAND( AddInTaskBar,      "add in taskbar" )
+DEFINE_COMMAND( RemoveFromTaskBar, "remove from taskbar" )
 
 #endif
index 54769dda3deaf253d6b3f7e42aaab4e724934b74..2ca6a9ce3574cbd5bb00cb62f8f178dfd5831a1b 100644 (file)
@@ -16,9 +16,9 @@
  * 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 this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
  *****************************************************************************/
 
 #ifndef CMD_MUXER_HPP
 /// This command only contains other commands (composite pattern)
 class CmdMuxer: public CmdGeneric
 {
-    public:
-        CmdMuxer( intf_thread_t *pIntf, const list<CmdGeneric*> &rList ):
-            CmdGeneric( pIntf ), m_list( rList ) {}
-        virtual ~CmdMuxer() {}
-
-        /// This method does the real job of the command
-        virtual void execute();
-
-        /// Return the type of the command
-        virtual string getType() const { return "muxer"; }
-
-    private:
-        /// List of commands we will execute sequentially
-        list<CmdGeneric*> m_list;
+public:
+    CmdMuxer( intf_thread_t *pIntf, const list<CmdGeneric*> &rList ):
+        CmdGeneric( pIntf ), m_list( rList ) { }
+    virtual ~CmdMuxer() { }
+    virtual void execute();
+    virtual string getType() const { return "muxer"; }
+
+private:
+    /// List of commands we will execute sequentially
+    list<CmdGeneric*> m_list;
 };
 
 #endif
index 4ea393ff5a90c08f9d62d422f5017c4d8d74a206..915f8ddbf4c42498d0994c544c1540588790f76c 100644 (file)
@@ -17,9 +17,9 @@
  * 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 this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
  *****************************************************************************/
 
 #ifndef CMD_PLAYLIST_HPP
 /// Command to delete the selected items from a list
 class CmdPlaylistDel: public CmdGeneric
 {
-    public:
-        CmdPlaylistDel( intf_thread_t *pIntf, VarList &rList ):
-            CmdGeneric( pIntf ), m_rList( rList ) {}
-        virtual ~CmdPlaylistDel() {}
-
-        /// This method does the real job of the command
-        virtual void execute();
-
-        /// Return the type of the command
-        virtual string getType() const { return "playlist del"; }
-
-    private:
-        /// List
-        VarList &m_rList;
+public:
+    CmdPlaylistDel( intf_thread_t *pIntf, VarList &rList )
+                  : CmdGeneric( pIntf ), m_rList( rList ) { }
+    virtual ~CmdPlaylistDel() { }
+    virtual void execute();
+    virtual string getType() const { return "playlist del"; }
+
+private:
+    /// List
+    VarList &m_rList;
 };
 
 
@@ -65,100 +61,80 @@ DEFINE_COMMAND( PlaylistFirst, "playlist first" )
 /// Command to set the random state
 class CmdPlaylistRandom: public CmdGeneric
 {
-    public:
-        CmdPlaylistRandom( intf_thread_t *pIntf, bool value ):
-            CmdGeneric( pIntf ), m_value( value ) {}
-        virtual ~CmdPlaylistRandom() {}
-
-        /// This method does the real job of the command
-        virtual void execute();
-
-        /// Return the type of the command
-        virtual string getType() const { return "playlist random"; }
-
-    private:
-        /// Random state
-        bool m_value;
+public:
+    CmdPlaylistRandom( intf_thread_t *pIntf, bool value )
+                     : CmdGeneric( pIntf ), m_value( value ) { }
+    virtual ~CmdPlaylistRandom() { }
+    virtual void execute();
+    virtual string getType() const { return "playlist random"; }
+
+private:
+    /// Random state
+    bool m_value;
 };
 
 
 /// Command to set the loop state
 class CmdPlaylistLoop: public CmdGeneric
 {
-    public:
-        CmdPlaylistLoop( intf_thread_t *pIntf, bool value ):
-            CmdGeneric( pIntf ), m_value( value ) {}
-        virtual ~CmdPlaylistLoop() {}
-
-        /// This method does the real job of the command
-        virtual void execute();
-
-        /// Return the type of the command
-        virtual string getType() const { return "playlist loop"; }
-
-    private:
-        /// Loop state
-        bool m_value;
+public:
+    CmdPlaylistLoop( intf_thread_t *pIntf, bool value )
+                   : CmdGeneric( pIntf ), m_value( value ) { }
+    virtual ~CmdPlaylistLoop() { }
+    virtual void execute();
+    virtual string getType() const { return "playlist loop"; }
+
+private:
+    /// Loop state
+    bool m_value;
 };
 
 
 /// Command to set the repeat state
 class CmdPlaylistRepeat: public CmdGeneric
 {
-    public:
-        CmdPlaylistRepeat( intf_thread_t *pIntf, bool value ):
-            CmdGeneric( pIntf ), m_value( value ) {}
-        virtual ~CmdPlaylistRepeat() {}
-
-        /// This method does the real job of the command
-        virtual void execute();
-
-        /// Return the type of the command
-        virtual string getType() const { return "playlist repeat"; }
-
-    private:
-        /// Repeat state
-        bool m_value;
+public:
+    CmdPlaylistRepeat( intf_thread_t *pIntf, bool value )
+                     : CmdGeneric( pIntf ), m_value( value ) { }
+    virtual ~CmdPlaylistRepeat() { }
+    virtual void execute();
+    virtual string getType() const { return "playlist repeat"; }
+
+private:
+    /// Repeat state
+    bool m_value;
 };
 
 
 /// Command to load a playlist
 class CmdPlaylistLoad: public CmdGeneric
 {
-    public:
-        CmdPlaylistLoad( intf_thread_t *pIntf, const string& rFile ):
-            CmdGeneric( pIntf ), m_file( rFile ) {}
-        virtual ~CmdPlaylistLoad() {}
-
-        /// This method does the real job of the command
-        virtual void execute();
-
-        /// Return the type of the command
-        virtual string getType() const { return "playlist load"; }
-
-    private:
-        /// Playlist file to load
-        string m_file;
+public:
+    CmdPlaylistLoad( intf_thread_t *pIntf, const string& rFile )
+                   : CmdGeneric( pIntf ), m_file( rFile ) { }
+    virtual ~CmdPlaylistLoad() { }
+    virtual void execute();
+    virtual string getType() const { return "playlist load"; }
+
+private:
+    /// Playlist file to load
+    string m_file;
 };
 
 
 /// Command to save a playlist
 class CmdPlaylistSave: public CmdGeneric
 {
-    public:
-        CmdPlaylistSave( intf_thread_t *pIntf, const string& rFile ):
-            CmdGeneric( pIntf ), m_file( rFile ) {}
-        virtual ~CmdPlaylistSave() {}
-
-        /// This method does the real job of the command
-        virtual void execute();
-
-        /// Return the type of the command
-        virtual string getType() const { return "playlist save"; }
-
-    private:
-        /// Playlist file to save
-        string m_file;
+public:
+    CmdPlaylistSave( intf_thread_t *pIntf, const string& rFile )
+                   : CmdGeneric( pIntf ), m_file( rFile ) { }
+    virtual ~CmdPlaylistSave() { }
+    virtual void execute();
+    virtual string getType() const { return "playlist save"; }
+
+private:
+    /// Playlist file to save
+    string m_file;
 };
 
 
index 3309174295f7c6e413a0d98ffea8f485e94bceb1..97d6fa1e329f6a25426fe174ca8096823ff4ad25 100644 (file)
@@ -17,9 +17,9 @@
  * 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 this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
  *****************************************************************************/
 
 #ifndef CMD_PLAYTREE_HPP
 /// Command to delete the selected items from a tree
 class CmdPlaytreeDel: public CmdGeneric
 {
-    public:
-        CmdPlaytreeDel( intf_thread_t *pIntf, VarTree &rTree ):
-            CmdGeneric( pIntf ), m_rTree( rTree ) {}
-        virtual ~CmdPlaytreeDel() {}
-
-        /// This method does the real job of the command
-        virtual void execute();
-
-        /// Return the type of the command
-        virtual string getType() const { return "playtree del"; }
-
-    private:
-        /// Tree
-        VarTree &m_rTree;
+public:
+    CmdPlaytreeDel( intf_thread_t *pIntf, VarTree &rTree )
+                  : CmdGeneric( pIntf ), m_rTree( rTree ) { }
+    virtual ~CmdPlaytreeDel() { }
+    virtual void execute();
+    virtual string getType() const { return "playtree del"; }
+
+private:
+    /// Tree
+    VarTree &m_rTree;
 };
 
 /// Command to sort the playtree
index c7bdb483bd494a9c740387c3ac9c0aefd88d7164..23afb4f03d6730a373f14ae77db01f550ebe8e76 100644 (file)
@@ -17,9 +17,9 @@
  * 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 this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
  *****************************************************************************/
 
 #ifndef CMD_RESIZE_HPP
@@ -36,83 +36,67 @@ class CtrlVideo;
 /// Command to resize a layout
 class CmdResize: public CmdGeneric
 {
-    public:
-        /// Resize the given layout
-        CmdResize( intf_thread_t *pIntf, const WindowManager &rWindowManager,
-                   GenericLayout &rLayout, int width, int height );
-        virtual ~CmdResize() {}
-
-        /// This method does the real job of the command
-        virtual void execute();
-
-        /// Return the type of the command
-        virtual string getType() const { return "resize"; }
-
-    private:
-        const WindowManager &m_rWindowManager;
-        GenericLayout &m_rLayout;
-        int m_width, m_height;
+public:
+    /// Resize the given layout
+    CmdResize( intf_thread_t *pIntf, const WindowManager &rWindowManager,
+               GenericLayout &rLayout, int width, int height );
+    virtual ~CmdResize() { }
+    virtual void execute();
+    virtual string getType() const { return "resize"; }
+
+private:
+    const WindowManager &m_rWindowManager;
+    GenericLayout &m_rLayout;
+    int m_width, m_height;
 };
 
 
 /// Command to resize the inner vout window
 class CmdResizeInnerVout: public CmdGeneric
 {
-    public:
-        /// Resize the given layout
-        CmdResizeInnerVout( intf_thread_t *pIntf, CtrlVideo* pCtrlVideo );
-        virtual ~CmdResizeInnerVout() {}
-
-        /// This method does the real job of the command
-        virtual void execute();
-
-        /// Return the type of the command
-        virtual string getType() const { return "resize inner vout"; }
-
-    private:
-        CtrlVideo* m_pCtrlVideo;
+public:
+    /// Resize the given layout
+    CmdResizeInnerVout( intf_thread_t *pIntf, CtrlVideo* pCtrlVideo );
+    virtual ~CmdResizeInnerVout() { }
+    virtual void execute();
+    virtual string getType() const { return "resize inner vout"; }
+
+private:
+    CtrlVideo* m_pCtrlVideo;
 };
 
 
 /// Command to resize the vout window
 class CmdResizeVout: public CmdGeneric
 {
-    public:
-        /// Resize the given layout
-        CmdResizeVout( intf_thread_t *pIntf, vout_window_t* pWnd,
-                       int width, int height );
-        virtual ~CmdResizeVout() {}
-
-        /// This method does the real job of the command
-        virtual void execute();
-
-        /// Return the type of the command
-        virtual string getType() const { return "resize vout"; }
-
-    private:
-        vout_window_t* m_pWnd;
-        int m_width, m_height;
+public:
+    /// Resize the given layout
+    CmdResizeVout( intf_thread_t *pIntf, vout_window_t* pWnd,
+                   int width, int height );
+    virtual ~CmdResizeVout() { }
+    virtual void execute();
+    virtual string getType() const { return "resize vout"; }
+
+private:
+    vout_window_t* m_pWnd;
+    int m_width, m_height;
 };
 
 
 /// Command to toggle Fullscreen
 class CmdSetFullscreen: public CmdGeneric
 {
-    public:
-        /// Resize the given layout
-        CmdSetFullscreen( intf_thread_t *pIntf, vout_window_t* pWnd,
-                          bool fullscreen );
-        virtual ~CmdSetFullscreen() {}
-
-        /// This method does the real job of the command
-        virtual void execute();
-
-        /// Return the type of the command
-        virtual string getType() const { return "toogle fullscreen"; }
-
-    private:
-        vout_window_t* m_pWnd;
-        bool m_bFullscreen;
+public:
+    /// Resize the given layout
+    CmdSetFullscreen( intf_thread_t *pIntf, vout_window_t* pWnd,
+                      bool fullscreen );
+    virtual ~CmdSetFullscreen() { }
+    virtual void execute();
+    virtual string getType() const { return "toogle fullscreen"; }
+
+private:
+    vout_window_t* m_pWnd;
+    bool m_bFullscreen;
 };
 
 #endif
index 18edc42e17a3e50c76cf86869d2b349da2fa5325..6617e010d479edec6c0802d4b5493e8e8df2ee98 100644 (file)
@@ -17,9 +17,9 @@
  * 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 this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
  *****************************************************************************/
 
 #ifndef CMD_SHOW_WINDOW_HPP
 /// Command to show a window
 class CmdShowWindow: public CmdGeneric
 {
-    public:
-        CmdShowWindow( intf_thread_t *pIntf, WindowManager &rWinManager,
-                       TopWindow &rWin ):
-            CmdGeneric( pIntf ), m_rWinManager( rWinManager ), m_rWin( rWin ) {}
-        virtual ~CmdShowWindow() {}
-
-        /// This method does the real job of the command
-        virtual void execute() { m_rWinManager.show( m_rWin ); }
-
-        /// Return the type of the command
-        virtual string getType() const { return "show window"; }
-
-    private:
-        /// Reference to the window manager
-        WindowManager &m_rWinManager;
-        /// Reference to the window
-        TopWindow &m_rWin;
+public:
+    CmdShowWindow( intf_thread_t *pIntf, WindowManager &rWinManager,
+                   TopWindow &rWin ):
+        CmdGeneric( pIntf ), m_rWinManager( rWinManager ), m_rWin( rWin ) { }
+    virtual ~CmdShowWindow() { }
+    virtual void execute() { m_rWinManager.show( m_rWin ); }
+    virtual string getType() const { return "show window"; }
+
+private:
+    /// Reference to the window manager
+    WindowManager &m_rWinManager;
+    /// Reference to the window
+    TopWindow &m_rWin;
 };
 
 
 /// Command to hide a window
 class CmdHideWindow: public CmdGeneric
 {
-    public:
-        CmdHideWindow( intf_thread_t *pIntf, WindowManager &rWinManager,
-                       TopWindow &rWin ):
-            CmdGeneric( pIntf ), m_rWinManager( rWinManager ), m_rWin( rWin ) {}
-        virtual ~CmdHideWindow() {}
-
-        /// This method does the real job of the command
-        virtual void execute() { m_rWinManager.hide( m_rWin ); }
-
-        /// Return the type of the command
-        virtual string getType() const { return "hide window"; }
-
-    private:
-        /// Reference to the window manager
-        WindowManager &m_rWinManager;
-        /// Reference to the window
-        TopWindow &m_rWin;
+public:
+    CmdHideWindow( intf_thread_t *pIntf, WindowManager &rWinManager,
+                   TopWindow &rWin ):
+        CmdGeneric( pIntf ), m_rWinManager( rWinManager ), m_rWin( rWin ) { }
+    virtual ~CmdHideWindow() { }
+    virtual void execute() { m_rWinManager.hide( m_rWin ); }
+    virtual string getType() const { return "hide window"; }
+
+private:
+    /// Reference to the window manager
+    WindowManager &m_rWinManager;
+    /// Reference to the window
+    TopWindow &m_rWin;
 };
 
 
 /// Command to raise all windows
 class CmdRaiseAll: public CmdGeneric
 {
-    public:
-        CmdRaiseAll( intf_thread_t *pIntf, WindowManager &rWinManager ):
-            CmdGeneric( pIntf ), m_rWinManager( rWinManager ) {}
-        virtual ~CmdRaiseAll() {}
-
-        /// This method does the real job of the command
-        virtual void execute() { m_rWinManager.raiseAll(); }
-
-        /// Return the type of the command
-        virtual string getType() const { return "raise all windows"; }
-
-    private:
-        /// Reference to the window manager
-        WindowManager &m_rWinManager;
+public:
+    CmdRaiseAll( intf_thread_t *pIntf, WindowManager &rWinManager ):
+        CmdGeneric( pIntf ), m_rWinManager( rWinManager ) { }
+    virtual ~CmdRaiseAll() { }
+    virtual void execute() { m_rWinManager.raiseAll(); }
+    virtual string getType() const { return "raise all windows"; }
+
+private:
+    /// Reference to the window manager
+    WindowManager &m_rWinManager;
 };
 
 
 /// Command to show a popup menu
 class CmdShowPopup: public CmdGeneric
 {
-    public:
-        CmdShowPopup( intf_thread_t *pIntf, Popup &rPopup ):
-            CmdGeneric( pIntf ), m_rPopup( rPopup ) {}
-        virtual ~CmdShowPopup() {}
-
-        /// This method does the real job of the command
-        virtual void execute()
-        {
-            int x, y;
-            OSFactory::instance( getIntf() )->getMousePos( x, y );
-            m_rPopup.show( x, y );
-        }
-
-        /// Return the type of the command
-        virtual string getType() const { return "show popup"; }
-
-    private:
-        /// Reference to the popup
-        Popup &m_rPopup;
+public:
+    CmdShowPopup( intf_thread_t *pIntf, Popup &rPopup ):
+        CmdGeneric( pIntf ), m_rPopup( rPopup ) { }
+    virtual ~CmdShowPopup() { }
+
+    virtual void execute()
+    {
+        int x, y;
+        OSFactory::instance( getIntf() )->getMousePos( x, y );
+        m_rPopup.show( x, y );
+    }
+
+    virtual string getType() const { return "show popup"; }
+
+private:
+    /// Reference to the popup
+    Popup &m_rPopup;
 };
 
 
index 80c25c1f1ac564aac7cec64efdf8dbd2ba129b67..d3acb78f5f8c9fdec6aa8d826b5c69f5cc4eb320 100644 (file)
@@ -17,9 +17,9 @@
  * 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 this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
  *****************************************************************************/
 
 #ifndef CMD_UPDATE_ITEM_HPP
 /// Udate item command
 class CmdUpdateItem: public CmdGeneric
 {
-    public:
-        CmdUpdateItem( intf_thread_t *pIntf, VarText &rStreamName, VarText &rStreamURI ) :
-            CmdGeneric( pIntf ), m_rStreamName(rStreamName), m_rStreamURI(rStreamURI) {}
-        virtual ~CmdUpdateItem() {}
+public:
+    CmdUpdateItem( intf_thread_t *I,VarText &N,VarText &U )
+                 : CmdGeneric(I), m_rStreamName(N), m_rStreamURI(U) { }
+    virtual ~CmdUpdateItem() { }
+    virtual void execute();
+    virtual string getType() const { return "update item"; }
 
-        /// This method does the real job of the command
-        virtual void execute();
-
-        /// Return the type of the command
-        virtual string getType() const { return "update item"; }
-
-    private:
-        VarText &m_rStreamName;
-        VarText &m_rStreamURI;
+private:
+    VarText &m_rStreamName;
+    VarText &m_rStreamURI;
 };
 #endif
index 608ee4e659a657e077fcc7b906e07d2269505f99..1733fb155d7a4b83d01e13010eb5f3d0998b429c 100644 (file)
@@ -16,9 +16,9 @@
  * 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 this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
  *****************************************************************************/
 
 #ifndef CMD_VARS_HPP
@@ -40,130 +40,101 @@ DEFINE_COMMAND( PlaytreeChanged, "playtree changed" )
 /// Command to notify the playtree of an item update
 class CmdPlaytreeUpdate: public CmdGeneric
 {
-    public:
-        CmdPlaytreeUpdate( intf_thread_t *pIntf, int id ):
-            CmdGeneric( pIntf ), m_id( id ) {}
-        virtual ~CmdPlaytreeUpdate() {}
-
-        /// This method does the real job of the command
-        virtual void execute();
-
-        /// Return the type of the command
-        virtual string getType() const { return "playtree update"; }
-
-        /// Only accept removal of command if they concern the same item
-        virtual bool checkRemove( CmdGeneric * ) const;
-
-    private:
-        /// Playlist item ID
-        int m_id;
+public:
+    CmdPlaytreeUpdate( intf_thread_t *pIntf, int id ):
+        CmdGeneric( pIntf ), m_id( id ) { }
+    virtual ~CmdPlaytreeUpdate() { }
+    virtual void execute();
+    virtual string getType() const { return "playtree update"; }
+
+    /// Only accept removal of command if they concern the same item
+    virtual bool checkRemove( CmdGeneric * ) const;
+
+private:
+    /// Playlist item ID
+    int m_id;
 };
 
 /// Command to notify the playtree of an item append
 class CmdPlaytreeAppend: public CmdGeneric
 {
-    public:
-        CmdPlaytreeAppend( intf_thread_t *pIntf, playlist_add_t *p_add ) :
-            CmdGeneric( pIntf ), m_pAdd( p_add ) {}
-        virtual ~CmdPlaytreeAppend() {}
-
-        /// This method does the real job of the command
-        virtual void execute();
-
-        /// Return the type of the command
-        virtual string getType() const { return "playtree append"; }
-
-    private:
-        playlist_add_t * m_pAdd;
+public:
+    CmdPlaytreeAppend( intf_thread_t *pIntf, playlist_add_t *p_add ):
+        CmdGeneric( pIntf ), m_pAdd( p_add ) { }
+    virtual ~CmdPlaytreeAppend() { }
+    virtual void execute();
+    virtual string getType() const { return "playtree append"; }
+
+private:
+    playlist_add_t * m_pAdd;
 };
 
 /// Command to notify the playtree of an item deletion
 class CmdPlaytreeDelete: public CmdGeneric
 {
-    public:
-        CmdPlaytreeDelete( intf_thread_t *pIntf, int i_id ) :
-            CmdGeneric( pIntf ), m_id( i_id ) {}
-        virtual ~CmdPlaytreeDelete() {}
-
-        /// This method does the real job of the command
-        virtual void execute();
-
-        /// Return the type of the command
-        virtual string getType() const { return "playtree append"; }
-
-    private:
-        int m_id;
+public:
+    CmdPlaytreeDelete( intf_thread_t *pIntf, int i_id ):
+        CmdGeneric( pIntf ), m_id( i_id ) { }
+    virtual ~CmdPlaytreeDelete() { }
+    virtual void execute();
+    virtual string getType() const { return "playtree append"; }
+
+private:
+    int m_id;
 };
 
 
-
-
 /// Command to set a text variable
 class CmdSetText: public CmdGeneric
 {
-    public:
-        CmdSetText( intf_thread_t *pIntf, VarText &rText,
-                    const UString &rValue ):
-            CmdGeneric( pIntf ), m_rText( rText ), m_value( rValue ) {}
-        virtual ~CmdSetText() {}
-
-        /// This method does the real job of the command
-        virtual void execute();
-
-        /// Return the type of the command
-        virtual string getType() const { return "set text"; }
-
-    private:
-        /// Text variable to set
-        VarText &m_rText;
-        /// Value to set
-        const UString m_value;
+public:
+    CmdSetText( intf_thread_t *pIntf, VarText &rText, const UString &rValue ):
+        CmdGeneric( pIntf ), m_rText( rText ), m_value( rValue ) { }
+    virtual ~CmdSetText() { }
+    virtual void execute();
+    virtual string getType() const { return "set text"; }
+
+private:
+    /// Text variable to set
+    VarText &m_rText;
+    /// Value to set
+    const UString m_value;
 };
 
 
 /// Command to set the equalizer preamp
 class CmdSetEqPreamp: public CmdGeneric
 {
-    public:
-        CmdSetEqPreamp( intf_thread_t *pIntf, EqualizerPreamp &rPreamp,
-                       float value ):
-            CmdGeneric( pIntf ), m_rPreamp( rPreamp ), m_value( value ) {}
-        virtual ~CmdSetEqPreamp() {}
-
-        /// This method does the real job of the command
-        virtual void execute();
-
-        /// Return the type of the command
-        virtual string getType() const { return "set equalizer preamp"; }
-
-    private:
-        /// Preamp variable to set
-        EqualizerPreamp &m_rPreamp;
-        /// Value to set
-        float m_value;
+public:
+    CmdSetEqPreamp( intf_thread_t *I, EqualizerPreamp &P, float v )
+                  : CmdGeneric( I ), m_rPreamp( P ), m_value( v ) { }
+    virtual ~CmdSetEqPreamp() { }
+    virtual void execute();
+    virtual string getType() const { return "set equalizer preamp"; }
+
+private:
+    /// Preamp variable to set
+    EqualizerPreamp &m_rPreamp;
+    /// Value to set
+    float m_value;
 };
 
 
 /// Command to set the equalizerbands
 class CmdSetEqBands: public CmdGeneric
 {
-    public:
-        CmdSetEqBands( intf_thread_t *pIntf, EqualizerBands &rEqBands,
-                       const string &rValue ):
-            CmdGeneric( pIntf ), m_rEqBands( rEqBands ), m_value( rValue ) {}
-        virtual ~CmdSetEqBands() {}
-
-        /// This method does the real job of the command
-        virtual void execute();
-
-        /// Return the type of the command
-        virtual string getType() const { return "set equalizer bands"; }
-
-    private:
-        /// Equalizer variable to set
-        EqualizerBands &m_rEqBands;
-        /// Value to set
-        const string m_value;
+public:
+    CmdSetEqBands( intf_thread_t *I, EqualizerBands &B, const string &V )
+                 : CmdGeneric( I ), m_rEqBands( B ), m_value( V ) { }
+    virtual ~CmdSetEqBands() { }
+    virtual void execute();
+    virtual string getType() const { return "set equalizer bands"; }
+
+private:
+    /// Equalizer variable to set
+    EqualizerBands &m_rEqBands;
+    /// Value to set
+    const string m_value;
 };
 
 
index 8aaed346a9a348833cc8c1594e37c56973487c7f..25aaad8c53c6feda6f1ba904ee7a87e741431f44 100644 (file)
@@ -16,9 +16,9 @@
  * 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 this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
  *****************************************************************************/
 
 #ifndef CMD_VOUTWINDOW_HPP
 /// Command to create a vout window
 class CmdNewVoutWindow: public CmdGeneric
 {
-    public:
-        /// Create a vout window
-        CmdNewVoutWindow( intf_thread_t *pIntf, vout_window_t *pWnd );
-        virtual ~CmdNewVoutWindow() {}
-
-        /// This method does the real job of the command
-        virtual void execute();
-
-        /// Return the type of the command
-        virtual string getType() const { return "new vout window"; }
-
-    private:
-        vout_window_t* m_pWnd;
+public:
+    /// Create a vout window
+    CmdNewVoutWindow( intf_thread_t *pIntf, vout_window_t *pWnd );
+    virtual ~CmdNewVoutWindow() { }
+    virtual void execute();
+    virtual string getType() const { return "new vout window"; }
+
+private:
+    vout_window_t* m_pWnd;
 };
 
 
 /// Command to release a vout window
 class CmdReleaseVoutWindow: public CmdGeneric
 {
-    public:
-        /// Release a vout window
-        CmdReleaseVoutWindow( intf_thread_t *pIntf, vout_window_t *pWnd );
-        virtual ~CmdReleaseVoutWindow() {}
-
-        /// This method does the real job of the command
-        virtual void execute();
-
-        /// Return the type of the command
-        virtual string getType() const { return "new vout window"; }
-
-    private:
-        vout_window_t* m_pWnd;
+public:
+    /// Release a vout window
+    CmdReleaseVoutWindow( intf_thread_t *pIntf, vout_window_t *pWnd );
+    virtual ~CmdReleaseVoutWindow() { }
+    virtual void execute();
+    virtual string getType() const { return "new vout window"; }
+
+private:
+    vout_window_t* m_pWnd;
 };
 
 #endif
index 5d11290ebda151af03d9828df049ec284897239a..0b259bea232f7e8950e2047ed010e001905a4ad0 100644 (file)
@@ -17,9 +17,9 @@
  * 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 this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
  *****************************************************************************/
 
 #ifndef CTRL_BUTTON_HPP
@@ -36,59 +36,58 @@ class CmdGeneric;
 /// Base class for button controls
 class CtrlButton: public CtrlGeneric, public Observer<AnimBitmap>
 {
-    public:
-        /// Create a button with 3 images
-        CtrlButton( intf_thread_t *pIntf, const GenericBitmap &rBmpUp,
-                    const GenericBitmap &rBmpOver,
-                    const GenericBitmap &rBmpDown,
-                    CmdGeneric &rCommand, const UString &rTooltip,
-                    const UString &rHelp, VarBool *pVisible );
-
-        virtual ~CtrlButton();
-
-        /// Handle an event
-        virtual void handleEvent( EvtGeneric &rEvent );
-
-        /// Check whether coordinates are inside the control
-        virtual bool mouseOver( int x, int y ) const;
-
-        /// Draw the control on the given graphics
-        virtual void draw( OSGraphics &rImage, int xDest, int yDest );
-
-        /// Get the text of the tooltip
-        virtual UString getTooltipText() const { return m_tooltip; }
-
-        /// Get the type of control (custom RTTI)
-        virtual string getType() const { return "button"; }
-
-    private:
-        /// Finite state machine of the control
-        FSM m_fsm;
-        /// Command triggered by the button
-        CmdGeneric &m_rCommand;
-        /// Tooltip text
-        const UString m_tooltip;
-        /// Images of the button in the different states
-        AnimBitmap m_imgUp, m_imgOver, m_imgDown;
-        /// Current image
-        AnimBitmap *m_pImg;
-
-        /// Callback objects
-        DEFINE_CALLBACK( CtrlButton, UpOverDownOver )
-        DEFINE_CALLBACK( CtrlButton, DownOverUpOver )
-        DEFINE_CALLBACK( CtrlButton, DownOverDown )
-        DEFINE_CALLBACK( CtrlButton, DownDownOver )
-        DEFINE_CALLBACK( CtrlButton, UpOverUp )
-        DEFINE_CALLBACK( CtrlButton, UpUpOver )
-        DEFINE_CALLBACK( CtrlButton, DownUp )
-        DEFINE_CALLBACK( CtrlButton, UpHidden )
-        DEFINE_CALLBACK( CtrlButton, HiddenUp )
-
-        /// Change the current image
-        void setImage( AnimBitmap *pImg );
-
-        /// Method called when an animated bitmap changes
-        virtual void onUpdate( Subject<AnimBitmap> &rBitmap, void* );
+public:
+    /// Create a button with 3 images
+    CtrlButton( intf_thread_t *pIntf, const GenericBitmap &rBmpUp,
+                const GenericBitmap &rBmpOver, const GenericBitmap &rBmpDown,
+                CmdGeneric &rCommand, const UString &rTooltip,
+                const UString &rHelp, VarBool *pVisible );
+
+    virtual ~CtrlButton();
+
+    /// Handle an event
+    virtual void handleEvent( EvtGeneric &rEvent );
+
+    /// Check whether coordinates are inside the control
+    virtual bool mouseOver( int x, int y ) const;
+
+    /// Draw the control on the given graphics
+    virtual void draw( OSGraphics &rImage, int xDest, int yDest );
+
+    /// Get the text of the tooltip
+    virtual UString getTooltipText() const { return m_tooltip; }
+
+    /// Get the type of control (custom RTTI)
+    virtual string getType() const { return "button"; }
+
+private:
+    /// Finite state machine of the control
+    FSM m_fsm;
+    /// Command triggered by the button
+    CmdGeneric &m_rCommand;
+    /// Tooltip text
+    const UString m_tooltip;
+    /// Images of the button in the different states
+    AnimBitmap m_imgUp, m_imgOver, m_imgDown;
+    /// Current image
+    AnimBitmap *m_pImg;
+
+    /// Callback objects
+    DEFINE_CALLBACK( CtrlButton, UpOverDownOver )
+    DEFINE_CALLBACK( CtrlButton, DownOverUpOver )
+    DEFINE_CALLBACK( CtrlButton, DownOverDown )
+    DEFINE_CALLBACK( CtrlButton, DownDownOver )
+    DEFINE_CALLBACK( CtrlButton, UpOverUp )
+    DEFINE_CALLBACK( CtrlButton, UpUpOver )
+    DEFINE_CALLBACK( CtrlButton, DownUp )
+    DEFINE_CALLBACK( CtrlButton, UpHidden )
+    DEFINE_CALLBACK( CtrlButton, HiddenUp )
+
+    /// Change the current image
+    void setImage( AnimBitmap *pImg );
+
+    /// Method called when an animated bitmap changes
+    virtual void onUpdate( Subject<AnimBitmap> &rBitmap, void* );
 };
 
 
index dfa4c16458b7ee653399ec30d00b0b0504cd726a..7342bf0ae0e9b9ae8ad4ecb72ff36c19873ba75b 100644 (file)
@@ -17,9 +17,9 @@
  * 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 this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
  *****************************************************************************/
 
 #ifndef CTRL_CHECKBOX_HPP
@@ -38,84 +38,84 @@ class CmdGeneric;
 /// Base class for checkbox controls
 class CtrlCheckbox: public CtrlGeneric, public Observer<AnimBitmap>
 {
-    public:
-        /// Create a checkbox with 6 images
-        CtrlCheckbox( intf_thread_t *pIntf,
-                      const GenericBitmap &rBmpUp1,
-                      const GenericBitmap &rBmpOver1,
-                      const GenericBitmap &rBmpDown1,
-                      const GenericBitmap &rBmpUp2,
-                      const GenericBitmap &rBmpOver2,
-                      const GenericBitmap &rBmpDown2,
-                      CmdGeneric &rCommand1, CmdGeneric &rCommand2,
-                      const UString &rTooltip1, const UString &rTooltip2,
-                      VarBool &rVariable, const UString &rHelp,
-                      VarBool *pVisible);
-
-        virtual ~CtrlCheckbox();
-
-        /// Handle an event
-        virtual void handleEvent( EvtGeneric &rEvent );
-
-        /// Check whether coordinates are inside the control
-        virtual bool mouseOver( int x, int y ) const;
-
-        /// Draw the control on the given graphics
-        virtual void draw( OSGraphics &rImage, int xDest, int yDest );
-
-        /// Get the text of the tooltip XXX
-        virtual UString getTooltipText() const { return *m_pTooltip; }
-
-        /// Get the type of control (custom RTTI)
-        virtual string getType() const { return "checkbox"; }
-
-    private:
-        /// Finite state machine of the control
-        FSM m_fsm;
-        /// Observed variable
-        VarBool &m_rVariable;
-        /// Commands for the 2 states
-        CmdGeneric &m_rCommand1, &m_rCommand2;
-        /// Current command
-        CmdGeneric *m_pCommand;
-        /// Tooltip texts for the 2 states
-        const UString m_tooltip1, m_tooltip2;
-        /// Current tooltip
-        const UString *m_pTooltip;
-         /// Images of the checkbox in the different states
-        AnimBitmap m_imgUp1, m_imgOver1, m_imgDown1;
-        AnimBitmap m_imgUp2, m_imgOver2, m_imgDown2;
-        /// Current set of images (pointing to 1 or 2)
-        /// In fact, we consider here that a checkbox acts like 2 buttons, in a
-        /// symetric way; this is a small trick to avoid multiplicating the
-        /// callbacks (and it could be extended easily to support 3 buttons or
-        /// more...)
-        AnimBitmap *m_pImgUp, *m_pImgOver, *m_pImgDown;
-        /// Current image
-        AnimBitmap *m_pImgCurrent;
-
-        /// Callback objects
-        DEFINE_CALLBACK( CtrlCheckbox, UpOverDownOver )
-        DEFINE_CALLBACK( CtrlCheckbox, DownOverUpOver )
-        DEFINE_CALLBACK( CtrlCheckbox, DownOverDown )
-        DEFINE_CALLBACK( CtrlCheckbox, DownDownOver )
-        DEFINE_CALLBACK( CtrlCheckbox, UpOverUp )
-        DEFINE_CALLBACK( CtrlCheckbox, UpUpOver )
-        DEFINE_CALLBACK( CtrlCheckbox, DownUp )
-        DEFINE_CALLBACK( CtrlCheckbox, UpHidden )
-        DEFINE_CALLBACK( CtrlCheckbox, HiddenUp )
-
-        /// Method called when the observed variable is modified
-        virtual void onVarBoolUpdate( VarBool &rVariable );
-
-        /// Method called when an animated bitmap changes
-        virtual void onUpdate( Subject<AnimBitmap> &rBitmap, void* );
-
-        /// Change the current image
-        void setImage( AnimBitmap *pImg );
-
-        /// Helper function to update the current state of images
-        void changeButton();
+public:
+    /// Create a checkbox with 6 images
+    CtrlCheckbox( intf_thread_t *pIntf,
+                  const GenericBitmap &rBmpUp1,
+                  const GenericBitmap &rBmpOver1,
+                  const GenericBitmap &rBmpDown1,
+                  const GenericBitmap &rBmpUp2,
+                  const GenericBitmap &rBmpOver2,
+                  const GenericBitmap &rBmpDown2,
+                  CmdGeneric &rCommand1, CmdGeneric &rCommand2,
+                  const UString &rTooltip1, const UString &rTooltip2,
+                  VarBool &rVariable, const UString &rHelp,
+                  VarBool *pVisible);
+
+    virtual ~CtrlCheckbox();
+
+    /// Handle an event
+    virtual void handleEvent( EvtGeneric &rEvent );
+
+    /// Check whether coordinates are inside the control
+    virtual bool mouseOver( int x, int y ) const;
+
+    /// Draw the control on the given graphics
+    virtual void draw( OSGraphics &rImage, int xDest, int yDest );
+
+    /// Get the text of the tooltip XXX
+    virtual UString getTooltipText() const { return *m_pTooltip; }
+
+    /// Get the type of control (custom RTTI)
+    virtual string getType() const { return "checkbox"; }
+
+private:
+    /// Finite state machine of the control
+    FSM m_fsm;
+    /// Observed variable
+    VarBool &m_rVariable;
+    /// Commands for the 2 states
+    CmdGeneric &m_rCommand1, &m_rCommand2;
+    /// Current command
+    CmdGeneric *m_pCommand;
+    /// Tooltip texts for the 2 states
+    const UString m_tooltip1, m_tooltip2;
+    /// Current tooltip
+    const UString *m_pTooltip;
+     /// Images of the checkbox in the different states
+    AnimBitmap m_imgUp1, m_imgOver1, m_imgDown1;
+    AnimBitmap m_imgUp2, m_imgOver2, m_imgDown2;
+    /// Current set of images (pointing to 1 or 2)
+    /// In fact, we consider here that a checkbox acts like 2 buttons, in a
+    /// symetric way; this is a small trick to avoid multiplicating the
+    /// callbacks (and it could be extended easily to support 3 buttons or
+    /// more...)
+    AnimBitmap *m_pImgUp, *m_pImgOver, *m_pImgDown;
+    /// Current image
+    AnimBitmap *m_pImgCurrent;
+
+    /// Callback objects
+    DEFINE_CALLBACK( CtrlCheckbox, UpOverDownOver )
+    DEFINE_CALLBACK( CtrlCheckbox, DownOverUpOver )
+    DEFINE_CALLBACK( CtrlCheckbox, DownOverDown )
+    DEFINE_CALLBACK( CtrlCheckbox, DownDownOver )
+    DEFINE_CALLBACK( CtrlCheckbox, UpOverUp )
+    DEFINE_CALLBACK( CtrlCheckbox, UpUpOver )
+    DEFINE_CALLBACK( CtrlCheckbox, DownUp )
+    DEFINE_CALLBACK( CtrlCheckbox, UpHidden )
+    DEFINE_CALLBACK( CtrlCheckbox, HiddenUp )
+
+    /// Method called when the observed variable is modified
+    virtual void onVarBoolUpdate( VarBool &rVariable );
+
+    /// Method called when an animated bitmap changes
+    virtual void onUpdate( Subject<AnimBitmap> &rBitmap, void* );
+
+    /// Change the current image
+    void setImage( AnimBitmap *pImg );
+
+    /// Helper function to update the current state of images
+    void changeButton();
 };
 
 
index 63ca237b7efe9081935eff62932b5bc4d9c8a71f..f21482d25f66f3825ce0b837deae6226ee687abc 100644 (file)
@@ -17,9 +17,9 @@
  * 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 this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
  *****************************************************************************/
 
 #ifndef CTRL_FLAT_HPP
 /// Base class for "mover controls" and images
 class CtrlFlat: public CtrlGeneric
 {
-    protected:
-        CtrlFlat( intf_thread_t *pIntf, const UString &rHelp,
-                  VarBool *pVisible ):
-            CtrlGeneric( pIntf, rHelp, pVisible ) {}
+protected:
+    CtrlFlat( intf_thread_t *pIntf, const UString &rHelp, VarBool *pVisible )
+            : CtrlGeneric( pIntf, rHelp, pVisible ) { }
 
-        virtual ~CtrlFlat() {}
+    virtual ~CtrlFlat() { }
 };
 
 #endif
index d0ed05da85ca8ef0f68bfd1e4ff842f530b63ca2..886c27b3d9c7146d2f6318392f211e1bc29ac4c7 100644 (file)
@@ -17,9 +17,9 @@
  * 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 this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
  *****************************************************************************/
 
 #ifndef CTRL_GENERIC_HPP
@@ -43,102 +43,102 @@ class VarBool;
 /// Base class for controls
 class CtrlGeneric: public SkinObject, public Observer<VarBool>
 {
-    public:
-        virtual ~CtrlGeneric();
+public:
+    virtual ~CtrlGeneric();
 
-        /// Handle an event on the control
-        virtual void handleEvent( EvtGeneric &rEvent ) {}
+    /// Handle an event on the control
+    virtual void handleEvent( EvtGeneric &rEvent ) { }
 
-        /// Check whether coordinates are inside the control
-        virtual bool mouseOver( int x, int y ) const { return false; }
+    /// Check whether coordinates are inside the control
+    virtual bool mouseOver( int x, int y ) const { return false; }
 
-        /// Draw the control on the given graphics
-        virtual void draw( OSGraphics &rImage, int xDest, int yDest ) {}
+    /// Draw the control on the given graphics
+    virtual void draw( OSGraphics &rImage, int xDest, int yDest ) { }
 
-        /// Set the position and the associated layout of the control
-        virtual void setLayout( GenericLayout *pLayout,
-                                const Position &rPosition );
+    /// Set the position and the associated layout of the control
+    virtual void setLayout( GenericLayout *pLayout,
+                            const Position &rPosition );
 
-        /// Get the position of the control in the layout, if any
-        virtual const Position *getPosition() const { return m_pPosition; }
+    /// Get the position of the control in the layout, if any
+    virtual const Position *getPosition() const { return m_pPosition; }
 
-        /// Get the text of the tooltip
-        virtual UString getTooltipText() const
-            { return UString( getIntf(), "" ); }
+    /// Get the text of the tooltip
+    virtual UString getTooltipText() const
+        { return UString( getIntf(), "" ); }
 
-        /**
-         * Overload this method if you want to do something special when
-         * the layout is resized
-         */
-        virtual void onResize() {}
+    /**
+     * Overload this method if you want to do something special when
+     * the layout is resized
+     */
+    virtual void onResize() { }
 
-        /// Get the help text
-        virtual const UString &getHelpText() const { return m_help; }
+    /// Get the help text
+    virtual const UString &getHelpText() const { return m_help; }
 
-        /// Return true if the control can gain the focus
-        virtual bool isFocusable() const { return false; }
+    /// 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;
+    /// Return true if the control is visible
+    virtual bool isVisible() const;
 
-        /// Get the type of control (custom RTTI)
-        virtual string getType() const { return ""; }
+    /// Get the type of control (custom RTTI)
+    virtual string getType() const { return ""; }
 
-    protected:
-        // If pVisible is NULL, the control is always visible
-        CtrlGeneric( intf_thread_t *pIntf, const UString &rHelp,
-                     VarBool *pVisible = NULL );
+protected:
+    // 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, with the size of the
-         * rectangle to repaint and its offset.
-         * Use the default values to repaint the whole window
-         */
-        virtual void notifyLayout( int witdh = -1, int height = -1,
-                                   int xOffSet = 0, int yOffSet = 0 ) const;
+    /**
+     * Tell the layout when the image has changed, with the size of the
+     * rectangle to repaint and its offset.
+     * Use the default values to repaint the whole window
+     */
+    virtual void notifyLayout( int witdh = -1, int height = -1,
+                               int xOffSet = 0, int yOffSet = 0 ) const;
 
-        /**
-         * Same as notifyLayout(), but takes optional images as parameters.
-         * The maximum size(s) of the images will be used for repainting.
-         */
-        void notifyLayoutMaxSize( const Box *pImg1 = NULL,
-                                  const Box *pImg2 = NULL );
+    /**
+     * Same as notifyLayout(), but takes optional images as parameters.
+     * The maximum size(s) of the images will be used for repainting.
+     */
+    void notifyLayoutMaxSize( const Box *pImg1 = NULL,
+                              const Box *pImg2 = NULL );
 
-        /// Ask the layout to capture the mouse
-        virtual void captureMouse() const;
+    /// Ask the layout to capture the mouse
+    virtual void captureMouse() const;
 
-        /// Ask the layout to release the mouse
-        virtual void releaseMouse() const;
+    /// Ask the layout to release the mouse
+    virtual void releaseMouse() const;
 
-        /// Notify the window the tooltip has changed
-        virtual void notifyTooltipChange() const;
+    /// Notify the window the tooltip has changed
+    virtual void notifyTooltipChange() const;
 
-        /// Get the associated window, if any
-        virtual TopWindow *getWindow() const;
+    /// Get the associated window, if any
+    virtual TopWindow *getWindow() const;
 
-        /**
-         * Overload this method if you want to do something special when
-         * the Position object is set
-         */
-        virtual void onPositionChange() {}
+    /**
+     * Overload this method if you want to do something special when
+     * the Position object is set
+     */
+    virtual void onPositionChange() { }
 
-        /// Overload this method to get notified of bool variable changes
-        virtual void onVarBoolUpdate( VarBool &rVar ) {}
+    /// Overload this method to get notified of bool variable changes
+    virtual void onVarBoolUpdate( VarBool &rVar ) { }
 
-        /// Method called when an observed bool variable is changed
-        virtual void onUpdate( Subject<VarBool> &rVariable , void* );
+    /// Method called when an observed bool variable is changed
+    virtual void onUpdate( Subject<VarBool> &rVariable , void* );
 
-        /// Associated layout
-        GenericLayout *m_pLayout;
+    /// Associated layout
+    GenericLayout *m_pLayout;
 
-        /// Visibility variable
-        VarBool *m_pVisible;
+    /// Visibility variable
+    VarBool *m_pVisible;
 
-    private:
-        /// Position in the layout
-        Position *m_pPosition;
-        /// Help text
-        UString m_help;
+private:
+    /// Position in the layout
+    Position *m_pPosition;
+    /// Help text
+    UString m_help;
 
 };
 
index 404795c57babfd2e7c9b034273b83ef3c1d302fe..ddcf1b3afe3a50f29abb3a385c0dd83fb022c638 100644 (file)
@@ -17,9 +17,9 @@
  * 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 this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
  *****************************************************************************/
 
 #ifndef CTRL_IMAGE_HPP
@@ -36,41 +36,41 @@ class CmdGeneric;
 /// Control image
 class CtrlImage: public CtrlFlat
 {
-    public:
-        /// Resize methods
-        enum resize_t
-        {
-            kMosaic,  // Repeat the base image in a mosaic
-            kScale    // Scale the base image
-        };
+public:
+    /// Resize methods
+    enum resize_t
+    {
+        kMosaic,  // Repeat the base image in a mosaic
+        kScale    // Scale the base image
+    };
 
-        // Create an image with the given bitmap (which is NOT copied)
-        CtrlImage( intf_thread_t *pIntf, const GenericBitmap &rBitmap,
-                   CmdGeneric &rCommand, resize_t resizeMethod,
-                   const UString &rHelp, VarBool *pVisible );
-        virtual ~CtrlImage();
+    // Create an image with the given bitmap (which is NOT copied)
+    CtrlImage( intf_thread_t *pIntf, const GenericBitmap &rBitmap,
+               CmdGeneric &rCommand, resize_t resizeMethod,
+               const UString &rHelp, VarBool *pVisible );
+    virtual ~CtrlImage();
 
-        /// Handle an event on the control
-        virtual void handleEvent( EvtGeneric &rEvent );
+    /// Handle an event on the control
+    virtual void handleEvent( EvtGeneric &rEvent );
 
-        /// Check whether coordinates are inside the control
-        virtual bool mouseOver( int x, int y ) const;
+    /// Check whether coordinates are inside the control
+    virtual bool mouseOver( int x, int y ) const;
 
-        /// Draw the control on the given graphics
-        virtual void draw( OSGraphics &rImage, int xDest, int yDest );
+    /// Draw the control on the given graphics
+    virtual void draw( OSGraphics &rImage, int xDest, int yDest );
 
-        /// Get the type of control (custom RTTI)
-        virtual string getType() const { return "image"; }
+    /// Get the type of control (custom RTTI)
+    virtual string getType() const { return "image"; }
 
-    private:
-        /// Bitmap
-        const GenericBitmap &m_rBitmap;
-        /// Buffer to stored the rendered bitmap
-        OSGraphics *m_pImage;
-        /// Command triggered by a double-click on the image
-        CmdGeneric &m_rCommand;
-        /// Resize method
-        resize_t m_resizeMethod;
+private:
+    /// Bitmap
+    const GenericBitmap &m_rBitmap;
+    /// Buffer to stored the rendered bitmap
+    OSGraphics *m_pImage;
+    /// Command triggered by a double-click on the image
+    CmdGeneric &m_rCommand;
+    /// Resize method
+    resize_t m_resizeMethod;
 };
 
 #endif
index b0c9363d711b1eff60f522c6e366ea10ed935ecd..5fd6f7a8db845588573488970e9b8d4b29479191 100644 (file)
@@ -17,9 +17,9 @@
  * 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 this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
  *****************************************************************************/
 
 #ifndef CTRL_LIST_HPP
@@ -38,69 +38,69 @@ class GenericBitmap;
 class CtrlList: public CtrlGeneric, public Observer<VarList>,
     public Observer<VarPercent>
 {
-    public:
-        CtrlList( intf_thread_t *pIntf, VarList &rList,
-                  const GenericFont &rFont, const GenericBitmap *pBitmap,
-                  uint32_t fgcolor, uint32_t playcolor, uint32_t bgcolor1,
-                  uint32_t bgcolor2, uint32_t selColor,
-                  const UString &rHelp, VarBool *pVisible );
-        virtual ~CtrlList();
-
-        /// Handle an event on the control.
-        virtual void handleEvent( EvtGeneric &rEvent );
-
-        /// Check whether coordinates are inside the control.
-        virtual bool mouseOver( int x, int y ) const;
-
-        /// Draw the control on the given graphics
-        virtual void draw( OSGraphics &rImage, int xDest, int yDest );
-
-        /// Called when the layout is resized
-        virtual void onResize();
-
-        /// Return true if the control can gain the focus
-        virtual bool isFocusable() const { return true; }
-
-        /// Get the type of control (custom RTTI)
-        virtual string getType() const { return "list"; }
-
-    private:
-        /// List associated to the control
-        VarList &m_rList;
-        /// Font
-        const GenericFont &m_rFont;
-        /// Background bitmap
-        /** If NULL, the 2 background colors defined below will be used */
-        const GenericBitmap *m_pBitmap;
-        /// Color of normal text
-        uint32_t m_fgColor;
-        /// Color of the playing item
-        uint32_t m_playColor;
-        /// Background colors, used when no background bitmap is given
-        uint32_t m_bgColor1, m_bgColor2;
-        /// Background of selected items
-        uint32_t m_selColor;
-        /// Pointer on the last selected item in the list
-        VarList::Elem_t *m_pLastSelected;
-        /// Image of the control
-        OSGraphics *m_pImage;
-        /// Last position
-        int m_lastPos;
-
-        /// Method called when the list variable is modified
-        virtual void onUpdate( Subject<VarList> &rList, void* );
-
-        /// Method called when the position variable of the list is modified
-        virtual void onUpdate( Subject<VarPercent> &rPercent, void*  );
-
-        /// Called when the position is set
-        virtual void onPositionChange();
-
-        /// Check if the list must be scrolled
-        void autoScroll();
-
-        /// Draw the image of the control
-        void makeImage();
+public:
+    CtrlList( intf_thread_t *pIntf, VarList &rList,
+              const GenericFont &rFont, const GenericBitmap *pBitmap,
+              uint32_t fgcolor, uint32_t playcolor, uint32_t bgcolor1,
+              uint32_t bgcolor2, uint32_t selColor,
+              const UString &rHelp, VarBool *pVisible );
+    virtual ~CtrlList();
+
+    /// Handle an event on the control.
+    virtual void handleEvent( EvtGeneric &rEvent );
+
+    /// Check whether coordinates are inside the control.
+    virtual bool mouseOver( int x, int y ) const;
+
+    /// Draw the control on the given graphics
+    virtual void draw( OSGraphics &rImage, int xDest, int yDest );
+
+    /// Called when the layout is resized
+    virtual void onResize();
+
+    /// Return true if the control can gain the focus
+    virtual bool isFocusable() const { return true; }
+
+    /// Get the type of control (custom RTTI)
+    virtual string getType() const { return "list"; }
+
+private:
+    /// List associated to the control
+    VarList &m_rList;
+    /// Font
+    const GenericFont &m_rFont;
+    /// Background bitmap
+    /** If NULL, the 2 background colors defined below will be used */
+    const GenericBitmap *m_pBitmap;
+    /// Color of normal text
+    uint32_t m_fgColor;
+    /// Color of the playing item
+    uint32_t m_playColor;
+    /// Background colors, used when no background bitmap is given
+    uint32_t m_bgColor1, m_bgColor2;
+    /// Background of selected items
+    uint32_t m_selColor;
+    /// Pointer on the last selected item in the list
+    VarList::Elem_t *m_pLastSelected;
+    /// Image of the control
+    OSGraphics *m_pImage;
+    /// Last position
+    int m_lastPos;
+
+    /// Method called when the list variable is modified
+    virtual void onUpdate( Subject<VarList> &rList, void* );
+
+    /// Method called when the position variable of the list is modified
+    virtual void onUpdate( Subject<VarPercent> &rPercent, void*  );
+
+    /// Called when the position is set
+    virtual void onPositionChange();
+
+    /// Check if the list must be scrolled
+    void autoScroll();
+
+    /// Draw the image of the control
+    void makeImage();
 };
 
 #endif
index 422decb4e2d4ec0f4f93e48da689583bcc22bfa6..5a4f958b1aa81a15bdab7222a5a7da8716c8e286 100644 (file)
@@ -17,9 +17,9 @@
  * 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 this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
  *****************************************************************************/
 
 #ifndef CTRL_MOVE_HPP
@@ -36,51 +36,51 @@ class WindowManager;
 /// Control for moving windows
 class CtrlMove: public CtrlFlat
 {
-    public:
-        CtrlMove( intf_thread_t *pIntf, WindowManager &rWindowManager,
-                  CtrlFlat &rCtrl, TopWindow &rWindow,
-                  const UString &rHelp, VarBool *pVisible );
-        virtual ~CtrlMove() {}
+public:
+    CtrlMove( intf_thread_t *pIntf, WindowManager &rWindowManager,
+              CtrlFlat &rCtrl, TopWindow &rWindow,
+              const UString &rHelp, VarBool *pVisible );
+    virtual ~CtrlMove() { }
 
-        /// Handle an event
-        virtual void handleEvent( EvtGeneric &rEvent );
+    /// Handle an event
+    virtual void handleEvent( EvtGeneric &rEvent );
 
-        /// Check whether coordinates are inside the decorated control
-        virtual bool mouseOver( int x, int y ) const;
+    /// Check whether coordinates are inside the decorated control
+    virtual bool mouseOver( int x, int y ) const;
 
-        /// Draw the control on the given graphics
-        virtual void draw( OSGraphics &rImage, int xDest, int yDest );
+    /// Draw the control on the given graphics
+    virtual void draw( OSGraphics &rImage, int xDest, int yDest );
 
-        /// Set the position and the associated layout of the decorated control
-        virtual void setLayout( GenericLayout *pLayout,
-                                const Position &rPosition );
+    /// Set the position and the associated layout of the decorated control
+    virtual void setLayout( GenericLayout *pLayout,
+                            const Position &rPosition );
 
-        /// Get the position of the decorated control in the layout, if any
-        virtual const Position *getPosition() const;
+    /// Get the position of the decorated control in the layout, if any
+    virtual const Position *getPosition() const;
 
-        /// Method called when the control is resized
-        virtual void onResize();
+    /// Method called when the control is resized
+    virtual void onResize();
 
-        /// Get the type of control (custom RTTI)
-        virtual string getType() const { return m_rCtrl.getType(); }
+    /// Get the type of control (custom RTTI)
+    virtual string getType() const { return m_rCtrl.getType(); }
 
-    private:
-        FSM m_fsm;
-        /// Window manager
-        WindowManager &m_rWindowManager;
-        /// Decorated CtrlFlat
-        CtrlFlat &m_rCtrl;
-        /// The window moved by this control
-        TopWindow &m_rWindow;
-        /// The last received event
-        EvtGeneric *m_pEvt;
-        /// Position of the click that started the move
-        int m_xPos, m_yPos;
+private:
+    FSM m_fsm;
+    /// Window manager
+    WindowManager &m_rWindowManager;
+    /// Decorated CtrlFlat
+    CtrlFlat &m_rCtrl;
+    /// The window moved by this control
+    TopWindow &m_rWindow;
+    /// The last received event
+    EvtGeneric *m_pEvt;
+    /// Position of the click that started the move
+    int m_xPos, m_yPos;
 
-        /// Callback objects
-        DEFINE_CALLBACK( CtrlMove, MovingMoving )
-        DEFINE_CALLBACK( CtrlMove, StillMoving )
-        DEFINE_CALLBACK( CtrlMove, MovingStill )
- };
+    /// Callback objects
+    DEFINE_CALLBACK( CtrlMove, MovingMoving )
+    DEFINE_CALLBACK( CtrlMove, StillMoving )
+    DEFINE_CALLBACK( CtrlMove, MovingStill )
+};
 
 #endif
index 0c61445a96024afadb0621288f33f10e8bba4709..a528c2cab5261db80a0d7c99779d9b0955918076 100644 (file)
@@ -17,9 +17,9 @@
  * 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 this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
  *****************************************************************************/
 
 #ifndef CTRL_RADIALSLIDER_HPP
@@ -38,60 +38,60 @@ class VarPercent;
 /// Radial slider
 class CtrlRadialSlider: public CtrlGeneric, public Observer<VarPercent>
 {
-    public:
-        /// Create a radial slider with the given image, which must be
-        /// 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,
-                          VarBool *pVisible );
-
-        virtual ~CtrlRadialSlider();
-
-        /// Handle an event
-        virtual void handleEvent( EvtGeneric &rEvent );
-
-        /// Check whether coordinates are inside the control
-        virtual bool mouseOver( int x, int y ) const;
-
-        /// Draw the control on the given graphics
-        virtual void draw( OSGraphics &rImage, int xDest, int yDest );
-
-        /// Get the type of control (custom RTTI)
-        virtual string getType() const { return "radial_slider"; }
-
-    private:
-        /// Finite state machine of the control
-        FSM m_fsm;
-        /// Number of sub-images in the slider image
-        int m_numImg;
-        /// Variable associated to the slider
-        VarPercent &m_rVariable;
-        /// Min and max angles of the button
-        float m_minAngle, m_maxAngle;
-        /// Position of the cursor
-        int m_position;
-        /// Size of an image
-        int m_width, m_height;
-        /// The last received event
-        EvtGeneric *m_pEvt;
-        /// Sequence of images
-        OSGraphics *m_pImgSeq;
-        /// Last saved position
-        int m_lastPos;
-
-        /// Callback objects
-        DEFINE_CALLBACK( CtrlRadialSlider, UpDown )
-        DEFINE_CALLBACK( CtrlRadialSlider, DownUp )
-        DEFINE_CALLBACK( CtrlRadialSlider, Move )
-
-        /// Method called when the observed variable is modified
-        virtual void onUpdate( Subject<VarPercent> &rVariable, void* );
-
-        /// Change the position of the cursor, with the given position of
-        /// the mouse (relative to the layout). Is blocking is true, the
-        /// the cursor cannot do more than a half turn
-        void setCursor( int posX, int posY, bool blocking );
+public:
+    /// Create a radial slider with the given image, which must be
+    /// 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,
+                      VarBool *pVisible );
+
+    virtual ~CtrlRadialSlider();
+
+    /// Handle an event
+    virtual void handleEvent( EvtGeneric &rEvent );
+
+    /// Check whether coordinates are inside the control
+    virtual bool mouseOver( int x, int y ) const;
+
+    /// Draw the control on the given graphics
+    virtual void draw( OSGraphics &rImage, int xDest, int yDest );
+
+    /// Get the type of control (custom RTTI)
+    virtual string getType() const { return "radial_slider"; }
+
+private:
+    /// Finite state machine of the control
+    FSM m_fsm;
+    /// Number of sub-images in the slider image
+    int m_numImg;
+    /// Variable associated to the slider
+    VarPercent &m_rVariable;
+    /// Min and max angles of the button
+    float m_minAngle, m_maxAngle;
+    /// Position of the cursor
+    int m_position;
+    /// Size of an image
+    int m_width, m_height;
+    /// The last received event
+    EvtGeneric *m_pEvt;
+    /// Sequence of images
+    OSGraphics *m_pImgSeq;
+    /// Last saved position
+    int m_lastPos;
+
+    /// Callback objects
+    DEFINE_CALLBACK( CtrlRadialSlider, UpDown )
+    DEFINE_CALLBACK( CtrlRadialSlider, DownUp )
+    DEFINE_CALLBACK( CtrlRadialSlider, Move )
+
+    /// Method called when the observed variable is modified
+    virtual void onUpdate( Subject<VarPercent> &rVariable, void* );
+
+    /// Change the position of the cursor, with the given position of
+    /// the mouse (relative to the layout). Is blocking is true, the
+    /// the cursor cannot do more than a half turn
+    void setCursor( int posX, int posY, bool blocking );
 };
 
 
index 01857c78b278d4419b396a97f305aaaecd9748fa..f540773f3144ab3b75ba676bbd92da6a427fc555 100644 (file)
@@ -17,9 +17,9 @@
  * 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 this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
  *****************************************************************************/
 
 #ifndef CTRL_RESIZE_HPP
@@ -36,63 +36,63 @@ class WindowManager;
 /// Control decorator for resizing windows
 class CtrlResize: public CtrlFlat
 {
-    public:
-        CtrlResize( intf_thread_t *pIntf, WindowManager &rWindowManager,
-                    CtrlFlat &rCtrl, GenericLayout &rLayout,
-                    const UString &rHelp, VarBool *pVisible,
-                    WindowManager::Direction_t direction );
-        virtual ~CtrlResize() {}
-
-        /// Handle an event
-        virtual void handleEvent( EvtGeneric &rEvent );
-
-        /// Check whether coordinates are inside the decorated control
-        virtual bool mouseOver( int x, int y ) const;
-
-        /// Draw the control on the given graphics
-        virtual void draw( OSGraphics &rImage, int xDest, int yDest );
-
-        /// Set the position and the associated layout of the decorated control
-        virtual void setLayout( GenericLayout *pLayout,
-                                const Position &rPosition );
-
-        /// Get the position of the decorated control in the layout, if any
-        virtual const Position *getPosition() const;
-
-        /// Method called when the control is resized
-        virtual void onResize();
-
-        /// Get the type of control (custom RTTI)
-        virtual string getType() const { return m_rCtrl.getType(); }
-
-    private:
-        FSM m_fsm;
-        /// Window manager
-        WindowManager &m_rWindowManager;
-        /// Decorated CtrlFlat
-        CtrlFlat &m_rCtrl;
-        /// The layout resized by this control
-        GenericLayout &m_rLayout;
-        /// The last received event
-        EvtGeneric *m_pEvt;
-        /// Position of the click that started the resizing
-        int m_xPos, m_yPos;
-        /// Direction of the resizing
-        WindowManager::Direction_t m_direction;
-
-        /// Change the cursor, based on the given direction
-        void changeCursor( WindowManager::Direction_t direction ) const;
-
-        /// Callback objects
-        DEFINE_CALLBACK( CtrlResize, OutStill )
-        DEFINE_CALLBACK( CtrlResize, StillOut )
-        DEFINE_CALLBACK( CtrlResize, StillStill )
-        DEFINE_CALLBACK( CtrlResize, StillResize )
-        DEFINE_CALLBACK( CtrlResize, ResizeStill )
-        DEFINE_CALLBACK( CtrlResize, ResizeResize )
-
-        // Size of the layout, before resizing
-        int m_width, m_height;
+public:
+    CtrlResize( intf_thread_t *pIntf, WindowManager &rWindowManager,
+                CtrlFlat &rCtrl, GenericLayout &rLayout,
+                const UString &rHelp, VarBool *pVisible,
+                WindowManager::Direction_t direction );
+    virtual ~CtrlResize() { }
+
+    /// Handle an event
+    virtual void handleEvent( EvtGeneric &rEvent );
+
+    /// Check whether coordinates are inside the decorated control
+    virtual bool mouseOver( int x, int y ) const;
+
+    /// Draw the control on the given graphics
+    virtual void draw( OSGraphics &rImage, int xDest, int yDest );
+
+    /// Set the position and the associated layout of the decorated control
+    virtual void setLayout( GenericLayout *pLayout,
+                            const Position &rPosition );
+
+    /// Get the position of the decorated control in the layout, if any
+    virtual const Position *getPosition() const;
+
+    /// Method called when the control is resized
+    virtual void onResize();
+
+    /// Get the type of control (custom RTTI)
+    virtual string getType() const { return m_rCtrl.getType(); }
+
+private:
+    FSM m_fsm;
+    /// Window manager
+    WindowManager &m_rWindowManager;
+    /// Decorated CtrlFlat
+    CtrlFlat &m_rCtrl;
+    /// The layout resized by this control
+    GenericLayout &m_rLayout;
+    /// The last received event
+    EvtGeneric *m_pEvt;
+    /// Position of the click that started the resizing
+    int m_xPos, m_yPos;
+    /// Direction of the resizing
+    WindowManager::Direction_t m_direction;
+
+    /// Change the cursor, based on the given direction
+    void changeCursor( WindowManager::Direction_t direction ) const;
+
+    /// Callback objects
+    DEFINE_CALLBACK( CtrlResize, OutStill )
+    DEFINE_CALLBACK( CtrlResize, StillOut )
+    DEFINE_CALLBACK( CtrlResize, StillStill )
+    DEFINE_CALLBACK( CtrlResize, StillResize )
+    DEFINE_CALLBACK( CtrlResize, ResizeStill )
+    DEFINE_CALLBACK( CtrlResize, ResizeResize )
+
+    // Size of the layout, before resizing
+    int m_width, m_height;
 };
 
 #endif
index bfa7c58e152f664c5ad7c461fbed62456723d6c6..ac31b9944fb3a225b1b80f5df34827be1587788b 100644 (file)
@@ -17,9 +17,9 @@
  * 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 this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
  *****************************************************************************/
 
 #ifndef CTRL_SLIDER_HPP
@@ -39,131 +39,131 @@ class VarPercent;
 /// Cursor of a slider
 class CtrlSliderCursor: public CtrlGeneric, public Observer<VarPercent>
 {
-    public:
-        /// Create a cursor with 3 images (which are NOT copied, be careful)
-        /// If pVisible is NULL, the control is always visible
-        CtrlSliderCursor( intf_thread_t *pIntf, const GenericBitmap &rBmpUp,
-                          const GenericBitmap &rBmpOver,
-                          const GenericBitmap &rBmpDown,
-                          const Bezier &rCurve, VarPercent &rVariable,
-                          VarBool *pVisible, const UString &rTooltip,
-                          const UString &rHelp );
-
-        virtual ~CtrlSliderCursor();
-
-        /// Handle an event
-        virtual void handleEvent( EvtGeneric &rEvent );
-
-        /// Check whether coordinates are inside the control
-        virtual bool mouseOver( int x, int y ) const;
-
-        /// Draw the control on the given graphics
-        virtual void draw( OSGraphics &rImage, int xDest, int yDest );
-
-        /// Get the text of the tooltip
-        virtual UString getTooltipText() const { return m_tooltip; }
-
-        /// Get the type of control (custom RTTI)
-        virtual string getType() const { return "slider_cursor"; }
-
-    private:
-        /// Finite state machine of the control
-        FSM m_fsm;
-        /// Variable associated to the cursor
-        VarPercent &m_rVariable;
-        /// Tooltip text
-        const UString m_tooltip;
-        /// Initial size of the control
-        int m_width, m_height;
-        /// Position of the cursor
-        int m_xPosition, m_yPosition;
-        /// Callback objects
-        DEFINE_CALLBACK( CtrlSliderCursor, OverDown )
-        DEFINE_CALLBACK( CtrlSliderCursor, DownOver )
-        DEFINE_CALLBACK( CtrlSliderCursor, OverUp )
-        DEFINE_CALLBACK( CtrlSliderCursor, UpOver )
-        DEFINE_CALLBACK( CtrlSliderCursor, Move )
-        DEFINE_CALLBACK( CtrlSliderCursor, Scroll )
-        /// Last saved position of the cursor (stored as a percentage)
-        float m_lastPercentage;
-        /// Offset between the mouse pointer and the center of the cursor
-        int m_xOffset, m_yOffset;
-        /// The last received event
-        EvtGeneric *m_pEvt;
-        /// Images of the cursor in the differents states
-        OSGraphics *m_pImgUp, *m_pImgOver, *m_pImgDown;
-        /// Current image
-        OSGraphics *m_pImg;
-        /// Bezier curve of the slider
-        const Bezier &m_rCurve;
-
-        /// Method called when the position variable is modified
-        virtual void onUpdate( Subject<VarPercent> &rVariable, void * );
-
-        /// Method to compute the resize factors
-        void getResizeFactors( float &rFactorX, float &rFactorY ) const;
-
-        /// Call notifyLayout
-        void refreshLayout();
+public:
+    /// Create a cursor with 3 images (which are NOT copied, be careful)
+    /// If pVisible is NULL, the control is always visible
+    CtrlSliderCursor( intf_thread_t *pIntf, const GenericBitmap &rBmpUp,
+                      const GenericBitmap &rBmpOver,
+                      const GenericBitmap &rBmpDown,
+                      const Bezier &rCurve, VarPercent &rVariable,
+                      VarBool *pVisible, const UString &rTooltip,
+                      const UString &rHelp );
+
+    virtual ~CtrlSliderCursor();
+
+    /// Handle an event
+    virtual void handleEvent( EvtGeneric &rEvent );
+
+    /// Check whether coordinates are inside the control
+    virtual bool mouseOver( int x, int y ) const;
+
+    /// Draw the control on the given graphics
+    virtual void draw( OSGraphics &rImage, int xDest, int yDest );
+
+    /// Get the text of the tooltip
+    virtual UString getTooltipText() const { return m_tooltip; }
+
+    /// Get the type of control (custom RTTI)
+    virtual string getType() const { return "slider_cursor"; }
+
+private:
+    /// Finite state machine of the control
+    FSM m_fsm;
+    /// Variable associated to the cursor
+    VarPercent &m_rVariable;
+    /// Tooltip text
+    const UString m_tooltip;
+    /// Initial size of the control
+    int m_width, m_height;
+    /// Position of the cursor
+    int m_xPosition, m_yPosition;
+    /// Callback objects
+    DEFINE_CALLBACK( CtrlSliderCursor, OverDown )
+    DEFINE_CALLBACK( CtrlSliderCursor, DownOver )
+    DEFINE_CALLBACK( CtrlSliderCursor, OverUp )
+    DEFINE_CALLBACK( CtrlSliderCursor, UpOver )
+    DEFINE_CALLBACK( CtrlSliderCursor, Move )
+    DEFINE_CALLBACK( CtrlSliderCursor, Scroll )
+    /// Last saved position of the cursor (stored as a percentage)
+    float m_lastPercentage;
+    /// Offset between the mouse pointer and the center of the cursor
+    int m_xOffset, m_yOffset;
+    /// The last received event
+    EvtGeneric *m_pEvt;
+    /// Images of the cursor in the differents states
+    OSGraphics *m_pImgUp, *m_pImgOver, *m_pImgDown;
+    /// Current image
+    OSGraphics *m_pImg;
+    /// Bezier curve of the slider
+    const Bezier &m_rCurve;
+
+    /// Method called when the position variable is modified
+    virtual void onUpdate( Subject<VarPercent> &rVariable, void * );
+
+    /// Method to compute the resize factors
+    void getResizeFactors( float &rFactorX, float &rFactorY ) const;
+
+    /// Call notifyLayout
+    void refreshLayout();
 };
 
 
 /// Slider background
 class CtrlSliderBg: public CtrlGeneric, public Observer<VarPercent>
 {
-    public:
-        CtrlSliderBg( intf_thread_t *pIntf,
-                      const Bezier &rCurve, VarPercent &rVariable,
-                      int thickness, GenericBitmap *pBackground, int nbHoriz,
-                      int nbVert, int padHoriz, int padVert, VarBool *pVisible,
-                      const UString &rHelp );
-        virtual ~CtrlSliderBg();
-
-        /// Tell whether the mouse is over the control
-        virtual bool mouseOver( int x, int y ) const;
-
-        /// Draw the control on the given graphics
-        virtual void draw( OSGraphics &rImage, int xDest, int yDest );
-
-        /// Handle an event
-        virtual void handleEvent( EvtGeneric &rEvent );
-
-        /// Method called when the control is resized
-        virtual void onResize();
-
-        /// Get the type of control (custom RTTI)
-        virtual string getType() const { return "slider_bg"; }
-
-        /// Associate a cursor to this background
-        void associateCursor( CtrlSliderCursor &rCursor );
-
-    private:
-        /// Cursor of the slider
-        CtrlSliderCursor *m_pCursor;
-        /// Variable associated to the slider
-        VarPercent &m_rVariable;
-        /// Thickness of the curve
-        int m_thickness;
-        /// Bezier curve of the slider
-        const Bezier &m_rCurve;
-        /// Initial size of the control
-        int m_width, m_height;
-        /// Background image sequence (optional)
-        GenericBitmap *m_pImgSeq;
-        /// Number of images in the background bitmap
-        int m_nbHoriz, m_nbVert;
-        /// Number of pixels between two images
-        int m_padHoriz, m_padVert;
-        /// Size of a background image
-        int m_bgWidth, m_bgHeight;
-        /// Index of the current background image
-        int m_position;
-
-        /// Method called when the observed variable is modified
-        virtual void onUpdate( Subject<VarPercent> &rVariable, void* );
-
-        /// Method to compute the resize factors
-        void getResizeFactors( float &rFactorX, float &rFactorY ) const;
+public:
+    CtrlSliderBg( intf_thread_t *pIntf,
+                  const Bezier &rCurve, VarPercent &rVariable,
+                  int thickness, GenericBitmap *pBackground, int nbHoriz,
+                  int nbVert, int padHoriz, int padVert, VarBool *pVisible,
+                  const UString &rHelp );
+    virtual ~CtrlSliderBg();
+
+    /// Tell whether the mouse is over the control
+    virtual bool mouseOver( int x, int y ) const;
+
+    /// Draw the control on the given graphics
+    virtual void draw( OSGraphics &rImage, int xDest, int yDest );
+
+    /// Handle an event
+    virtual void handleEvent( EvtGeneric &rEvent );
+
+    /// Method called when the control is resized
+    virtual void onResize();
+
+    /// Get the type of control (custom RTTI)
+    virtual string getType() const { return "slider_bg"; }
+
+    /// Associate a cursor to this background
+    void associateCursor( CtrlSliderCursor &rCursor );
+
+private:
+    /// Cursor of the slider
+    CtrlSliderCursor *m_pCursor;
+    /// Variable associated to the slider
+    VarPercent &m_rVariable;
+    /// Thickness of the curve
+    int m_thickness;
+    /// Bezier curve of the slider
+    const Bezier &m_rCurve;
+    /// Initial size of the control
+    int m_width, m_height;
+    /// Background image sequence (optional)
+    GenericBitmap *m_pImgSeq;
+    /// Number of images in the background bitmap
+    int m_nbHoriz, m_nbVert;
+    /// Number of pixels between two images
+    int m_padHoriz, m_padVert;
+    /// Size of a background image
+    int m_bgWidth, m_bgHeight;
+    /// Index of the current background image
+    int m_position;
+
+    /// Method called when the observed variable is modified
+    virtual void onUpdate( Subject<VarPercent> &rVariable, void* );
+
+    /// Method to compute the resize factors
+    void getResizeFactors( float &rFactorX, float &rFactorY ) const;
 };
 
 
index 30695f4e25e281438249028a8f6655718b42db91..ecebd37a0d6699312676fe8a6cbcfe3c1c57e107 100644 (file)
@@ -17,9 +17,9 @@
  * 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 this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
  *****************************************************************************/
 
 #ifndef CTRL_TEXT_HPP
@@ -40,100 +40,100 @@ class VarText;
 /// Class for control text
 class CtrlText: public CtrlGeneric, public Observer<VarText>
 {
-    public:
-        enum Align_t
-        {
-            kLeft,
-            kCenter,
-            kRight
-        };
-
-        enum Scrolling_t
-        {
-            // The text starts scrolling automatically if it is larger than the
-            // width of the control. The user can still stop it or make it
-            // scroll manually with the mouse.
-            kAutomatic,
-            // Only manual scrolling is allowed (with the mouse)
-            kManual,
-            // No scrolling of the text is allowed
-            kNone
-        };
-
-        /// 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, VarBool *pVisible, Scrolling_t scrollMode,
-                  Align_t alignment);
-        virtual ~CtrlText();
-
-        /// Handle an event
-        virtual void handleEvent( EvtGeneric &rEvent );
-
-        /// Check whether coordinates are inside the control
-        virtual bool mouseOver( int x, int y ) const;
-
-        /// Draw the control on the given graphics
-        virtual void draw( OSGraphics &rImage, int xDest, int yDest );
-
-        /// Set the text of the control, with an optional color
-        /// This takes effect immediatly
-        void setText( const UString &rText, uint32_t color = 0xFFFFFFFF );
-
-        /// Get the type of control (custom RTTI)
-        virtual string getType() const { return "text"; }
-
-    private:
-        /// Finite state machine of the control
-        FSM m_fsm;
-        /// Variable associated to the control
-        VarText &m_rVariable;
-        /// Callback objects
-        DEFINE_CALLBACK( CtrlText, ToManual )
-        DEFINE_CALLBACK( CtrlText, ManualMoving )
-        DEFINE_CALLBACK( CtrlText, ManualStill )
-        DEFINE_CALLBACK( CtrlText, Move )
-        /// The last received event
-        EvtGeneric *m_pEvt;
-        /// Font used to render the text
-        const GenericFont &m_rFont;
-        /// Color of the text
-        uint32_t m_color;
-        /// Scrolling mode
-        Scrolling_t m_scrollMode;
-        /// Type of alignment
-        Align_t m_alignment;
-        /// Image of the text
-        GenericBitmap *m_pImg;
-        /// Image of the text, repeated twice and with some blank between;
-        /// useful to display a 'circular' moving text...
-        GenericBitmap *m_pImgDouble;
-        /// Current image (should always be equal to m_pImg or m_pImgDouble)
-        GenericBitmap *m_pCurrImg;
-        /// Position of the left side of the moving text (always <= 0)
-        int m_xPos;
-        /// Offset between the mouse pointer and the left side of the
-        /// moving text
-        int m_xOffset;
-         /// Timer to move the text
-        OSTimer *m_pTimer;
-
-        /// Callback for the timer
-        DEFINE_CALLBACK( CtrlText, UpdateText );
-
-        /// Method called when the observed variable is modified
-        virtual void onUpdate( Subject<VarText> &rVariable, void* );
-
-        /// Display the text on the control
-        void displayText( const UString &rText );
-
-        /// Helper function to set the position in the correct interval
-        void adjust( int &position );
-
-        /// Update the behaviour of the text whenever the control size changes
-        virtual void onPositionChange();
-        /// Update the behaviour of the text whenever the control size changes
-        virtual void onResize();
+public:
+    enum Align_t
+    {
+        kLeft,
+        kCenter,
+        kRight
+    };
+
+    enum Scrolling_t
+    {
+        // The text starts scrolling automatically if it is larger than the
+        // width of the control. The user can still stop it or make it
+        // scroll manually with the mouse.
+        kAutomatic,
+        // Only manual scrolling is allowed (with the mouse)
+        kManual,
+        // No scrolling of the text is allowed
+        kNone
+    };
+
+    /// 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, VarBool *pVisible, Scrolling_t scrollMode,
+              Align_t alignment);
+    virtual ~CtrlText();
+
+    /// Handle an event
+    virtual void handleEvent( EvtGeneric &rEvent );
+
+    /// Check whether coordinates are inside the control
+    virtual bool mouseOver( int x, int y ) const;
+
+    /// Draw the control on the given graphics
+    virtual void draw( OSGraphics &rImage, int xDest, int yDest );
+
+    /// Set the text of the control, with an optional color
+    /// This takes effect immediatly
+    void setText( const UString &rText, uint32_t color = 0xFFFFFFFF );
+
+    /// Get the type of control (custom RTTI)
+    virtual string getType() const { return "text"; }
+
+private:
+    /// Finite state machine of the control
+    FSM m_fsm;
+    /// Variable associated to the control
+    VarText &m_rVariable;
+    /// Callback objects
+    DEFINE_CALLBACK( CtrlText, ToManual )
+    DEFINE_CALLBACK( CtrlText, ManualMoving )
+    DEFINE_CALLBACK( CtrlText, ManualStill )
+    DEFINE_CALLBACK( CtrlText, Move )
+    /// The last received event
+    EvtGeneric *m_pEvt;
+    /// Font used to render the text
+    const GenericFont &m_rFont;
+    /// Color of the text
+    uint32_t m_color;
+    /// Scrolling mode
+    Scrolling_t m_scrollMode;
+    /// Type of alignment
+    Align_t m_alignment;
+    /// Image of the text
+    GenericBitmap *m_pImg;
+    /// Image of the text, repeated twice and with some blank between;
+    /// useful to display a 'circular' moving text...
+    GenericBitmap *m_pImgDouble;
+    /// Current image (should always be equal to m_pImg or m_pImgDouble)
+    GenericBitmap *m_pCurrImg;
+    /// Position of the left side of the moving text (always <= 0)
+    int m_xPos;
+    /// Offset between the mouse pointer and the left side of the
+    /// moving text
+    int m_xOffset;
+     /// Timer to move the text
+    OSTimer *m_pTimer;
+
+    /// Callback for the timer
+    DEFINE_CALLBACK( CtrlText, UpdateText );
+
+    /// Method called when the observed variable is modified
+    virtual void onUpdate( Subject<VarText> &rVariable, void* );
+
+    /// Display the text on the control
+    void displayText( const UString &rText );
+
+    /// Helper function to set the position in the correct interval
+    void adjust( int &position );
+
+    /// Update the behaviour of the text whenever the control size changes
+    virtual void onPositionChange();
+    /// Update the behaviour of the text whenever the control size changes
+    virtual void onResize();
 };
 
 
index 59d7d3e07aaf0c652dcf4d0b76240dcc4795edaa..76e43a2a827d698b94b643527b9a5b98afc405be 100644 (file)
@@ -17,9 +17,9 @@
  * 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 this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
  *****************************************************************************/
 
 #ifndef CTRL_TREE_HPP
@@ -37,119 +37,119 @@ class GenericBitmap;
 class CtrlTree: public CtrlGeneric, public Observer<VarTree, tree_update>,
     public Observer<VarPercent>
 {
-    public:
-        CtrlTree( intf_thread_t *pIntf,
-                  VarTree &rTree,
-                  const GenericFont &rFont,
-                  const GenericBitmap *pBgBitmap,
-                  const GenericBitmap *pItemBitmap,
-                  const GenericBitmap *pOpenBitmap,
-                  const GenericBitmap *pClosedBitmap,
-                  uint32_t fgColor,
-                  uint32_t playColor,
-                  uint32_t bgColor1,
-                  uint32_t bgColor2,
-                  uint32_t selColor,
-                  const UString &rHelp,
-                  VarBool *pVisible,
-                  VarBool *pFlat );
-        virtual ~CtrlTree();
-
-        /// Handle an event on the control
-        virtual void handleEvent( EvtGeneric &rEvent );
-
-        /// Check whether coordinates are inside the control
-        virtual bool mouseOver( int x, int y ) const;
-
-        /// Draw the control on the given graphics
-        virtual void draw( OSGraphics &rImage, int xDest, int yDest );
-
-        /// Called when the layout is resized
-        virtual void onResize();
-
-        /// Return true if the control can gain the focus
-        virtual bool isFocusable() const { return true; }
-
-        /// Get the type of control (custom RTTI)
-        virtual string getType() const { return "tree"; }
-
-        /// Make sure an item is visible
-        /// \param item an iterator to a tree item
-        /// \return true if it changed the position
-        bool ensureVisible( VarTree::Iterator item );
-
-        /// Make sure an item is visible
-        /// \param itemIndex the absolute index in the tree
-        /// \return true if it changed the position
-        bool ensureVisible( int itemIndex );
-
-    private:
-        /// Tree associated to the control
-        VarTree &m_rTree;
-        /// Font
-        const GenericFont &m_rFont;
-        /// Background bitmap
-        const GenericBitmap *m_pBgBitmap;
-        /// Item (leaf) bitmap
-        // (TODO : add different bitmaps for different item types
-        //         like in the wx playlist)
-        const GenericBitmap *m_pItemBitmap;
-        /// Open (expanded) node bitmap
-        const GenericBitmap *m_pOpenBitmap;
-        /// Closed node bitmap
-        const GenericBitmap *m_pClosedBitmap;
-        /// Color of normal test
-        uint32_t m_fgColor;
-        /// Color of the playing item
-        uint32_t m_playColor;
-        /// Background colors, used when no background bitmap is given
-        uint32_t m_bgColor1, m_bgColor2;
-        /// Background of selected items
-        uint32_t m_selColor;
-        /// Pointer on the last selected item in the tree
-        VarTree *m_pLastSelected;
-        /// Image of the control
-        OSGraphics *m_pImage;
-        /// First item in the visible area
-        VarTree::Iterator m_firstPos;
-
-        /// Don't move if the position variable is updated
-        bool m_dontMove;
-
-        /// Do we want to "flaten" the tree ?
-        bool m_flat;
-
-        /// Method called when the tree variable is modified
-        virtual void onUpdate( Subject<VarTree, tree_update> &rTree ,
-                               tree_update *);
-
-        // Method called when the position variable of the tree is modified
-        virtual void onUpdate( Subject<VarPercent> &rPercent , void *);
-
-        /// Called when the position is set
-        virtual void onPositionChange();
-
-        /// Compute the number of lines that can be displayed
-        int maxItems();
-
-        /// Compute the item's height (depends on fonts and images used)
-        int itemHeight();
-
-        /// Compute the width of an item's bitmap
-        int itemImageWidth();
-
-        /// Check if the tree must be scrolled
-        void autoScroll();
-
-        /// Draw the image of the control
-        void makeImage();
-
-        /// Return the n'th displayed item (starting at position 0)
-        /**
-         *  Return m_rTree.end() if such an item cannot be found (n < 0, or
-         *  n too big)
-         */
-        VarTree::Iterator findItemAtPos( int n );
+public:
+    CtrlTree( intf_thread_t *pIntf,
+              VarTree &rTree,
+              const GenericFont &rFont,
+              const GenericBitmap *pBgBitmap,
+              const GenericBitmap *pItemBitmap,
+              const GenericBitmap *pOpenBitmap,
+              const GenericBitmap *pClosedBitmap,
+              uint32_t fgColor,
+              uint32_t playColor,
+              uint32_t bgColor1,
+              uint32_t bgColor2,
+              uint32_t selColor,
+              const UString &rHelp,
+              VarBool *pVisible,
+              VarBool *pFlat );
+    virtual ~CtrlTree();
+
+    /// Handle an event on the control
+    virtual void handleEvent( EvtGeneric &rEvent );
+
+    /// Check whether coordinates are inside the control
+    virtual bool mouseOver( int x, int y ) const;
+
+    /// Draw the control on the given graphics
+    virtual void draw( OSGraphics &rImage, int xDest, int yDest );
+
+    /// Called when the layout is resized
+    virtual void onResize();
+
+    /// Return true if the control can gain the focus
+    virtual bool isFocusable() const { return true; }
+
+    /// Get the type of control (custom RTTI)
+    virtual string getType() const { return "tree"; }
+
+    /// Make sure an item is visible
+    /// \param item an iterator to a tree item
+    /// \return true if it changed the position
+    bool ensureVisible( VarTree::Iterator item );
+
+    /// Make sure an item is visible
+    /// \param itemIndex the absolute index in the tree
+    /// \return true if it changed the position
+    bool ensureVisible( int itemIndex );
+
+private:
+    /// Tree associated to the control
+    VarTree &m_rTree;
+    /// Font
+    const GenericFont &m_rFont;
+    /// Background bitmap
+    const GenericBitmap *m_pBgBitmap;
+    /// Item (leaf) bitmap
+    // (TODO : add different bitmaps for different item types
+    //         like in the wx playlist)
+    const GenericBitmap *m_pItemBitmap;
+    /// Open (expanded) node bitmap
+    const GenericBitmap *m_pOpenBitmap;
+    /// Closed node bitmap
+    const GenericBitmap *m_pClosedBitmap;
+    /// Color of normal test
+    uint32_t m_fgColor;
+    /// Color of the playing item
+    uint32_t m_playColor;
+    /// Background colors, used when no background bitmap is given
+    uint32_t m_bgColor1, m_bgColor2;
+    /// Background of selected items
+    uint32_t m_selColor;
+    /// Pointer on the last selected item in the tree
+    VarTree *m_pLastSelected;
+    /// Image of the control
+    OSGraphics *m_pImage;
+    /// First item in the visible area
+    VarTree::Iterator m_firstPos;
+
+    /// Don't move if the position variable is updated
+    bool m_dontMove;
+
+    /// Do we want to "flaten" the tree ?
+    bool m_flat;
+
+    /// Method called when the tree variable is modified
+    virtual void onUpdate( Subject<VarTree, tree_update> &rTree ,
+                           tree_update *);
+
+    // Method called when the position variable of the tree is modified
+    virtual void onUpdate( Subject<VarPercent> &rPercent , void *);
+
+    /// Called when the position is set
+    virtual void onPositionChange();
+
+    /// Compute the number of lines that can be displayed
+    int maxItems();
+
+    /// Compute the item's height (depends on fonts and images used)
+    int itemHeight();
+
+    /// Compute the width of an item's bitmap
+    int itemImageWidth();
+
+    /// Check if the tree must be scrolled
+    void autoScroll();
+
+    /// Draw the image of the control
+    void makeImage();
+
+    /// Return the n'th displayed item (starting at position 0)
+    /**
+     *  Return m_rTree.end() if such an item cannot be found (n < 0, or
+     *  n too big)
+     */
+    VarTree::Iterator findItemAtPos( int n );
 };
 
 #endif
index c152664e2a8b261f95d51fe9a64eae1d2531058f..37a295f5bbaec6ad83f5d44d2e0610047e6df695 100644 (file)
@@ -16,9 +16,9 @@
  * 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 this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
  *****************************************************************************/
 
 #ifndef CTRL_VIDEO_HPP
 /// Control video
 class CtrlVideo: public CtrlGeneric, public Observer<VarBox>
 {
-    public:
-        CtrlVideo( intf_thread_t *pIntf, GenericLayout &rLayout,
-                   bool autoResize, const UString &rHelp, VarBool *pVisible );
-        virtual ~CtrlVideo();
+public:
+    CtrlVideo( intf_thread_t *pIntf, GenericLayout &rLayout,
+               bool autoResize, const UString &rHelp, VarBool *pVisible );
+    virtual ~CtrlVideo();
 
-        /// Handle an event on the control
-        virtual void handleEvent( EvtGeneric &rEvent );
+    /// Handle an event on the control
+    virtual void handleEvent( EvtGeneric &rEvent );
 
-        /// Check whether coordinates are inside the control
-        virtual bool mouseOver( int x, int y ) const;
+    /// Check whether coordinates are inside the control
+    virtual bool mouseOver( int x, int y ) const;
 
-        /// Callback for layout resize
-        virtual void onResize();
+    /// Callback for layout resize
+    virtual void onResize();
 
-        /// Called when the Position is set
-        virtual void onPositionChange();
+    /// Called when the Position is set
+    virtual void onPositionChange();
 
-        /// Draw the control on the given graphics
-        virtual void draw( OSGraphics &rImage, int xDest, int yDest );
+    /// Draw the control on the given graphics
+    virtual void draw( OSGraphics &rImage, int xDest, int yDest );
 
-        /// Get the type of control (custom RTTI)
-        virtual string getType() const { return "video"; }
+    /// Get the type of control (custom RTTI)
+    virtual string getType() const { return "video"; }
 
-        /// Method called when the vout size is updated
-        virtual void onUpdate( Subject<VarBox> &rVoutSize, void* );
+    /// Method called when the vout size is updated
+    virtual void onUpdate( Subject<VarBox> &rVoutSize, void* );
 
-        /// Method called when visibility or ActiveLayout is updated
-        virtual void onUpdate( Subject<VarBool> &rVariable , void* );
+    /// Method called when visibility or ActiveLayout is updated
+    virtual void onUpdate( Subject<VarBool> &rVariable , void* );
 
-        // Attach a voutWindow to a Video Control
-        void attachVoutWindow( VoutWindow* pVoutWindow,
-                               int width = -1, int height = -1 );
+    // Attach a voutWindow to a Video Control
+    void attachVoutWindow( VoutWindow* pVoutWindow,
+                           int width = -1, int height = -1 );
 
-        // Detach a voutWindow from a Video Control
-        void detachVoutWindow( );
+    // Detach a voutWindow from a Video Control
+    void detachVoutWindow( );
 
-        // Update the inner part of the Video Control
-        void resizeInnerVout( );
+    // Update the inner part of the Video Control
+    void resizeInnerVout( );
 
-        // Get TopWindow associated with the video control
-        virtual TopWindow* getWindow() { return CtrlGeneric::getWindow(); }
+    // Get TopWindow associated with the video control
+    virtual TopWindow* getWindow() { return CtrlGeneric::getWindow(); }
 
-        // Get the VoutWindow associated with the video control
-        virtual VoutWindow* getVoutWindow() { return m_pVoutWindow; }
+    // Get the VoutWindow associated with the video control
+    virtual VoutWindow* getVoutWindow() { return m_pVoutWindow; }
 
-        /// Set the position and the associated layout of the control
-        virtual void setLayout( GenericLayout *pLayout,
-                                const Position &rPosition );
+    /// Set the position and the associated layout of the control
+    virtual void setLayout( GenericLayout *pLayout,
+                            const Position &rPosition );
 
-        // resize the video Control
-        virtual void resizeControl( int width, int height );
+    // resize the video Control
+    virtual void resizeControl( int width, int height );
 
-        // Is this control useable (visibility requirements)
-        virtual bool isUseable() { return m_bIsUseable; }
+    // Is this control useable (visibility requirements)
+    virtual bool isUseable() { return m_bIsUseable; }
 
-        // Is this control used
-        virtual bool isUsed() { return m_pVoutWindow ? true : false; }
+    // Is this control used
+    virtual bool isUsed() { return m_pVoutWindow ? true : false; }
 
-    private:
-        /// Associated layout
-        GenericLayout &m_rLayout;
+private:
+    /// Associated layout
+    GenericLayout &m_rLayout;
 
-        /// Autoresize parameter
-        bool m_bAutoResize;
+    /// Autoresize parameter
+    bool m_bAutoResize;
 
-        /// Difference between layout size and video size
-        int m_xShift, m_yShift;
+    /// Difference between layout size and video size
+    int m_xShift, m_yShift;
 
-        /// Is the video Control useable
-        bool m_bIsUseable;
+    /// Is the video Control useable
+    bool m_bIsUseable;
 
-        /// Vout window
-        VoutWindow *m_pVoutWindow;
+    /// Vout window
+    VoutWindow *m_pVoutWindow;
 };
 
 #endif
index 1ba8b18ac868f9e5a32281ced4b5b720db43da6c..45532eadb7dd879f7035826427836c44b721f9c3 100644 (file)
@@ -17,9 +17,9 @@
  * 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 this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
  *****************************************************************************/
 
 #ifndef EVT_ENTER_HPP
 /// Mouse enter event
 class EvtEnter: public EvtInput
 {
-    public:
-        EvtEnter( intf_thread_t *pIntf ): EvtInput( pIntf ) {}
-        virtual ~EvtEnter() {}
-
-        /// Return the type of event
-        virtual const string getAsString() const { return "enter"; }
+public:
+    EvtEnter( intf_thread_t *pIntf ): EvtInput( pIntf ) { }
+    virtual ~EvtEnter() { }
+    virtual const string getAsString() const { return "enter"; }
 };
 
 
index 5dc16b5df690922c049da1a3b266e8fd8fafa5c8..4e2d50db2289fe4331107e1c63b6f188c8c9586d 100644 (file)
@@ -17,9 +17,9 @@
  * 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 this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
  *****************************************************************************/
 
 #ifndef EVT_FOCUS_HPP
 /// Focus change event
 class EvtFocus: public EvtGeneric
 {
-    public:
-        EvtFocus( intf_thread_t *pIntf, bool focus ): EvtGeneric( pIntf ),
-            m_focus( focus ) {}
-        virtual ~EvtFocus() {}
-
-        /// Return the type of event
-        virtual const string getAsString() const
-        {
-            return ( m_focus ? "focus:in" : "focus:out" );
-        }
-
-    private:
-        /// true for a focus in, and false for a focus out
-        bool m_focus;
+public:
+    EvtFocus( intf_thread_t *pIntf, bool focus )
+            : EvtGeneric( pIntf ), m_focus( focus ) { }
+    virtual ~EvtFocus() { }
+
+    virtual const string getAsString() const
+    {
+        return ( m_focus ? "focus:in" : "focus:out" );
+    }
+
+private:
+    /// true for a focus in, and false for a focus out
+    bool m_focus;
 };
 
 
index 04599ea931524ea99d7a0f551171c321d9903193..34e7b0318028b397512a336371690d486cebcd23 100644 (file)
@@ -17,9 +17,9 @@
  * 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 this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
  *****************************************************************************/
 
 #ifndef EVT_GENERIC_HPP
 /// Base class for OS events
 class EvtGeneric: public SkinObject
 {
-    public:
-        virtual ~EvtGeneric() {}
+public:
+    virtual ~EvtGeneric() { }
 
-        /// Return the type of the event
-        virtual const string getAsString() const = 0;
+    /// Return the type of the event
+    virtual const string getAsString() const = 0;
 
-    protected:
-        EvtGeneric( intf_thread_t *pIntf ): SkinObject( pIntf ) {}
+protected:
+    EvtGeneric( intf_thread_t *pIntf ): SkinObject( pIntf ) { }
 };
 
 
index dd8f7ea30a6d3fe61a0cec585f70dcd62a64dc3f..1656d8fd06c24f29783ade8d10f90477198c0454 100644 (file)
@@ -17,9 +17,9 @@
  * 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 this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
  *****************************************************************************/
 
 #ifndef EVT_INPUT_HPP
 /// Base class for mouse and key events
 class EvtInput: public EvtGeneric
 {
-    public:
-        virtual ~EvtInput() {}
+public:
+    virtual ~EvtInput() { }
 
-        /// Masks for modifier keys
-        static const int kModNone;
-        static const int kModAlt;
-        static const int kModCtrl;
-        static const int kModShift;
+    /// Masks for modifier keys
+    static const int kModNone;
+    static const int kModAlt;
+    static const int kModCtrl;
+    static const int kModShift;
 
-        /// Get the modifiers
-        virtual int getMod() const { return m_mod; }
+    /// Get the modifiers
+    virtual int getMod() const { return m_mod; }
 
-    protected:
-        EvtInput( intf_thread_t *pIntf, int mod = kModNone );
+protected:
+    EvtInput( intf_thread_t *pIntf, int mod = kModNone );
 
-        /// Add the modifier to the event string
-        virtual void addModifier( string &rEvtString ) const;
+    /// Add the modifier to the event string
+    virtual void addModifier( string &rEvtString ) const;
 
-    private:
-        /// Modifiers (special key(s) pressed during the mouse event)
-        int m_mod;
+private:
+    /// Modifiers (special key(s) pressed during the mouse event)
+    int m_mod;
 };
 
 #endif
index 3113a9dc0dab1d0626caffa90211b699999ac737..ef50692c98844c2ae84111f3eb7b23ce34b7b641 100644 (file)
@@ -17,9 +17,9 @@
  * 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 this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
  *****************************************************************************/
 
 #ifndef EVT_KEY_HPP
 /// Class for keyboard events
 class EvtKey: public EvtInput
 {
-    public:
-        enum ActionType_t
-        {
-            kDown,
-            kUp
-        };
-
-        EvtKey( intf_thread_t *pIntf, int key, ActionType_t action,
-                int mod = kModNone ):
-            EvtInput( pIntf, mod ), m_key( key ), m_action( action ) {}
-        virtual ~EvtKey() {}
-
-        /// Return the type of event
-        virtual const string getAsString() const;
-
-        int getKey() const { return m_key; }
-
-    private:
-        /// The concerned key, stored according to the '#define's in vlc_keys.h
-        /// but without the modifiers (which are stored in EvtInput)
-        int m_key;
-        /// Type of action
-        ActionType_t m_action;
+public:
+    enum ActionType_t
+    {
+        kDown,
+        kUp
+    };
+
+    EvtKey( intf_thread_t *I, int key, ActionType_t actn, int mod = kModNone )
+          : EvtInput( I, mod ), m_key( key ), m_action( actn ) { }
+    virtual ~EvtKey() { }
+    virtual const string getAsString() const;
+
+    int getKey() const { return m_key; }
+
+private:
+    /// The concerned key, stored according to the '#define's in vlc_keys.h
+    /// but without the modifiers (which are stored in EvtInput)
+    int m_key;
+    /// Type of action
+    ActionType_t m_action;
 };
 
 
index 79dd25a22e6243d76bd5d6052d98d350bef4d730..7c165cadad6f24e9b01874f680dc019fe7cf28de 100644 (file)
@@ -17,9 +17,9 @@
  * 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 this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
  *****************************************************************************/
 
 #ifndef EVT_LEAVE_HPP
 /// Mouse leave event
 class EvtLeave: public EvtInput
 {
-    public:
-        EvtLeave( intf_thread_t *pIntf ): EvtInput( pIntf ) {}
-        virtual ~EvtLeave() {}
-
-        /// Return the type of event
-        virtual const string getAsString() const { return "leave"; }
+public:
+    EvtLeave( intf_thread_t *pIntf ): EvtInput( pIntf ) { }
+    virtual ~EvtLeave() { }
+    virtual const string getAsString() const { return "leave"; }
 };
 
 
index f439be53e9825abea8e863d2699f0dc377c910b0..b960549ee4d3ac8fa014ae9f3f122dd7db0ef003 100644 (file)
@@ -16,9 +16,9 @@
  * 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 this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
  *****************************************************************************/
 
 #ifndef EVT_MENU_HPP
 /// Mouse move event
 class EvtMenu: public EvtGeneric
 {
-    public:
-        EvtMenu( intf_thread_t *pIntf, int itemId ):
-            EvtGeneric( pIntf ), m_itemId( itemId ) {}
-        virtual ~EvtMenu() {}
+public:
+    EvtMenu( intf_thread_t *pIntf, int itemId )
+           : EvtGeneric( pIntf ), m_itemId( itemId ) { }
+    virtual ~EvtMenu() { }
+    virtual const string getAsString() const { return "menu"; }
 
-        /// Return the type of event
-        virtual const string getAsString() const { return "menu"; }
+    int getItemId() const { return m_itemId; }
 
-        // Getter
-        int getItemId() const { return m_itemId; }
-
-    private:
-        /// Coordinates of the mouse (absolute or relative)
-        int m_itemId;
+private:
+    /// Coordinates of the mouse (absolute or relative)
+    int m_itemId;
 };
 
 
index 9e34aed282a5e45d809ab43809cb07c533213711..259f87429f56771b05ad8fc70112286ef8652d30 100644 (file)
@@ -17,9 +17,9 @@
  * 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 this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
  *****************************************************************************/
 
 #ifndef EVT_MOTION_HPP
 /// Mouse move event
 class EvtMotion: public EvtInput
 {
-    public:
-        EvtMotion( intf_thread_t *pIntf, int xPos, int yPos ):
-            EvtInput( pIntf ), m_xPos( xPos ), m_yPos( yPos ) {}
-        virtual ~EvtMotion() {}
-
-        /// Return the type of event
-        virtual const string getAsString() const { return "motion"; }
-
-        // Getters
-        int getXPos() const { return m_xPos; }
-        int getYPos() const { return m_yPos; }
-
-    private:
-        /// Coordinates of the mouse (absolute or relative)
-        /**
-         * The coordinates are absolute when the event is sent to the
-         * GenericWindow, but are relative to the window when the event is
-         * forwarded to the controls
-         */
-        int m_xPos, m_yPos;
+public:
+    EvtMotion( intf_thread_t *pIntf, int xPos, int yPos )
+             : EvtInput( pIntf ), m_xPos( xPos ), m_yPos( yPos ) { }
+    virtual ~EvtMotion() { }
+    virtual const string getAsString() const { return "motion"; }
+
+    // Getters
+    int getXPos() const { return m_xPos; }
+    int getYPos() const { return m_yPos; }
+
+private:
+    /// Coordinates of the mouse (absolute or relative)
+    /**
+     * The coordinates are absolute when the event is sent to the
+     * GenericWindow, but are relative to the window when the event is
+     * forwarded to the controls
+     */
+    int m_xPos, m_yPos;
 };
 
 
index 2f72f98e100f5553f53e7aac144f1f9a195ef1cd..5328890177fd0ef71fc4ed0e20f77e01bdbe0003 100644 (file)
@@ -17,9 +17,9 @@
  * 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 this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
  *****************************************************************************/
 
 #ifndef EVT_MOUSE_HPP
 /// Class for mouse button events
 class EvtMouse: public EvtInput
 {
-    public:
-        enum ButtonType_t
-        {
-            kLeft,
-            kMiddle,
-            kRight
-        };
+public:
+    enum ButtonType_t
+    {
+        kLeft,
+        kMiddle,
+        kRight
+    };
 
-        enum ActionType_t
-        {
-            kDown,
-            kUp,
-            kDblClick
-        };
+    enum ActionType_t
+    {
+        kDown,
+        kUp,
+        kDblClick
+    };
 
-        EvtMouse( intf_thread_t *pIntf, int xPos, int yPos, ButtonType_t button,
-                  ActionType_t action, int mod = kModNone ):
-            EvtInput( pIntf, mod ), m_xPos( xPos ), m_yPos( yPos ),
-            m_button( button ), m_action( action ) {}
-        virtual ~EvtMouse() {}
+    EvtMouse( intf_thread_t *pIntf, int xPos, int yPos, ButtonType_t button,
+              ActionType_t action, int mod = kModNone )
+            : EvtInput( pIntf, mod ), m_xPos( xPos ), m_yPos( yPos ),
+              m_button( button ), m_action( action ) { }
+    virtual ~EvtMouse() { }
+    virtual const string getAsString() const;
 
-        // Return the event coordinates
-        int getXPos() const { return m_xPos; }
-        int getYPos() const { return m_yPos; }
+    // Return the event coordinates
+    int getXPos() const { return m_xPos; }
+    int getYPos() const { return m_yPos; }
 
-        // Return the button and the action
-        ButtonType_t getButton() const { return m_button; }
-        ActionType_t getAction() const { return m_action; }
+    // Return the button and the action
+    ButtonType_t getButton() const { return m_button; }
+    ActionType_t getAction() const { return m_action; }
 
-        virtual const string getAsString() const;
-
-    private:
-        /// Coordinates of the mouse relative to the window
-        int m_xPos, m_yPos;
-        /// Mouse button involved in the event
-        ButtonType_t m_button;
-        /// Type of action
-        ActionType_t m_action;
+private:
+    /// Coordinates of the mouse relative to the window
+    int m_xPos, m_yPos;
+    /// Mouse button involved in the event
+    ButtonType_t m_button;
+    /// Type of action
+    ActionType_t m_action;
 };
 
 
index 50936b6d5ffa566e18b6fde48bbb04dfe96b5838..83de0ab606e00d5d5c8e7dcbd070da055253def9 100644 (file)
@@ -17,9 +17,9 @@
  * 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 this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
  *****************************************************************************/
 
 #ifndef EVT_REFRESH_HPP
 /// Refresh window event
 class EvtRefresh: public EvtGeneric
 {
-    public:
-        /// Constructor with the coordinates of the area to refresh
-        EvtRefresh( intf_thread_t *pIntf, int xStart, int yStart, int width,
-                    int height ):
-            EvtGeneric( pIntf ), m_xStart( xStart ), m_yStart( yStart ),
-            m_width( width ), m_height( height ) {}
-
-        virtual ~EvtRefresh() {}
-
-        /// Return the type of event
-        virtual const string getAsString() const { return "refresh"; }
-
-        /// Getters
-        int getXStart() const { return m_xStart; }
-        int getYStart() const { return m_yStart; }
-        int getWidth()  const { return m_width; }
-        int getHeight() const { return m_height; }
-
-    private:
-        /// Coordinates and size of the area to refresh
-        int m_xStart, m_yStart, m_width, m_height;
+public:
+    /// Constructor with the coordinates of the area to refresh
+    EvtRefresh( intf_thread_t *pIntf, int xStart, int yStart,
+                                      int width, int height )
+              : EvtGeneric( pIntf ), m_xStart( xStart ), m_yStart( yStart ),
+                                     m_width( width ), m_height( height ) { }
+
+    virtual ~EvtRefresh() { }
+    virtual const string getAsString() const { return "refresh"; }
+
+    /// Getters
+    int getXStart() const { return m_xStart; }
+    int getYStart() const { return m_yStart; }
+    int getWidth()  const { return m_width; }
+    int getHeight() const { return m_height; }
+
+private:
+    /// Coordinates and size of the area to refresh
+    int m_xStart, m_yStart, m_width, m_height;
 };
 
 
index d0d7929bbe3c50dd66c11fd5af2c98a5fa9c6626..ccb44dda1565b134b40a6a0adef0156a2b212311 100644 (file)
@@ -17,9 +17,9 @@
  * 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 this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
  *****************************************************************************/
 
 #ifndef EVT_SCROLL_HPP
 /// Class for mouse scroll events
 class EvtScroll: public EvtInput
 {
-    public:
-        enum Direction_t
-        {
-            kUp,
-            kDown
-        };
-
-        EvtScroll( intf_thread_t *pIntf, int xPos, int yPos,
-                   Direction_t direction, int mod = kModNone ):
-            EvtInput( pIntf, mod ), m_xPos( xPos ), m_yPos( yPos ),
-            m_direction( direction ) {}
-        virtual ~EvtScroll() {}
-
-        // Return the event coordinates
-        int getXPos() const { return m_xPos; }
-        int getYPos() const { return m_yPos; }
-
-        // Return the direction
-        Direction_t getDirection() const { return m_direction; }
-
-        virtual const string getAsString() const;
-
-    private:
-        /// Coordinates of the mouse relative to the window
-        int m_xPos, m_yPos;
-        /// Scroll direction
-        Direction_t m_direction;
+public:
+    enum Direction_t
+    {
+        kUp,
+        kDown
+    };
+
+    EvtScroll( intf_thread_t *pIntf, int xPos, int yPos,
+               Direction_t direction, int mod = kModNone )
+             : EvtInput( pIntf, mod ), m_xPos( xPos ), m_yPos( yPos ),
+               m_direction( direction ) { }
+    virtual ~EvtScroll() { }
+    virtual const string getAsString() const;
+
+    // Return the event coordinates
+    int getXPos() const { return m_xPos; }
+    int getYPos() const { return m_yPos; }
+
+    // Return the direction
+    Direction_t getDirection() const { return m_direction; }
+
+private:
+    /// Coordinates of the mouse relative to the window
+    int m_xPos, m_yPos;
+    /// Scroll direction
+    Direction_t m_direction;
 };
 
 
index 436c6a603be6c2db42a7f6d08c1e9f1d71ec5cb5..f284516331e881e8a720ef04506b3e3c87d2deff 100644 (file)
@@ -17,9 +17,9 @@
  * 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 this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
  *****************************************************************************/
 
 #ifndef EVT_SPECIAL_HPP
 /// Class for non-genuine events
 class EvtSpecial: public EvtGeneric
 {
-    public:
-        enum ActionType_t
-        {
-            kShow,
-            kHide,
-            kEnable,
-            kDisable
-        };
-
-        EvtSpecial( intf_thread_t *pIntf, ActionType_t action ):
-            EvtGeneric( pIntf ), m_action( action ) {}
-        virtual ~EvtSpecial() {}
-
-        /// Return the type of event
-        virtual const string getAsString() const;
-
-    private:
-        /// Type of action
-        ActionType_t m_action;
+public:
+    enum ActionType_t
+    {
+        kShow,
+        kHide,
+        kEnable,
+        kDisable
+    };
+
+    EvtSpecial( intf_thread_t *pIntf, ActionType_t action )
+              : EvtGeneric( pIntf ), m_action( action ) { }
+    virtual ~EvtSpecial() { }
+    virtual const string getAsString() const;
+
+private:
+    /// Type of action
+    ActionType_t m_action;
 };
 
 
index c66461ae6a826b01993a0a027c28464e35c5a033..1fd5b03a83f34d4bb13edfa6e6c12ea6e2953d3d 100644 (file)
@@ -16,9 +16,9 @@
  * 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 this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
  *****************************************************************************/
 
 #ifndef MACOSX_DRAGDROP_HPP
 
 class MacOSXDragDrop: public SkinObject
 {
-    public:
-        typedef long ldata_t[5];
+public:
+    typedef long ldata_t[5];
 
-        MacOSXDragDrop( intf_thread_t *pIntf, bool playOnDrop );
-        virtual ~MacOSXDragDrop() {}
+    MacOSXDragDrop( intf_thread_t *pIntf, bool playOnDrop );
+    virtual ~MacOSXDragDrop() { }
 
-    private:
-        /// Indicates whether the file(s) must be played immediately
-        bool m_playOnDrop;
+private:
+    /// Indicates whether the file(s) must be played immediately
+    bool m_playOnDrop;
 };
 
 
index 33d4f2d8a57cc0a8e9cf7a8bcf9e981d0bb1ce77..3fa9b5ac90d0ab9b85297aec0d1b6a8690dcacad 100644 (file)
@@ -16,9 +16,9 @@
  * 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 this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
  *****************************************************************************/
 
 #ifndef MACOSX_FACTORY_HPP
 /// Class used to instanciate MacOSX specific objects
 class MacOSXFactory: public OSFactory
 {
-    public:
-        MacOSXFactory( intf_thread_t *pIntf );
-        virtual ~MacOSXFactory();
+public:
+    MacOSXFactory( intf_thread_t *pIntf );
+    virtual ~MacOSXFactory();
 
-        /// Initialization method
-        virtual bool init();
+    /// Initialization method
+    virtual bool init();
 
-        /// Instantiate an object OSGraphics
-        virtual OSGraphics *createOSGraphics( int width, int height );
+    /// Instantiate an object OSGraphics
+    virtual OSGraphics *createOSGraphics( int width, int height );
 
-        /// Get the instance of the singleton OSLoop
-        virtual OSLoop *getOSLoop();
+    /// Get the instance of the singleton OSLoop
+    virtual OSLoop *getOSLoop();
 
-        /// Destroy the instance of OSLoop
-        virtual void destroyOSLoop();
+    /// Destroy the instance of OSLoop
+    virtual void destroyOSLoop();
 
-        /// Instantiate an OSTimer with the given callback
-        virtual OSTimer *createOSTimer( CmdGeneric &rCmd );
+    /// Instantiate an OSTimer with the given callback
+    virtual OSTimer *createOSTimer( CmdGeneric &rCmd );
 
-        /// Minimize all the windows
-        virtual void minimize();
+    /// Minimize all the windows
+    virtual void minimize();
 
-        /// Restore the minimized windows
-        virtual void restore();
+    /// Restore the minimized windows
+    virtual void restore();
 
-        /// Add an icon in the system tray
-        virtual void addInTray();
+    /// Add an icon in the system tray
+    virtual void addInTray();
 
-        /// Remove the icon from the system tray
-        virtual void removeFromTray();
+    /// Remove the icon from the system tray
+    virtual void removeFromTray();
 
-        /// Show the task in the task bar
-        virtual void addInTaskBar();
+    /// Show the task in the task bar
+    virtual void addInTaskBar();
 
-        /// Remove the task from the task bar
-        virtual void removeFromTaskBar();
+    /// Remove the task from the task bar
+    virtual void removeFromTaskBar();
 
-        /// Instantiate an OSWindow object
-        virtual OSWindow *createOSWindow( GenericWindow &rWindow,
-                                          bool dragDrop, bool playOnDrop,
-                                          OSWindow *pParent );
+    /// Instantiate an OSWindow object
+    virtual OSWindow *createOSWindow( GenericWindow &rWindow,
+                                      bool dragDrop, bool playOnDrop,
+                                      OSWindow *pParent );
 
-        /// Instantiate an object OSTooltip
-        virtual OSTooltip *createOSTooltip();
+    /// Instantiate an object OSTooltip
+    virtual OSTooltip *createOSTooltip();
 
-        /// Instantiate an object OSPopup
-        virtual OSPopup *createOSPopup();
+    /// Instantiate an object OSPopup
+    virtual OSPopup *createOSPopup();
 
-        /// Get the directory separator
-        virtual const string &getDirSeparator() const { return m_dirSep; }
+    /// Get the directory separator
+    virtual const string &getDirSeparator() const { return m_dirSep; }
 
-        /// Get the resource path
-        virtual const list<string> &getResourcePath() const
-            { return m_resourcePath; }
+    /// Get the resource path
+    virtual const list<string> &getResourcePath() const
+        { return m_resourcePath; }
 
-        /// Get the screen size
-        virtual int getScreenWidth() const;
-        virtual int getScreenHeight() const;
+    /// Get the screen size
+    virtual int getScreenWidth() const;
+    virtual int getScreenHeight() const;
 
-        /// Get the work area (screen area without taskbars)
-        virtual SkinsRect getWorkArea() const;
+    /// Get the work area (screen area without taskbars)
+    virtual SkinsRect getWorkArea() const;
 
-        /// Get the position of the mouse
-        virtual void getMousePos( int &rXPos, int &rYPos ) const;
+    /// Get the position of the mouse
+    virtual void getMousePos( int &rXPos, int &rYPos ) const;
 
-        /// Change the cursor
-        virtual void changeCursor( CursorType_t type ) const { /*TODO*/ }
+    /// Change the cursor
+    virtual void changeCursor( CursorType_t type ) const { /*TODO*/ }
 
-        /// Delete a directory recursively
-        virtual void rmDir( const string &rPath );
+    /// Delete a directory recursively
+    virtual void rmDir( const string &rPath );
 
-    private:
-        /// Directory separator
-        const string m_dirSep;
-        /// Resource path
-        list<string> m_resourcePath;
+private:
+    /// Directory separator
+    const string m_dirSep;
+    /// Resource path
+    list<string> m_resourcePath;
 };
 
 #endif
index 639e867e075e0a67cbd849e7b596811a06bd458d..05ae82340e96145019816e7b33f7c304ddd1a2db 100644 (file)
@@ -16,9 +16,9 @@
  * 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 this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
  *****************************************************************************/
 
 #ifndef MACOSX_GRAPHICS_HPP
@@ -33,51 +33,51 @@ class GenericBitmap;
 /// MacOSX implementation of OSGraphics
 class MacOSXGraphics: public OSGraphics
 {
-    public:
-        MacOSXGraphics( intf_thread_t *pIntf, int width, int height);
+public:
+    MacOSXGraphics( intf_thread_t *pIntf, int width, int height);
 
-        virtual ~MacOSXGraphics();
+    virtual ~MacOSXGraphics();
 
-        /// Clear the graphics
-        virtual void clear();
+    /// Clear the graphics
+    virtual void clear();
 
-        /// Draw another graphics on this one
-        virtual void drawGraphics( const OSGraphics &rGraphics, int xSrc = 0,
-                                   int ySrc = 0, int xDest = 0, int yDest = 0,
-                                   int width = -1, int height = -1 );
+    /// Draw another graphics on this one
+    virtual void drawGraphics( const OSGraphics &rGraphics, int xSrc = 0,
+                               int ySrc = 0, int xDest = 0, int yDest = 0,
+                               int width = -1, int height = -1 );
 
-        /// Render a bitmap on this graphics
-        virtual void drawBitmap( const GenericBitmap &rBitmap, int xSrc = 0,
-                                 int ySrc = 0, int xDest = 0, int yDest = 0,
-                                 int width = -1, int height = -1,
-                                 bool blend = false );
+    /// Render a bitmap on this graphics
+    virtual void drawBitmap( const GenericBitmap &rBitmap, int xSrc = 0,
+                             int ySrc = 0, int xDest = 0, int yDest = 0,
+                             int width = -1, int height = -1,
+                             bool blend = false );
 
-        /// Draw a filled rectangle on the grahics (color is #RRGGBB)
-        virtual void fillRect( int left, int top, int width, int height,
-                               uint32_t color );
+    /// Draw a filled rectangle on the grahics (color is #RRGGBB)
+    virtual void fillRect( int left, int top, int width, int height,
+                           uint32_t color );
 
-        /// Draw an empty rectangle on the grahics (color is #RRGGBB)
-        virtual void drawRect( int left, int top, int width, int height,
-                               uint32_t color );
+    /// Draw an empty rectangle on the grahics (color is #RRGGBB)
+    virtual void drawRect( int left, int top, int width, int height,
+                           uint32_t color );
 
-        /// Set the shape of a window with the mask of this graphics.
-        virtual void applyMaskToWindow( OSWindow &rWindow );
+    /// Set the shape of a window with the mask of this graphics.
+    virtual void applyMaskToWindow( OSWindow &rWindow );
 
-        /// Copy the graphics on a window
-        virtual void copyToWindow( OSWindow &rWindow, int xSrc,
-                                   int ySrc, int width, int height,
-                                   int xDest, int yDest );
+    /// Copy the graphics on a window
+    virtual void copyToWindow( OSWindow &rWindow, int xSrc,
+                               int ySrc, int width, int height,
+                               int xDest, int yDest );
 
-        /// Tell whether the pixel at the given position is visible
-        virtual bool hit( int x, int y ) const;
+    /// Tell whether the pixel at the given position is visible
+    virtual bool hit( int x, int y ) const;
 
-        /// Getters
-        virtual int getWidth() const { return m_width; }
-        virtual int getHeight() const { return m_height; }
+    /// Getters
+    virtual int getWidth() const { return m_width; }
+    virtual int getHeight() const { return m_height; }
 
-    private:
-        /// Size of the image
-        int m_width, m_height;
+private:
+    /// Size of the image
+    int m_width, m_height;
 };
 
 
index f818d5454e060c943d105f4bfe097b9c809564b0..54b4d1de8e66674c0c55efa9c004d5c507be816d 100644 (file)
@@ -16,9 +16,9 @@
  * 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 this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
  *****************************************************************************/
 
 #ifndef MACOSX_LOOP_HPP
@@ -33,28 +33,28 @@ class GenericWindow;
 /// Main event loop for MacOSX (singleton)
 class MacOSXLoop: public OSLoop
 {
-    public:
-        /// Get the instance of MacOSXLoop
-        static OSLoop *instance( intf_thread_t *pIntf );
+public:
+    /// Get the instance of MacOSXLoop
+    static OSLoop *instance( intf_thread_t *pIntf );
 
-        /// Destroy the instance of MacOSXLoop
-        static void destroy( intf_thread_t *pIntf );
+    /// Destroy the instance of MacOSXLoop
+    static void destroy( intf_thread_t *pIntf );
 
-        /// Enter the event loop
-        virtual void run();
+    /// Enter the event loop
+    virtual void run();
 
-        /// Exit the main loop
-        virtual void exit();
+    /// Exit the main loop
+    virtual void exit();
 
-        // Handle a window event
-        void registerWindow( GenericWindow &rGenWin, WindowRef win );
+    // Handle a window event
+    void registerWindow( GenericWindow &rGenWin, WindowRef win );
 
-    private:
-        // Private because it's a singleton
-        MacOSXLoop( intf_thread_t *pIntf );
-        virtual ~MacOSXLoop();
-        // Flag set to exit the loop
-        bool m_exit;
+private:
+    // Private because it's a singleton
+    MacOSXLoop( intf_thread_t *pIntf );
+    virtual ~MacOSXLoop();
+    // Flag set to exit the loop
+    bool m_exit;
 };
 
 #endif
index f17639131cd0aa62e8acce03bfbabefe0c1d9698..5d903a42fb7fde91d064519acb4cf8f1cecc8cb4 100644 (file)
@@ -16,9 +16,9 @@
  * 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 this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
  *****************************************************************************/
 
 #ifndef MACOSX_POPUP_HPP
 /// MacOSX implementation of OSPopup
 class MacOSXPopup: public OSPopup
 {
-    public:
-        MacOSXPopup( intf_thread_t *pIntf );
+public:
+    MacOSXPopup( intf_thread_t *pIntf );
 
-        virtual ~MacOSXPopup();
+    virtual ~MacOSXPopup();
 
-        /// Show the popup menu at the given (absolute) corrdinates
-        virtual void show( int xPos, int yPos );
+    /// Show the popup menu at the given (absolute) corrdinates
+    virtual void show( int xPos, int yPos );
 
-        /// Hide the popup menu
-        virtual void hide();
+    /// Hide the popup menu
+    virtual void hide();
 
-        /// Append a new menu item with the given label to the popup menu
-        virtual void addItem( const string &rLabel, int pos );
+    /// Append a new menu item with the given label to the popup menu
+    virtual void addItem( const string &rLabel, int pos );
 
-        /// Create a dummy menu item to separate sections
-        virtual void addSeparator( int pos );
+    /// Create a dummy menu item to separate sections
+    virtual void addSeparator( int pos );
 
-        /// Return the position of the item identified by the given id
-        virtual int getPosFromId( int id ) const;
+    /// Return the position of the item identified by the given id
+    virtual int getPosFromId( int id ) const;
 };
 
 
index 18ad9661b66c0aa761784bb0f17037ba22dc3103..29d59f9431b6781fc087225f39b499795bf96d25 100644 (file)
@@ -16,9 +16,9 @@
  * 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 this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
  *****************************************************************************/
 
 #ifndef MACOSX_TIMER_HPP
@@ -34,20 +34,20 @@ class CmdGeneric;
 // MacOSX specific timer
 class MacOSXTimer: public OSTimer
 {
-    public:
-        MacOSXTimer( intf_thread_t *pIntf, CmdGeneric &rCmd );
-        virtual ~MacOSXTimer();
+public:
+    MacOSXTimer( intf_thread_t *pIntf, CmdGeneric &rCmd );
+    virtual ~MacOSXTimer();
 
-        /// (Re)start the timer with the given delay (in ms). If oneShot is
-        /// true, stop it after the first execution of the callback.
-        virtual void start( int delay, bool oneShot );
+    /// (Re)start the timer with the given delay (in ms). If oneShot is
+    /// true, stop it after the first execution of the callback.
+    virtual void start( int delay, bool oneShot );
 
-        /// Stop the timer
-        virtual void stop();
+    /// Stop the timer
+    virtual void stop();
 
-    private:
-        /// Command to execute
-        CmdGeneric &m_rCommand;
+private:
+    /// Command to execute
+    CmdGeneric &m_rCommand;
 };
 
 
index 9fd8c46ce2e76e8d8cc8951b851726c9fddae5a6..a559d2920c4a797ca88f24fafe53a7ce429bb188 100644 (file)
@@ -16,9 +16,9 @@
  * 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 this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
  *****************************************************************************/
 
 #ifndef MACOSX_TOOLTIP_HPP
@@ -32,18 +32,16 @@ class MacOSXDisplay;
 /// MacOSX implementation of OSTooltip
 class MacOSXTooltip: public OSTooltip
 {
-    public:
-        MacOSXTooltip( intf_thread_t *pIntf );
+public:
+    MacOSXTooltip( intf_thread_t *pIntf );
 
-        virtual ~MacOSXTooltip();
+    virtual ~MacOSXTooltip();
 
-        /// Show the tooltip
-        virtual void show( int left, int top, OSGraphics &rText );
+    /// Show the tooltip
+    virtual void show( int left, int top, OSGraphics &rText );
 
-        /// Hide the tooltip
-        virtual void hide();
-
-    private:
+    /// Hide the tooltip
+    virtual void hide();
 };
 
 
index 8c58d447510a59186c2c3e6e454fb432b4c670b7..f47746f7197a975db5ee7179d44633ef1d4347e7 100644 (file)
@@ -16,9 +16,9 @@
  * 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 this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
  *****************************************************************************/
 
 #ifndef MACOSX_WINDOW_HPP
@@ -34,42 +34,42 @@ class MacOSXDragDrop;
 /// MacOSX implementation of OSWindow
 class MacOSXWindow: public OSWindow
 {
-    public:
-        MacOSXWindow( intf_thread_t *pIntf, GenericWindow &rWindow,
-                      bool dragDrop, bool playOnDrop,
-                      MacOSXWindow *pParentWindow );
+public:
+    MacOSXWindow( intf_thread_t *pIntf, GenericWindow &rWindow,
+                  bool dragDrop, bool playOnDrop,
+                  MacOSXWindow *pParentWindow );
 
-        virtual ~MacOSXWindow();
+    virtual ~MacOSXWindow();
 
-        // Show the window
-        virtual void show( int left, int top ) const;
+    // Show the window
+    virtual void show( int left, int top ) const;
 
-        // Hide the window
-        virtual void hide() const;
+    // Hide the window
+    virtual void hide() const;
 
-        /// Move the window
-        virtual void moveResize( int left, int top,
-                                 int width, int height ) const;
+    /// Move the window
+    virtual void moveResize( int left, int top,
+                             int width, int height ) const;
 
-        /// Bring the window on top
-        virtual void raise() const;
+    /// Bring the window on top
+    virtual void raise() const;
 
-        /// Set the opacity of the window (0 = transparent, 255 = opaque)
-        virtual void setOpacity( uint8_t value ) const;
+    /// Set the opacity of the window (0 = transparent, 255 = opaque)
+    virtual void setOpacity( uint8_t value ) const;
 
-        /// Toggle the window on top
-        virtual void toggleOnTop( bool onTop ) const;
+    /// Toggle the window on top
+    virtual void toggleOnTop( bool onTop ) const;
 
-        /// Get the Carbon window handle
-        WindowRef getWindowRef() const { return m_win; };
+    /// Get the Carbon window handle
+    WindowRef getWindowRef() const { return m_win; };
 
-    private:
-        /// Parent window
-        MacOSXWindow *m_pParent;
-        /// Indicates whether the window handles drag&drop events
-        bool m_dragDrop;
-        /// Carbon Window object
-        WindowRef m_win;
+private:
+    /// Parent window
+    MacOSXWindow *m_pParent;
+    /// Indicates whether the window handles drag&drop events
+    bool m_dragDrop;
+    /// Carbon Window object
+    WindowRef m_win;
 };
 
 
index 0b7d92ebb4c510ee82639fbdf5e7917cbdae4ae9..c7e4b33a69c2fef32c34e5ba8503fc380455759f 100644 (file)
@@ -17,9 +17,9 @@
  * 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 this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
  *****************************************************************************/
 
 #ifdef HAVE_CONFIG_H
@@ -47,72 +47,72 @@ class GenericRect;
 /// Class for skin construction
 class Builder: public SkinObject
 {
-    public:
-        Builder( intf_thread_t *pIntf, const BuilderData &rData,
-                 const string &rPath );
-        virtual ~Builder();
-
-        /// Create a Theme object, ready to use.
-        /// Return NULL in case of problem
-        Theme *build();
-
-        /// Parse an action tag and returns a command
-        CmdGeneric *parseAction( const string &rAction );
-
-    private:
-        /// Data from the XML
-        const BuilderData &m_rData;
-        /// Path of the theme
-        const string m_path;
-
-        /// Theme under construction
-        Theme *m_pTheme;
-
-        void addTheme( const BuilderData::Theme &rData );
-        void addIniFile( const BuilderData::IniFile &rData );
-        void addBitmap( const BuilderData::Bitmap &rData );
-        void addSubBitmap( const BuilderData::SubBitmap &rData );
-        void addBitmapFont( const BuilderData::BitmapFont &rData );
-        void addFont( const BuilderData::Font &rData );
-        void addPopupMenu( const BuilderData::PopupMenu &rData );
-        void addMenuItem( const BuilderData::MenuItem &rData );
-        void addMenuSeparator( const BuilderData::MenuSeparator &rData );
-        void addWindow( const BuilderData::Window &rData );
-        void addLayout( const BuilderData::Layout &rData );
-        void addAnchor( const BuilderData::Anchor &rData );
-        void addButton( const BuilderData::Button &rData );
-        void addCheckbox( const BuilderData::Checkbox &rData );
-        void addImage( const BuilderData::Image &rData );
-        void addPanel( const BuilderData::Panel &rData );
-        void addText( const BuilderData::Text &rData );
-        void addRadialSlider( const BuilderData::RadialSlider &rData );
-        void addSlider( const BuilderData::Slider &rData );
-        void addList( const BuilderData::List &rData );
-        void addTree( const BuilderData::Tree &rData );
-        void addVideo( const BuilderData::Video &rData );
-
-        /// Compute the position of a control
-        const Position makePosition( const string &rLeftTop,
-                                     const string &rRightBottom,
-                                     int xPos, int yPos, int width, int height,
-                                     const GenericRect &rRect,
-                                     bool xKeepRatio = false,
-                                     bool yKeepRatio = false ) const;
-
-        // Build the full path of a file
-        string getFilePath( const string &fileName ) const;
-
-        /// Get a font from its id
-        GenericFont *getFont( const string &fontId );
-
-        /// Function to parse "points" tags
-        Bezier *getPoints( const char *pTag ) const;
-
-        /// Compute a color value
-        uint32_t getColor( const string &rVal ) const;
-
-        /// Image handler (used to load image files)
-        image_handler_t *m_pImageHandler;
+public:
+    Builder( intf_thread_t *pIntf, const BuilderData &rData,
+             const string &rPath );
+    virtual ~Builder();
+
+    /// Create a Theme object, ready to use.
+    /// Return NULL in case of problem
+    Theme *build();
+
+    /// Parse an action tag and returns a command
+    CmdGeneric *parseAction( const string &rAction );
+
+private:
+    /// Data from the XML
+    const BuilderData &m_rData;
+    /// Path of the theme
+    const string m_path;
+
+    /// Theme under construction
+    Theme *m_pTheme;
+
+    void addTheme( const BuilderData::Theme &rData );
+    void addIniFile( const BuilderData::IniFile &rData );
+    void addBitmap( const BuilderData::Bitmap &rData );
+    void addSubBitmap( const BuilderData::SubBitmap &rData );
+    void addBitmapFont( const BuilderData::BitmapFont &rData );
+    void addFont( const BuilderData::Font &rData );
+    void addPopupMenu( const BuilderData::PopupMenu &rData );
+    void addMenuItem( const BuilderData::MenuItem &rData );
+    void addMenuSeparator( const BuilderData::MenuSeparator &rData );
+    void addWindow( const BuilderData::Window &rData );
+    void addLayout( const BuilderData::Layout &rData );
+    void addAnchor( const BuilderData::Anchor &rData );
+    void addButton( const BuilderData::Button &rData );
+    void addCheckbox( const BuilderData::Checkbox &rData );
+    void addImage( const BuilderData::Image &rData );
+    void addPanel( const BuilderData::Panel &rData );
+    void addText( const BuilderData::Text &rData );
+    void addRadialSlider( const BuilderData::RadialSlider &rData );
+    void addSlider( const BuilderData::Slider &rData );
+    void addList( const BuilderData::List &rData );
+    void addTree( const BuilderData::Tree &rData );
+    void addVideo( const BuilderData::Video &rData );
+
+    /// Compute the position of a control
+    const Position makePosition( const string &rLeftTop,
+                                 const string &rRightBottom,
+                                 int xPos, int yPos, int width, int height,
+                                 const GenericRect &rRect,
+                                 bool xKeepRatio = false,
+                                 bool yKeepRatio = false ) const;
+
+    // Build the full path of a file
+    string getFilePath( const string &fileName ) const;
+
+    /// Get a font from its id
+    GenericFont *getFont( const string &fontId );
+
+    /// Function to parse "points" tags
+    Bezier *getPoints( const char *pTag ) const;
+
+    /// Compute a color value
+    uint32_t getColor( const string &rVal ) const;
+
+    /// Image handler (used to load image files)
+    image_handler_t *m_pImageHandler;
 };
 
 #endif
index aafff3c980cca720adeeacc23284c735e6c19e3f..f5c4ac525b1eb60a954a2784fe185495e978d3db 100644 (file)
@@ -16,9 +16,9 @@
  * 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 this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
  *****************************************************************************/
 
 #ifndef EXPR_EVALUATOR_HPP
 /// Expression evaluator using Reverse Polish Notation
 class ExprEvaluator: public SkinObject
 {
-    public:
-        /// Constructor
-        ExprEvaluator( intf_thread_t *pIntf ): SkinObject( pIntf ) {}
+public:
+    ExprEvaluator( intf_thread_t *pIntf ): SkinObject( pIntf ) { }
+    ~ExprEvaluator() { }
 
-        /// Destructor
-        ~ExprEvaluator() {}
+    /// Clear the RPN stack and parse an expression
+    void parse( const string &rExpr );
 
-        /// Clear the RPN stack and parse an expression
-        void parse( const string &rExpr );
+    /// Pop the first token from the RPN stack.
+    /// Return NULL when the stack is empty.
+    string getToken();
 
-        /// Pop the first token from the RPN stack.
-        /// Return NULL when the stack is empty.
-        string getToken();
+private:
+    /// RPN stack
+    list<string> m_stack;
 
-    private:
-        /// RPN stack
-        list<string> m_stack;
-
-        /// Returns true if op1 has precedency over op2
-        bool hasPrecedency( const string &op1, const string &op2 ) const;
+    /// Returns true if op1 has precedency over op2
+    bool hasPrecedency( const string &op1, const string &op2 ) const;
 };
 
 #endif
index 9ae4c1297b4dd47331341709c6190e6ae04690a6..f310e514603d48eceb7cd9769ced6197187406b8 100644 (file)
@@ -17,9 +17,9 @@
  * 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 this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
  *****************************************************************************/
 
 #ifndef INTERPRETER_HPP
@@ -38,41 +38,41 @@ class VarPercent;
 /// Command interpreter for scripts in the XML
 class Interpreter: public SkinObject
 {
-    public:
-        /// Get the instance of Interpreter
-        static Interpreter *instance( intf_thread_t *pIntf );
+public:
+    /// Get the instance of Interpreter
+    static Interpreter *instance( intf_thread_t *pIntf );
 
-        /// Delete the instance of Interpreter
-        static void destroy( intf_thread_t *pIntf );
+    /// Delete the instance of Interpreter
+    static void destroy( intf_thread_t *pIntf );
 
-        /// Parse an action tag and returns a pointer on a command
-        /// (the intepreter takes care of deleting it, don't do it
-        ///  yourself !)
-        CmdGeneric *parseAction( const string &rAction, Theme *pTheme );
+    /// Parse an action tag and returns a pointer on a command
+    /// (the intepreter takes care of deleting it, don't do it
+    ///  yourself !)
+    CmdGeneric *parseAction( const string &rAction, Theme *pTheme );
 
-        /// Returns the boolean variable corresponding to the given name
-        VarBool *getVarBool( const string &rName, Theme *pTheme );
+    /// Returns the boolean variable corresponding to the given name
+    VarBool *getVarBool( const string &rName, Theme *pTheme );
 
 
-        /// Returns the percent variable corresponding to the given name
-        VarPercent *getVarPercent( const string &rName, Theme *pTheme );
+    /// Returns the percent variable corresponding to the given name
+    VarPercent *getVarPercent( const string &rName, Theme *pTheme );
 
-        /// Returns the list variable corresponding to the given name
-        VarList *getVarList( const string &rName, Theme *pTheme );
+    /// Returns the list variable corresponding to the given name
+    VarList *getVarList( const string &rName, Theme *pTheme );
 
-        /// Returns the tree variable corresponding to the given name
-        VarTree *getVarTree( const string &rName, Theme *pTheme );
+    /// Returns the tree variable corresponding to the given name
+    VarTree *getVarTree( const string &rName, Theme *pTheme );
 
-        /// Get a constant value
-        string getConstant( const string &rValue );
+    /// Get a constant value
+    string getConstant( const string &rValue );
 
-    private:
-        /// Map of global commands
-        map<string, CmdGenericPtr> m_commandMap;
+private:
+    /// Map of global commands
+    map<string, CmdGenericPtr> m_commandMap;
 
-        // Private because it is a singleton
-        Interpreter( intf_thread_t *pIntf );
-        virtual ~Interpreter() {}
+    // Private because it is a singleton
+    Interpreter( intf_thread_t *pIntf );
+    virtual ~Interpreter() { }
 };
 
 #endif
index 8ce64cb6521c9b5a66057e3fd9dd8dca8ec38ba9..4a903a717cbb49ed8c448847db53d3e73a225a42 100644 (file)
@@ -16,9 +16,9 @@
  * 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 this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
  *****************************************************************************/
 
 #ifndef SKIN_PARSER_HPP
 /// Parser for the skin DTD
 class SkinParser: public XMLParser
 {
-    public:
-        SkinParser( intf_thread_t *pIntf, const string &rFileName,
-                    const string &rPath, bool useDTD = true,
-                    BuilderData *pData = NULL );
-        virtual ~SkinParser();
+public:
+    SkinParser( intf_thread_t *pIntf, const string &rFileName,
+                const string &rPath, bool useDTD = true,
+                BuilderData *pData = NULL );
+    virtual ~SkinParser();
 
-        const BuilderData &getData() const { return *m_pData; }
+    const BuilderData &getData() const { return *m_pData; }
 
-        static int convertColor( const char *transcolor );
+    static int convertColor( const char *transcolor );
 
-    private:
-        /// Path of the theme
-        const string m_path;
-        /// Container for mapping data from the XML
-        BuilderData *m_pData;
-        /// Indicate whether the class owns the data
-        bool m_ownData;
-        /// Current IDs
-        string m_curBitmapId;
-        string m_curWindowId;
-        string m_curLayoutId;
-        string m_curPopupId;
-        string m_curListId;
-        string m_curTreeId;
-        /// Current position of menu items in the popups
-        list<int> m_popupPosList;
-        /// Current offset of the controls
-        int m_xOffset, m_yOffset;
-        list<int> m_xOffsetList, m_yOffsetList;
-        /// Stack of panel ids
-        list<string> m_panelStack;
-        /// Layer of the current control in the layout
-        int m_curLayer;
-        /// Set of used id
-        set<string> m_idSet;
+private:
+    /// Path of the theme
+    const string m_path;
+    /// Container for mapping data from the XML
+    BuilderData *m_pData;
+    /// Indicate whether the class owns the data
+    bool m_ownData;
+    /// Current IDs
+    string m_curBitmapId;
+    string m_curWindowId;
+    string m_curLayoutId;
+    string m_curPopupId;
+    string m_curListId;
+    string m_curTreeId;
+    /// Current position of menu items in the popups
+    list<int> m_popupPosList;
+    /// Current offset of the controls
+    int m_xOffset, m_yOffset;
+    list<int> m_xOffsetList, m_yOffsetList;
+    /// Stack of panel ids
+    list<string> m_panelStack;
+    /// Layer of the current control in the layout
+    int m_curLayer;
+    /// Set of used id
+    set<string> m_idSet;
 
-        /// Callbacks
-        virtual void handleBeginElement( const string &rName,
-                                         AttrList_t &attr );
-        virtual void handleEndElement( const string &rName );
+    /// Callbacks
+    virtual void handleBeginElement( const string &rName,
+                                     AttrList_t &attr );
+    virtual void handleEndElement( const string &rName );
 
-        /// Helper functions
-        //@{
-        bool convertBoolean( const char *value ) const;
-        /// Transform to int, and check that it is in the given range (if not,
-        /// the closest range boundary will be used)
-        int convertInRange( const char *value, int minValue, int maxValue,
-                            const string &rAttribute ) const;
-        //@}
+    /// Helper functions
+    //@{
+    bool convertBoolean( const char *value ) const;
+    /// Transform to int, and check that it is in the given range (if not,
+    /// the closest range boundary will be used)
+    int convertInRange( const char *value, int minValue, int maxValue,
+                        const string &rAttribute ) const;
+    //@}
 
-        /// Generate a new id
-        const string generateId() const;
+    /// Generate a new id
+    const string generateId() const;
 
-        /// Check if the id is unique, and if not generate a new one
-        const string uniqueId( const string &id );
+    /// Check if the id is unique, and if not generate a new one
+    const string uniqueId( const string &id );
 };
 
 #endif
index 19a8c3e12797a424cd8d821b280b8b24d51023de..aa5f9e22ad17dcafa84e732a5f98221759636e66 100644 (file)
@@ -16,9 +16,9 @@
  * 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 this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
  *****************************************************************************/
 
 #ifndef XMLPARSER_HPP
 /// XML parser using libxml2 text reader API
 class XMLParser: public SkinObject
 {
-    public:
-        XMLParser( intf_thread_t *pIntf, const string &rFileName,
-                   bool useDTD = true );
-        virtual ~XMLParser();
+public:
+    XMLParser( intf_thread_t *pIntf, const string &rFileName,
+               bool useDTD = true );
+    virtual ~XMLParser();
 
-        /// Parse the file. Returns true on success
-        bool parse();
+    /// Parse the file. Returns true on success
+    bool parse();
 
-    protected:
-        // Key comparison function for type "const char*"
-        struct ltstr
+protected:
+    // Key comparison function for type "const char*"
+    struct ltstr
+    {
+        bool operator()(const char* s1, const char* s2) const
         {
-            bool operator()(const char* s1, const char* s2) const
-            {
-                return strcmp(s1, s2) < 0;
-            }
-        };
-        /// Type for attribute lists
-        typedef map<const char*, const char*, ltstr> AttrList_t;
+            return strcmp(s1, s2) < 0;
+        }
+    };
+    /// Type for attribute lists
+    typedef map<const char*, const char*, ltstr> AttrList_t;
 
-        /// Flag for validation errors
-        bool m_errors;
+    /// Flag for validation errors
+    bool m_errors;
 
-        /// Callbacks
-        virtual void handleBeginElement( const string &rName,
-                                         AttrList_t &attr ) {}
-        virtual void handleEndElement( const string &rName ) {}
+    /// Callbacks
+    virtual void handleBeginElement( const string &rName,
+                                     AttrList_t &attr ) { }
+    virtual void handleEndElement( const string &rName ) { }
 
-    private:
-        void LoadCatalog();
+private:
+    void LoadCatalog();
 
-        /// Reader context
-        xml_t *m_pXML;
-        xml_reader_t *m_pReader;
-        stream_t *m_pStream;
+    /// Reader context
+    xml_t *m_pXML;
+    xml_reader_t *m_pReader;
+    stream_t *m_pStream;
 };
 
 #endif
index 9b5dfcdf52c6501769e87542b1a3482062dc23d5..4758bf11508d27c8044d391f2350cfea3543c5fd 100644 (file)
@@ -17,9 +17,9 @@
  * 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 this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
  *****************************************************************************/
 
 #ifndef ANCHOR_HPP
 /// Class for the windows anchors
 class Anchor: public SkinObject
 {
-    public:
-        Anchor( intf_thread_t *pIntf, const Position &rPosition, int range,
-                int priority, const Bezier &rCurve, GenericLayout &rLayout ):
-            SkinObject( pIntf ), m_position( rPosition ),
-            m_rCurve( rCurve ), m_range( range ), m_priority( priority ),
-            m_rLayout( rLayout ) {}
-        virtual ~Anchor() {}
-
-        /**
-         * Return true if the given anchor is hanged by this one
-         * Two conditions are required:
-         *  - the other anchor must be in position of anchoring (as defined
-         *    by canHang())
-         *  - the priority of the other anchor must be lower than this one's
-         */
-        bool isHanging( const Anchor &rOther ) const;
-
-        /**
-         * Return true if the other anchor, moved by the (xOffset, yOffset)
-         * vector, is "hangable" by this one (i.e. if it is in its range of
-         * action), else return false.
-         * When the function returns true, the xOffset and yOffset parameters
-         * are modified to indicate the position that the other anchor would
-         * take if hanged by this one (this position is calculated to minimize
-         * the difference with the old xOffset and yOffset, so that the window
-         * doesn't "jump" in a strange way).
-         */
-        bool canHang( const Anchor &rOther, int &xOffset, int &yOffset ) const;
-
-        // Indicate whether this anchor is reduced to a single point
-        bool isPoint() const { return m_rCurve.getNbCtrlPoints() == 1; }
-
-        // Getters
-        const Position & getPosition() const { return m_position; }
-
-        int getXPosAbs() const
-        {
-            return (m_position.getLeft() + m_rLayout.getLeft());
-        }
-
-        int getYPosAbs() const
-        {
-            return (m_position.getTop() + m_rLayout.getTop());
-        }
-
-    private:
-        /// Position in the layout
-        Position m_position;
-
-        /// Curve of the anchor
-        const Bezier &m_rCurve;
-
-        /// Range of action
-        int m_range;
-
-        /// Priority
-        int m_priority;
-
-        /// Parent layout
-        GenericLayout &m_rLayout;
+public:
+    Anchor( intf_thread_t *pIntf, const Position &rPosition, int range,
+            int priority, const Bezier &rCurve, GenericLayout &rLayout )
+          : SkinObject( pIntf ), m_position( rPosition ), m_rCurve( rCurve ),
+            m_range( range ), m_priority( priority ), m_rLayout( rLayout ) { }
+    virtual ~Anchor() { }
+
+    /**
+     * Return true if the given anchor is hanged by this one
+     * Two conditions are required:
+     *  - the other anchor must be in position of anchoring (as defined
+     *    by canHang())
+     *  - the priority of the other anchor must be lower than this one's
+     */
+    bool isHanging( const Anchor &rOther ) const;
+
+    /**
+     * Return true if the other anchor, moved by the (xOffset, yOffset)
+     * vector, is "hangable" by this one (i.e. if it is in its range of
+     * action), else return false.
+     * When the function returns true, the xOffset and yOffset parameters
+     * are modified to indicate the position that the other anchor would
+     * take if hanged by this one (this position is calculated to minimize
+     * the difference with the old xOffset and yOffset, so that the window
+     * doesn't "jump" in a strange way).
+     */
+    bool canHang( const Anchor &rOther, int &xOffset, int &yOffset ) const;
+
+    // Indicate whether this anchor is reduced to a single point
+    bool isPoint() const { return m_rCurve.getNbCtrlPoints() == 1; }
+
+    // Getters
+    const Position & getPosition() const { return m_position; }
+
+    int getXPosAbs() const
+    {
+        return (m_position.getLeft() + m_rLayout.getLeft());
+    }
+
+    int getYPosAbs() const
+    {
+        return (m_position.getTop() + m_rLayout.getTop());
+    }
+
+private:
+    /// Position in the layout
+    Position m_position;
+
+    /// Curve of the anchor
+    const Bezier &m_rCurve;
+
+    /// Range of action
+    int m_range;
+
+    /// Priority
+    int m_priority;
+
+    /// Parent layout
+    GenericLayout &m_rLayout;
 };
 
 
index 58fd30a9845649c4c63c69f29766d56a5af0a887..1e783697a91c3c7ecfeb325291bd67eec98c46bb 100644 (file)
@@ -16,9 +16,9 @@
  * 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 this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
  *****************************************************************************/
 
 #ifndef ANIM_BITMAP_HPP
@@ -37,43 +37,43 @@ class OSTimer;
 class AnimBitmap: public SkinObject, public Box,
                   public Subject<AnimBitmap>
 {
-    public:
-        AnimBitmap( intf_thread_t *pIntf, const GenericBitmap &rBitmap );
-
-        virtual ~AnimBitmap();
-
-        /// Start the animation
-        void startAnim();
-
-        /// Stop the animation
-        void stopAnim();
-
-        /// Draw the current frame on another graphics
-        void draw( OSGraphics &rImage, int xDest, int yDest );
-
-        /// Tell whether the pixel at the given position is visible
-        bool hit( int x, int y ) const;
-
-        /// Get the size of the current frame
-        virtual int getWidth() const;
-        virtual int getHeight() const;
-
-    private:
-        /// Bitmap stored
-        const GenericBitmap &m_rBitmap;
-        /// Graphics to store the bitmap
-        OSGraphics *m_pImage;
-        /// Number of frames
-        int m_nbFrames;
-        /// Frame rate
-        int m_frameRate;
-        /// Curent frame
-        int m_curFrame;
-         /// Timer for the animation
-        OSTimer *m_pTimer;
-
-        /// Callback for the timer
-        DEFINE_CALLBACK( AnimBitmap, NextFrame );
+public:
+    AnimBitmap( intf_thread_t *pIntf, const GenericBitmap &rBitmap );
+
+    virtual ~AnimBitmap();
+
+    /// Start the animation
+    void startAnim();
+
+    /// Stop the animation
+    void stopAnim();
+
+    /// Draw the current frame on another graphics
+    void draw( OSGraphics &rImage, int xDest, int yDest );
+
+    /// Tell whether the pixel at the given position is visible
+    bool hit( int x, int y ) const;
+
+    /// Get the size of the current frame
+    virtual int getWidth() const;
+    virtual int getHeight() const;
+
+private:
+    /// Bitmap stored
+    const GenericBitmap &m_rBitmap;
+    /// Graphics to store the bitmap
+    OSGraphics *m_pImage;
+    /// Number of frames
+    int m_nbFrames;
+    /// Frame rate
+    int m_frameRate;
+    /// Curent frame
+    int m_curFrame;
+     /// Timer for the animation
+    OSTimer *m_pTimer;
+
+    /// Callback for the timer
+    DEFINE_CALLBACK( AnimBitmap, NextFrame );
 };
 
 
index 8da091eb58c36dc33d3dfa73b54855bbb925a14d..15f2bcd0fa3661fff41f3b0f9390e76b809464ad 100644 (file)
@@ -16,9 +16,9 @@
  * 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 this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
  *****************************************************************************/
 
 #ifndef BITMAP_FONT_HPP
@@ -33,39 +33,39 @@ class GenericBitmap;
 /// Class to handle bitmap fonts
 class BitmapFont: public GenericFont
 {
-    public:
-        BitmapFont( intf_thread_t *pIntf, const GenericBitmap &rBitmap,
-                    const string &rType );
-        virtual ~BitmapFont() {}
+public:
+    BitmapFont( intf_thread_t *pIntf, const GenericBitmap &rBitmap,
+                const string &rType );
+    virtual ~BitmapFont() { }
 
-        virtual bool init() { return true; }
+    virtual bool init() { return true; }
 
-        /// Render a string on a bitmap.
-        /// If maxWidth != -1, the text is truncated with '...'
-        virtual GenericBitmap *drawString( const UString &rString,
-            uint32_t color, int maxWidth = -1 ) const;
+    /// Render a string on a bitmap.
+    /// If maxWidth != -1, the text is truncated with '...'
+    virtual GenericBitmap *drawString( const UString &rString,
+        uint32_t color, int maxWidth = -1 ) const;
 
-        /// Get the font size
-        virtual int getSize() const { return m_height; }
+    /// Get the font size
+    virtual int getSize() const { return m_height; }
 
-    private:
-        /// Description of a glyph
-        struct Glyph_t
-        {
-            Glyph_t(): m_xPos( -1 ), m_yPos( 0 ) {}
-            int m_xPos, m_yPos;
-        };
+private:
+    /// Description of a glyph
+    struct Glyph_t
+    {
+        Glyph_t(): m_xPos( -1 ), m_yPos( 0 ) { }
+        int m_xPos, m_yPos;
+    };
 
-        /// Bitmap
-        const GenericBitmap &m_rBitmap;
-        /// Glyph size
-        int m_width, m_height;
-        /// Horizontal advance between two characters
-        int m_advance;
-        /// Horizontal advance for non-displayable characters
-        int m_skip;
-        /// Character table
-        Glyph_t m_table[256];
+    /// Bitmap
+    const GenericBitmap &m_rBitmap;
+    /// Glyph size
+    int m_width, m_height;
+    /// Horizontal advance between two characters
+    int m_advance;
+    /// Horizontal advance for non-displayable characters
+    int m_skip;
+    /// Character table
+    Glyph_t m_table[256];
 };
 
 #endif
index 94e36c8f0e0b93e43288f400bbfce69f50a23e5c..0e3cebfa12670e3181456d490873279f6c14a1e6 100644 (file)
@@ -17,9 +17,9 @@
  * 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 this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
  *****************************************************************************/
 
 #ifndef DIALOGS_HPP
@@ -33,106 +33,106 @@ struct interaction_dialog_t ;
 // Dialogs provider
 class Dialogs: public SkinObject
 {
-    public:
-        /// Get the instance of Dialogs (or NULL if initialization failed)
-        static Dialogs *instance( intf_thread_t *pIntf );
+public:
+    /// Get the instance of Dialogs (or NULL if initialization failed)
+    static Dialogs *instance( intf_thread_t *pIntf );
 
-        /// Delete the instance of Dialogs
-        static void destroy( intf_thread_t *pIntf );
+    /// Delete the instance of Dialogs
+    static void destroy( intf_thread_t *pIntf );
 
-        /// Show the Change Skin dialog
-        void showChangeSkin();
+    /// Show the Change Skin dialog
+    void showChangeSkin();
 
-        /// Show the Load Playlist dialog
-        void showPlaylistLoad();
+    /// Show the Load Playlist dialog
+    void showPlaylistLoad();
 
-        /// Show the Save Playlist dialog
-        void showPlaylistSave();
+    /// Show the Save Playlist dialog
+    void showPlaylistSave();
 
-        /** Show the Quick Open File dialog.
-         *  If play is false, just add the item in the playlist
-         */
-        void showFileSimple( bool play );
+    /** Show the Quick Open File dialog.
+     *  If play is false, just add the item in the playlist
+     */
+    void showFileSimple( bool play );
 
-        /** Show the Open File dialog
-         *  If play is false, just add the item in the playlist
-         */
-        void showFile( bool play );
+    /** Show the Open File dialog
+     *  If play is false, just add the item in the playlist
+     */
+    void showFile( bool play );
 
-        /** Show the Open Directory dialog
-         *  If play is false, just add the item in the playlist
-         */
-        void showDirectory( bool play );
+    /** Show the Open Directory dialog
+     *  If play is false, just add the item in the playlist
+     */
+    void showDirectory( bool play );
 
-        /** Show the Open Disc dialog
-         *  If play is false, just add the item in the playlist
-         */
-        void showDisc( bool play );
+    /** Show the Open Disc dialog
+     *  If play is false, just add the item in the playlist
+     */
+    void showDisc( bool play );
 
-        /** Show the Open Network Stream dialog
-         *  If play is false, just add the item in the playlist
-         */
-        void showNet( bool play );
+    /** Show the Open Network Stream dialog
+     *  If play is false, just add the item in the playlist
+     */
+    void showNet( bool play );
 
-        /// Show the Messages dialog
-        void showMessages();
+    /// Show the Messages dialog
+    void showMessages();
 
-        /// Show the Preferences dialog
-        void showPrefs();
+    /// Show the Preferences dialog
+    void showPrefs();
 
-        /// Show the FileInfo dialog
-        void showFileInfo();
+    /// Show the FileInfo dialog
+    void showFileInfo();
 
-        /// Show the Streaming Wizard dialog
-        void showStreamingWizard();
+    /// Show the Streaming Wizard dialog
+    void showStreamingWizard();
 
-        /// Show the Playlist
-        void showPlaylist();
+    /// Show the Playlist
+    void showPlaylist();
 
-        /// Show a popup menu
-        void showPopupMenu( bool bShow, int popupType );
+    /// Show a popup menu
+    void showPopupMenu( bool bShow, int popupType );
 
-        /// Show an interaction dialog
-        void showInteraction( interaction_dialog_t * );
+    /// Show an interaction dialog
+    void showInteraction( interaction_dialog_t * );
 
-    private:
-        // Private because it's a singleton
-        Dialogs( intf_thread_t *pIntf );
-        ~Dialogs();
+private:
+    // Private because it's a singleton
+    Dialogs( intf_thread_t *pIntf );
+    ~Dialogs();
 
-        /// DlgCallback is the type of the callbacks of the open/save dialog
-        typedef void DlgCallback( intf_dialog_args_t *pArg );
+    /// DlgCallback is the type of the callbacks of the open/save dialog
+    typedef void DlgCallback( intf_dialog_args_t *pArg );
 
-        /// Possible flags for the open/save dialog
-        enum flags_t
-        {
-            kOPEN     = 0x01,
-            kSAVE     = 0x02,
-            kMULTIPLE = 0x04
-        };
+    /// Possible flags for the open/save dialog
+    enum flags_t
+    {
+        kOPEN     = 0x01,
+        kSAVE     = 0x02,
+        kMULTIPLE = 0x04
+    };
 
-        /// Initialization method
-        bool init();
+    /// Initialization method
+    bool init();
 
-        /** Show a generic open/save dialog, initialized with the given
-         *  parameters
-         *  The 'flags' parameter is a logical or of the flags_t values
-         */
-        void showFileGeneric( const string &rTitle, const string &rExtensions,
-                              DlgCallback callback, int flags );
+    /** Show a generic open/save dialog, initialized with the given
+     *  parameters
+     *  The 'flags' parameter is a logical or of the flags_t values
+     */
+    void showFileGeneric( const string &rTitle, const string &rExtensions,
+                          DlgCallback callback, int flags );
 
-        /// Callback for the Change Skin dialog
-        static void showChangeSkinCB( intf_dialog_args_t *pArg );
+    /// Callback for the Change Skin dialog
+    static void showChangeSkinCB( intf_dialog_args_t *pArg );
 
-        /// Callback for the Load Playlist dialog
-        static void showPlaylistLoadCB( intf_dialog_args_t *pArg );
+    /// Callback for the Load Playlist dialog
+    static void showPlaylistLoadCB( intf_dialog_args_t *pArg );
 
-        /// Callback for the Save Playlist dialog
-        static void showPlaylistSaveCB( intf_dialog_args_t *pArg );
+    /// Callback for the Save Playlist dialog
+    static void showPlaylistSaveCB( intf_dialog_args_t *pArg );
 
-        /// Dialogs provider module
-        intf_thread_t *m_pProvider;
-        module_t *m_pModule;
+    /// Dialogs provider module
+    intf_thread_t *m_pProvider;
+    module_t *m_pModule;
 };
 
 
index b639370841277d6f1248b6ef60d26165e2a2b564..87f83ac28e86e0cb98bde57b7e794d9ccd4949d9 100644 (file)
@@ -17,9 +17,9 @@
  * 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 this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
  *****************************************************************************/
 
 #ifndef FILE_BITMAP_HPP
 /// Class for file bitmaps
 class FileBitmap: public GenericBitmap
 {
-    public:
-        /// Load a bitmap from a file. aColor is the transparency
-        /// color, in the format 0xRRGGBB
-        FileBitmap( intf_thread_t *pIntf, image_handler_t *pImageHandler,
-                    string fileName, uint32_t aColor, int nbFrames = 1,
-                    int fps = 0 );
-
-        virtual ~FileBitmap();
-
-        /// Get the width of the bitmap
-        virtual int getWidth() const { return m_width; }
-
-        /// Get the heighth of the bitmap
-        virtual int getHeight() const { return m_height; }
-
-        /// Get a linear buffer containing the image data.
-        /// Each pixel is stored in 4 bytes in the order B,G,R,A
-        virtual uint8_t *getData() const;
-
-    private:
-        /// Size of the bitmap.
-        int m_width, m_height;
-        /// Buffer containing the image data.
-        uint8_t *m_pData;
+public:
+    /// Load a bitmap from a file. aColor is the transparency
+    /// color, in the format 0xRRGGBB
+    FileBitmap( intf_thread_t *pIntf, image_handler_t *pImageHandler,
+                string fileName, uint32_t aColor, int nbFrames = 1,
+                int fps = 0 );
+
+    virtual ~FileBitmap();
+
+    /// Get the width of the bitmap
+    virtual int getWidth() const { return m_width; }
+
+    /// Get the heighth of the bitmap
+    virtual int getHeight() const { return m_height; }
+
+    /// Get a linear buffer containing the image data.
+    /// Each pixel is stored in 4 bytes in the order B,G,R,A
+    virtual uint8_t *getData() const;
+
+private:
+    /// Size of the bitmap.
+    int m_width, m_height;
+    /// Buffer containing the image data.
+    uint8_t *m_pData;
 };
 
 
index 31d032ef825c636b5d71081813e87fd0ea89afda..daaab7258e40a1f25090e803b6777833bd08da19 100644 (file)
@@ -17,9 +17,9 @@
  * 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 this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
  *****************************************************************************/
 
 #ifndef FT2_BITMAP_HPP
 /// Class for rendering freetype glyphs on a bitmap
 class FT2Bitmap: public GenericBitmap
 {
-    public:
-        /// Create an empty bitmap
-        FT2Bitmap( intf_thread_t *pIntf, int width, int height );
+public:
+    /// Create an empty bitmap
+    FT2Bitmap( intf_thread_t *pIntf, int width, int height );
 
-        virtual ~FT2Bitmap();
+    virtual ~FT2Bitmap();
 
-        /// Get the width of the bitmap
-        virtual int getWidth() const { return m_width; }
+    /// Get the width of the bitmap
+    virtual int getWidth() const { return m_width; }
 
-        /// Get the heighth of the bitmap
-        virtual int getHeight() const { return m_height; }
+    /// Get the heighth of the bitmap
+    virtual int getHeight() const { return m_height; }
 
-        /// Get a linear buffer containing the image data.
-        /// Each pixel is stored in 4 bytes in the order B,G,R,A
-        virtual uint8_t *getData() const { return m_pData; }
+    /// Get a linear buffer containing the image data.
+    /// Each pixel is stored in 4 bytes in the order B,G,R,A
+    virtual uint8_t *getData() const { return m_pData; }
 
-        /// Render a glyph on the bitmap at the given position
-        void draw( const FT_Bitmap &rBitmap, int left, int top,
-                   uint32_t color );
+    /// Render a glyph on the bitmap at the given position
+    void draw( const FT_Bitmap &rBitmap, int left, int top,
+               uint32_t color );
 
-    private:
-        /// Bitmap size
-        int m_width, m_height;
-        /// Image data buffer
-        uint8_t *m_pData;
+private:
+    /// Bitmap size
+    int m_width, m_height;
+    /// Image data buffer
+    uint8_t *m_pData;
 };
 
 
index b975e643bdc12516e8bb6455a5da8739586213e6..862ec6b7b2952c8be6a71cf9a47da87bedf9f308 100644 (file)
@@ -17,9 +17,9 @@
  * 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 this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
  *****************************************************************************/
 
 #ifndef FT2_FONT_HPP
@@ -39,48 +39,48 @@ class UString;
 /// Freetype2 font
 class FT2Font: public GenericFont
 {
-    public:
-        FT2Font( intf_thread_t *pIntf, const string &rName, int size );
-        virtual ~FT2Font();
+public:
+    FT2Font( intf_thread_t *pIntf, const string &rName, int size );
+    virtual ~FT2Font();
 
-        /// Initialize the object. Returns false if it failed
-        virtual bool init();
+    /// Initialize the object. Returns false if it failed
+    virtual bool init();
 
-        /// Render a string on a bitmap.
-        /// If maxWidth != -1, the text is truncated with '...'
-        virtual GenericBitmap *drawString( const UString &rString,
-            uint32_t color, int maxWidth = -1 ) const;
+    /// Render a string on a bitmap.
+    /// If maxWidth != -1, the text is truncated with '...'
+    virtual GenericBitmap *drawString( const UString &rString,
+        uint32_t color, int maxWidth = -1 ) const;
 
-        /// Get the text height
-        virtual int getSize() const { return m_height; }
+    /// Get the text height
+    virtual int getSize() const { return m_height; }
 
-    private:
-        typedef struct
-        {
-            FT_Glyph m_glyph;
-            FT_BBox m_size;
-            int m_index;
-            int m_advance;
-        } Glyph_t;
-        typedef map<uint32_t,Glyph_t> GlyphMap_t;
+private:
+    typedef struct
+    {
+        FT_Glyph m_glyph;
+        FT_BBox m_size;
+        int m_index;
+        int m_advance;
+    } Glyph_t;
+    typedef map<uint32_t,Glyph_t> GlyphMap_t;
 
-        /// File name
-        const string m_name;
-        /// Buffer to store the font
-        void *m_buffer;
-        /// Pixel size of the font
-        int m_size;
-        /// Handle to FT library
-        FT_Library m_lib;
-        /// Font face
-        FT_Face m_face;
-        /// Font metrics
-        int m_height, m_ascender, m_descender;
-        /// Glyph cache
-        mutable GlyphMap_t m_glyphCache;
+    /// File name
+    const string m_name;
+    /// Buffer to store the font
+    void *m_buffer;
+    /// Pixel size of the font
+    int m_size;
+    /// Handle to FT library
+    FT_Library m_lib;
+    /// Font face
+    FT_Face m_face;
+    /// Font metrics
+    int m_height, m_ascender, m_descender;
+    /// Glyph cache
+    mutable GlyphMap_t m_glyphCache;
 
-        /// Get the glyph corresponding to the given code
-        Glyph_t &getGlyph( uint32_t code ) const;
+    /// Get the glyph corresponding to the given code
+    Glyph_t &getGlyph( uint32_t code ) const;
 };
 
 
index b5f7736fe01ef37042f027eb9ad316ebc6154937..17fa9b9f8c9fb5b0a70eaf7d39d8338d91605b5d 100644 (file)
@@ -17,9 +17,9 @@
  * 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 this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
  *****************************************************************************/
 
 #ifndef GENERIC_BITMAP_HPP
 /// Generic interface for bitmaps
 class GenericBitmap: public SkinObject, public Box
 {
-    public:
-        virtual ~GenericBitmap() {}
+public:
+    virtual ~GenericBitmap() { }
 
-        /// Get a linear buffer containing the image data.
-        /// Each pixel is stored in 4 bytes in the order B,G,R,A
-        virtual uint8_t *getData() const = 0;
+    /// Get a linear buffer containing the image data.
+    /// Each pixel is stored in 4 bytes in the order B,G,R,A
+    virtual uint8_t *getData() const = 0;
 
-        /// Get the number of frames in the bitmap
-        int getNbFrames() const { return m_nbFrames; }
+    /// Get the number of frames in the bitmap
+    int getNbFrames() const { return m_nbFrames; }
 
-        /// Get the number of frames per second (for animated bitmaps)
-        int getFrameRate() const { return m_frameRate; }
+    /// Get the number of frames per second (for animated bitmaps)
+    int getFrameRate() const { return m_frameRate; }
 
-    protected:
-        GenericBitmap( intf_thread_t *pIntf, int nbFrames = 1, int fps = 0);
+protected:
+    GenericBitmap( intf_thread_t *pIntf, int nbFrames = 1, int fps = 0);
 
-    private:
-        /// Number of frames
-        int m_nbFrames;
-        /// Frame rate
-        int m_frameRate;
+private:
+    /// Number of frames
+    int m_nbFrames;
+    /// Frame rate
+    int m_frameRate;
 };
 
 
 /// Basic bitmap implementation
 class BitmapImpl: public GenericBitmap
 {
-    public:
-        /// Create an empty bitmap of the given size
-        BitmapImpl( intf_thread_t *pIntf, int width, int height,
-                    int nbFrames = 1, int fps = 0 );
-        ~BitmapImpl();
-
-        /// Get the width of the bitmap
-        virtual int getWidth() const { return m_width; }
-
-        /// Get the heighth of the bitmap
-        virtual int getHeight() const { return m_height; }
-
-        /// Get a linear buffer containing the image data.
-        /// Each pixel is stored in 4 bytes in the order B,G,R,A
-        virtual uint8_t *getData() const { return m_pData; }
-
-        // Copy a region of another bitmap on this bitmap
-        bool drawBitmap( const GenericBitmap &rSource, int xSrc, int ySrc,
-                         int xDest, int yDest, int width, int height );
-
-    private:
-        /// Size of the bitmap.
-        int m_width, m_height;
-        /// Buffer containing the image data.
-        uint8_t *m_pData;
+public:
+    /// Create an empty bitmap of the given size
+    BitmapImpl( intf_thread_t *pIntf, int width, int height,
+                int nbFrames = 1, int fps = 0 );
+    ~BitmapImpl();
+
+    /// Get the width of the bitmap
+    virtual int getWidth() const { return m_width; }
+
+    /// Get the heighth of the bitmap
+    virtual int getHeight() const { return m_height; }
+
+    /// Get a linear buffer containing the image data.
+    /// Each pixel is stored in 4 bytes in the order B,G,R,A
+    virtual uint8_t *getData() const { return m_pData; }
+
+    // Copy a region of another bitmap on this bitmap
+    bool drawBitmap( const GenericBitmap &rSource, int xSrc, int ySrc,
+                     int xDest, int yDest, int width, int height );
+
+private:
+    /// Size of the bitmap.
+    int m_width, m_height;
+    /// Buffer containing the image data.
+    uint8_t *m_pData;
 };
 
 
index 93f92735de8c2567f1c26beb082b4d97388f4d53..cffcef5a1e70bde7a4d798a4404ef886cfb1d5a2 100644 (file)
@@ -17,9 +17,9 @@
  * 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 this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
  *****************************************************************************/
 
 #ifndef GENERIC_FONT_HPP
@@ -34,22 +34,22 @@ class UString;
 /// Base class for fonts
 class GenericFont: public SkinObject
 {
-    public:
-        virtual ~GenericFont() {}
+public:
+    virtual ~GenericFont() { }
 
-        virtual bool init() = 0;
+    virtual bool init() = 0;
 
-        /// Render a string on a bitmap.
-        /// If maxWidth != -1, the text is truncated with '...'
-        /// The Bitmap is _not_ owned by this object
-        virtual GenericBitmap *drawString( const UString &rString,
-            uint32_t color, int maxWidth = -1 ) const = 0;
+    /// Render a string on a bitmap.
+    /// If maxWidth != -1, the text is truncated with '...'
+    /// The Bitmap is _not_ owned by this object
+    virtual GenericBitmap *drawString( const UString &rString,
+        uint32_t color, int maxWidth = -1 ) const = 0;
 
-        /// Get the font size
-        virtual int getSize() const = 0;
+    /// Get the font size
+    virtual int getSize() const = 0;
 
-    protected:
-        GenericFont( intf_thread_t *pIntf ): SkinObject( pIntf ) {}
+protected:
+    GenericFont( intf_thread_t *pIntf ): SkinObject( pIntf ) { }
 };
 
 typedef CountedPtr<GenericFont> GenericFontPtr;
index dbc3cf67f56127efe61287e9449ecf353a01d099..51eae180876be2ddde802d8fecc2d57a10ed3b0d 100644 (file)
@@ -250,11 +250,9 @@ void GenericLayout::refreshRect( int x, int y, int width, int height )
 class rect
 {
 public:
-  rect( int v_x = 0, int v_y = 0,
-          int v_width = 0, int v_height = 0 )
-     : x( v_x), y( v_y ), width( v_width), height( v_height)
-    {}
-    ~rect(){}
+    rect( int v_x = 0, int v_y = 0, int v_width = 0, int v_height = 0 )
+        : x( v_x ), y( v_y ), width( v_width ), height( v_height ) { }
+    ~rect() { }
     int x;
     int y;
     int width;
index 9e6871af221a9222a654fd038d369b4503cb9ab9..5b6f46d7ea82c3af24bbe36c9a7ed3248289e2cd 100644 (file)
@@ -17,9 +17,9 @@
  * 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 this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
  *****************************************************************************/
 
 #ifndef GENERIC_LAYOUT_HPP
@@ -43,7 +43,7 @@ class VarBoolImpl;
 struct LayeredControl
 {
     LayeredControl( CtrlGeneric *pControl, int layer ):
-        m_pControl( pControl ), m_layer( layer ) {}
+        m_pControl( pControl ), m_layer( layer ) { }
 
     /// Pointer on the control
     CtrlGeneric *m_pControl;
@@ -55,123 +55,122 @@ struct LayeredControl
 /// Base class for layouts
 class GenericLayout: public SkinObject
 {
-    public:
-        GenericLayout( intf_thread_t *pIntf, int width, int height,
-                       int minWidth, int maxWidth, int minHeight,
-                       int maxHeight );
-
-        virtual ~GenericLayout();
-
-        /// Attach the layout to a window
-        virtual void setWindow( TopWindow *pWindow );
-
-        /// Get the associated window, if any
-        virtual TopWindow *getWindow() const { return m_pWindow; }
-
-        /// Called by a control which wants to capture the mouse
-        virtual void onControlCapture( const CtrlGeneric &rCtrl );
-
-        /// Called by a control which wants to release the mouse
-        virtual void onControlRelease( const CtrlGeneric &rCtrl );
-
-        /// Refresh the window
-        virtual void refreshAll();
-
-        /// Refresh a rectangular portion of the window
-        virtual void refreshRect( int x, int y, int width, int height );
-
-        /// Get the image of the layout
-        virtual OSGraphics *getImage() const { return m_pImage; }
-
-        /// Get the position of the layout (relative to the screen)
-        /**
-         * Note: These values are different from the m_rect.getLeft() and
-         * m_rect.getTop(), which always return 0.
-         * The latter methods are there as a "root rect" for the panels and
-         * controls, since each control knows its parent rect, but returns
-         * coordinates relative to the root rect.
-         */
-        virtual int getLeft() const { return m_pWindow->getLeft(); }
-        virtual int getTop() const { return m_pWindow->getTop(); }
-
-        /// Get the size of the layout
-        virtual int getWidth() const { return m_rect.getWidth(); }
-        virtual int getHeight() const { return m_rect.getHeight(); }
-        virtual const GenericRect &getRect() const { return m_rect; }
-
-        /// Get the minimum and maximum size of the layout
-        virtual int getMinWidth() const { return m_minWidth; }
-        virtual int getMaxWidth() const { return m_maxWidth; }
-        virtual int getMinHeight() const { return m_minHeight; }
-        virtual int getMaxHeight() const { return m_maxHeight; }
-
-        /// specific refresh window (if video controls)
-        virtual void computeRefresh( int x, int y, int width, int height );
-
-        /// Resize the layout
-        virtual void resize( int width, int height );
-
-        /**
-         * Add a control in the layout at the given position, and
-         * the optional given layer
-         */
-        virtual void addControl( CtrlGeneric *pControl,
-                                 const Position &rPosition,
-                                 int layer );
-
-        /// Get the list of the controls in this layout, by layer order
-        virtual const list<LayeredControl> &getControlList() const;
-
-        /// Called by a control when its image has changed
-        /**
-         * The arguments indicate the size of the rectangle to refresh,
-         * and the offset (from the control position) of this rectangle.
-         * Use a negative width or height to refresh the layout completely
-         */
-        virtual void onControlUpdate( const CtrlGeneric &rCtrl,
-                                      int width, int height,
-                                      int xOffSet, int yOffSet );
-
-        /// Get the list of the anchors of this layout
-        virtual const list<Anchor*>& getAnchorList() const;
-
-        /// Add an anchor to this layout
-        virtual void addAnchor( Anchor *pAnchor );
-
-        /// Called when the layout is shown
-        virtual void onShow();
-
-        /// Called when the layout is hidden
-        virtual void onHide();
-
-        /// Give access to the "active layout" variable
-        // FIXME: we give read/write access
-        VarBoolImpl &getActiveVar() { return *m_pVarActive; }
-
-    private:
-        /// Parent window of the layout
-        TopWindow *m_pWindow;
-        /// Layout size
-        SkinsRect m_rect;
-        int m_minWidth, m_maxWidth;
-        int m_minHeight, m_maxHeight;
-        /// Image of the layout
-        OSGraphics *m_pImage;
-        /// List of the controls in the layout
-        list<LayeredControl> m_controlList;
-        /// Video control(s)
-        set<CtrlVideo *> m_pVideoCtrlSet;
-        /// List of the anchors in the layout
-        list<Anchor*> m_anchorList;
-        /// Flag to know if the layout is visible
-        bool m_visible;
-        /// Variable for the "active state" of the layout
-        /**
-         * Note: the layout is not an observer on this variable, because it
-         * cannot be changed externally (i.e. without an explicit change of
-         * layout). This way, we avoid using a setActiveLayoutInner method.
-         */
-        mutable VarBoolImpl *m_pVarActive;
+public:
+    GenericLayout( intf_thread_t *pIntf, int width, int height,
+                   int minWidth, int maxWidth, int minHeight, int maxHeight );
+
+    virtual ~GenericLayout();
+
+    /// Attach the layout to a window
+    virtual void setWindow( TopWindow *pWindow );
+
+    /// Get the associated window, if any
+    virtual TopWindow *getWindow() const { return m_pWindow; }
+
+    /// Called by a control which wants to capture the mouse
+    virtual void onControlCapture( const CtrlGeneric &rCtrl );
+
+    /// Called by a control which wants to release the mouse
+    virtual void onControlRelease( const CtrlGeneric &rCtrl );
+
+    /// Refresh the window
+    virtual void refreshAll();
+
+    /// Refresh a rectangular portion of the window
+    virtual void refreshRect( int x, int y, int width, int height );
+
+    /// Get the image of the layout
+    virtual OSGraphics *getImage() const { return m_pImage; }
+
+    /// Get the position of the layout (relative to the screen)
+    /**
+     * Note: These values are different from the m_rect.getLeft() and
+     * m_rect.getTop(), which always return 0.
+     * The latter methods are there as a "root rect" for the panels and
+     * controls, since each control knows its parent rect, but returns
+     * coordinates relative to the root rect.
+     */
+    virtual int getLeft() const { return m_pWindow->getLeft(); }
+    virtual int getTop() const { return m_pWindow->getTop(); }
+
+    /// Get the size of the layout
+    virtual int getWidth() const { return m_rect.getWidth(); }
+    virtual int getHeight() const { return m_rect.getHeight(); }
+    virtual const GenericRect &getRect() const { return m_rect; }
+
+    /// Get the minimum and maximum size of the layout
+    virtual int getMinWidth() const { return m_minWidth; }
+    virtual int getMaxWidth() const { return m_maxWidth; }
+    virtual int getMinHeight() const { return m_minHeight; }
+    virtual int getMaxHeight() const { return m_maxHeight; }
+
+    /// specific refresh window (if video controls)
+    virtual void computeRefresh( int x, int y, int width, int height );
+
+    /// Resize the layout
+    virtual void resize( int width, int height );
+
+    /**
+     * Add a control in the layout at the given position, and
+     * the optional given layer
+     */
+    virtual void addControl( CtrlGeneric *pControl,
+                             const Position &rPosition,
+                             int layer );
+
+    /// Get the list of the controls in this layout, by layer order
+    virtual const list<LayeredControl> &getControlList() const;
+
+    /// Called by a control when its image has changed
+    /**
+     * The arguments indicate the size of the rectangle to refresh,
+     * and the offset (from the control position) of this rectangle.
+     * Use a negative width or height to refresh the layout completely
+     */
+    virtual void onControlUpdate( const CtrlGeneric &rCtrl,
+                                  int width, int height,
+                                  int xOffSet, int yOffSet );
+
+    /// Get the list of the anchors of this layout
+    virtual const list<Anchor*>& getAnchorList() const;
+
+    /// Add an anchor to this layout
+    virtual void addAnchor( Anchor *pAnchor );
+
+    /// Called when the layout is shown
+    virtual void onShow();
+
+    /// Called when the layout is hidden
+    virtual void onHide();
+
+    /// Give access to the "active layout" variable
+    // FIXME: we give read/write access
+    VarBoolImpl &getActiveVar() { return *m_pVarActive; }
+
+private:
+    /// Parent window of the layout
+    TopWindow *m_pWindow;
+    /// Layout size
+    SkinsRect m_rect;
+    int m_minWidth, m_maxWidth;
+    int m_minHeight, m_maxHeight;
+    /// Image of the layout
+    OSGraphics *m_pImage;
+    /// List of the controls in the layout
+    list<LayeredControl> m_controlList;
+    /// Video control(s)
+    set<CtrlVideo *> m_pVideoCtrlSet;
+    /// List of the anchors in the layout
+    list<Anchor*> m_anchorList;
+    /// Flag to know if the layout is visible
+    bool m_visible;
+    /// Variable for the "active state" of the layout
+    /**
+     * Note: the layout is not an observer on this variable, because it
+     * cannot be changed externally (i.e. without an explicit change of
+     * layout). This way, we avoid using a setActiveLayoutInner method.
+     */
+    mutable VarBoolImpl *m_pVarActive;
 };
 
 
index e75b733b7fda3ab91e12375263596ea5d900be59..3f8eac00dd0ef50f227edf89cc000ddecc4ac199 100644 (file)
@@ -17,9 +17,9 @@
  * 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 this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
  *****************************************************************************/
 
 #ifndef GENERIC_WINDOW_HPP
@@ -44,93 +44,93 @@ class WindowManager;
 /// Generic window class
 class GenericWindow: public SkinObject, public Observer<VarBool>
 {
-    private:
-        friend class WindowManager;
-        friend class VoutManager;
-        friend class CtrlVideo;
-    public:
-        GenericWindow( intf_thread_t *pIntf, int xPos, int yPos,
-                       bool dragDrop, bool playOnDrop,
-                       GenericWindow *pParent = NULL );
-        virtual ~GenericWindow();
-
-        /// Methods to process OS events.
-        virtual void processEvent( EvtFocus &rEvtFocus ) {}
-        virtual void processEvent( EvtMenu &rEvtMenu ) {}
-        virtual void processEvent( EvtMotion &rEvtMotion ) {}
-        virtual void processEvent( EvtMouse &rEvtMouse ) {}
-        virtual void processEvent( EvtLeave &rEvtLeave ) {}
-        virtual void processEvent( EvtKey &rEvtKey ) {}
-        virtual void processEvent( EvtScroll &rEvtScroll ) {}
-
-        virtual void processEvent( EvtRefresh &rEvtRefresh );
-
-        /// Resize the window
-        virtual void resize( int width, int height );
-
-        /// Refresh an area of the window
-        virtual void refresh( int left, int top, int width, int height ) {}
-
-        /// Get the coordinates of the window
-        int getLeft() const { return m_left; }
-        int getTop() const { return m_top; }
-        int getWidth() const { return m_width; }
-        int getHeight() const { return m_height; }
-
-        /// Give access to the visibility variable
-        VarBool &getVisibleVar() { return *m_pVarVisible; }
-
-        /// Window type, mainly useful when overloaded (for VoutWindow)
-        virtual string getType() const { return "Generic"; }
-
-        /// windows handle
-        void* getOSHandle() const;
-
-        /// reparent
-        void setParent( GenericWindow* pParent, int x, int y, int w, int h );
-
-    protected:
-        /// Get the OS window
-        OSWindow *getOSWindow() const { return m_pOsWindow; }
-
-        /// These methods do not need to be public since they are accessed
-        /// only by the window manager or by inheritant classes.
-        //@{
-        /// Show the window
-        virtual void show() const;
-
-        /// Hide the window
-        virtual void hide() const;
-
-        /// Move the window
-        virtual void move( int left, int top );
-
-        /// Bring the window on top
-        virtual void raise() const;
-
-        /// Set the opacity of the window (0 = transparent, 255 = opaque)
-        virtual void setOpacity( uint8_t value );
-
-        /// Toggle the window on top
-        virtual void toggleOnTop( bool onTop ) const;
-        //@}
-
-        /// Actually show the window
-        virtual void innerShow();
-
-        /// Actually hide the window
-        virtual void innerHide();
-
-    private:
-        /// Window position and size
-        int m_left, m_top, m_width, m_height;
-        /// OS specific implementation
-        OSWindow *m_pOsWindow;
-        /// Variable for the visibility of the window
-        mutable VarBoolImpl *m_pVarVisible;
-
-        /// Method called when the observed variable is modified
-        virtual void onUpdate( Subject<VarBool> &rVariable , void*);
+private:
+    friend class WindowManager;
+    friend class VoutManager;
+    friend class CtrlVideo;
+public:
+    GenericWindow( intf_thread_t *pIntf, int xPos, int yPos,
+                   bool dragDrop, bool playOnDrop,
+                   GenericWindow *pParent = NULL );
+    virtual ~GenericWindow();
+
+    /// Methods to process OS events.
+    virtual void processEvent( EvtFocus &rEvtFocus ) { }
+    virtual void processEvent( EvtMenu &rEvtMenu ) { }
+    virtual void processEvent( EvtMotion &rEvtMotion ) { }
+    virtual void processEvent( EvtMouse &rEvtMouse ) { }
+    virtual void processEvent( EvtLeave &rEvtLeave ) { }
+    virtual void processEvent( EvtKey &rEvtKey ) { }
+    virtual void processEvent( EvtScroll &rEvtScroll ) { }
+
+    virtual void processEvent( EvtRefresh &rEvtRefresh );
+
+    /// Resize the window
+    virtual void resize( int width, int height );
+
+    /// Refresh an area of the window
+    virtual void refresh( int left, int top, int width, int height ) { }
+
+    /// Get the coordinates of the window
+    int getLeft() const { return m_left; }
+    int getTop() const { return m_top; }
+    int getWidth() const { return m_width; }
+    int getHeight() const { return m_height; }
+
+    /// Give access to the visibility variable
+    VarBool &getVisibleVar() { return *m_pVarVisible; }
+
+    /// Window type, mainly useful when overloaded (for VoutWindow)
+    virtual string getType() const { return "Generic"; }
+
+    /// windows handle
+    void* getOSHandle() const;
+
+    /// reparent
+    void setParent( GenericWindow* pParent, int x, int y, int w, int h );
+
+protected:
+    /// Get the OS window
+    OSWindow *getOSWindow() const { return m_pOsWindow; }
+
+    /// These methods do not need to be public since they are accessed
+    /// only by the window manager or by inheritant classes.
+    //@{
+    /// Show the window
+    virtual void show() const;
+
+    /// Hide the window
+    virtual void hide() const;
+
+    /// Move the window
+    virtual void move( int left, int top );
+
+    /// Bring the window on top
+    virtual void raise() const;
+
+    /// Set the opacity of the window (0 = transparent, 255 = opaque)
+    virtual void setOpacity( uint8_t value );
+
+    /// Toggle the window on top
+    virtual void toggleOnTop( bool onTop ) const;
+    //@}
+
+    /// Actually show the window
+    virtual void innerShow();
+
+    /// Actually hide the window
+    virtual void innerHide();
+
+private:
+    /// Window position and size
+    int m_left, m_top, m_width, m_height;
+    /// OS specific implementation
+    OSWindow *m_pOsWindow;
+    /// Variable for the visibility of the window
+    mutable VarBoolImpl *m_pVarVisible;
+
+    /// Method called when the observed variable is modified
+    virtual void onUpdate( Subject<VarBool> &rVariable , void*);
 };
 
 
index 8b2ae321bf20f6d953d31b6555dfedc058456771..59e1574108e25cedd85773008a976ebbfb828ed2 100644 (file)
@@ -16,9 +16,9 @@
  * 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 this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
  *****************************************************************************/
 
 #ifndef INI_FILE_HPP
 /// INI file parser
 class IniFile: public SkinObject
 {
-    public:
-        IniFile( intf_thread_t *pIntf, const string &rName,
-                 const string &rPath );
-        virtual ~IniFile() {}
+public:
+    IniFile( intf_thread_t *pIntf, const string &rName,
+             const string &rPath );
+    virtual ~IniFile() { }
 
-        /// Parse the INI file and fill the VarManager
-        void parseFile();
+    /// Parse the INI file and fill the VarManager
+    void parseFile();
 
-    private:
-        string m_name;
-        string m_path;
+private:
+    string m_name;
+    string m_path;
 };
 
 
index c321a915cb32f57795bfb157f700d3b08bd152ac..6f9094ccf1b2d0de8de8f03be180a071fbe04c30 100644 (file)
@@ -17,9 +17,9 @@
  * 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 this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
  *****************************************************************************/
 
 #ifndef LOGGER_HPP
 // Logger class
 class Logger: public SkinObject
 {
-    public:
-        /// Get the instance of Logger
-        /// Returns NULL if initialization failed
-        static Logger *instance( intf_thread_t *pIntf );
+public:
+    /// Get the instance of Logger
+    /// Returns NULL if initialization failed
+    static Logger *instance( intf_thread_t *pIntf );
 
-        /// Delete the instance of Logger
-        static void destroy( intf_thread_t *pIntf );
+    /// Delete the instance of Logger
+    static void destroy( intf_thread_t *pIntf );
 
-        /// Print an error message
-        void error( const string &rMsg );
+    /// Print an error message
+    void error( const string &rMsg );
 
-        /// Print a warning
-        void warn( const string &rMsg );
+    /// Print a warning
+    void warn( const string &rMsg );
 
-    private:
-        // Private because it's a singleton
-        Logger( intf_thread_t *pIntf );
-        ~Logger();
+private:
+    // Private because it's a singleton
+    Logger( intf_thread_t *pIntf );
+    ~Logger();
 };
 
 
index c16d52ef4afb996c6f6a23ee6f9fdc346278a471..d9c3e6b9e2bec7d7e8046cb250dede1836b3adca 100644 (file)
@@ -17,9 +17,9 @@
  * 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 this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
  *****************************************************************************/
 
 #ifndef OS_FACTORY_HPP
@@ -44,98 +44,98 @@ class OSTimer;
 /// Abstract factory used to instantiate OS specific objects.
 class OSFactory: public SkinObject
 {
-    public:
-        enum CursorType_t
-        {
-            kDefaultArrow,
-            kResizeNS,
-            kResizeWE,
-            kResizeNWSE,
-            kResizeNESW
-        };
+public:
+    enum CursorType_t
+    {
+        kDefaultArrow,
+        kResizeNS,
+        kResizeWE,
+        kResizeNWSE,
+        kResizeNESW
+    };
 
-        /**
-         * Initialization method overloaded in derived classes.
-         * It must return false if the init failed.
-         */
-        virtual bool init() { return true; }
+    /**
+     * Initialization method overloaded in derived classes.
+     * It must return false if the init failed.
+     */
+    virtual bool init() { return true; }
 
-        /**
-         * Get the right instance of OSFactory.
-         * Returns NULL if initialization of the concrete factory failed.
-         */
-        static OSFactory *instance( intf_thread_t *pIntf );
+    /**
+     * Get the right instance of OSFactory.
+     * Returns NULL if initialization of the concrete factory failed.
+     */
+    static OSFactory *instance( intf_thread_t *pIntf );
 
-        /// Delete the instance of OSFactory
-        static void destroy( intf_thread_t *pIntf );
+    /// Delete the instance of OSFactory
+    static void destroy( intf_thread_t *pIntf );
 
-        /// Instantiate an object OSGraphics
-        virtual OSGraphics *createOSGraphics( int width, int height ) = 0;
+    /// Instantiate an object OSGraphics
+    virtual OSGraphics *createOSGraphics( int width, int height ) = 0;
 
-        /// Get the instance of the singleton OSLoop
-        virtual OSLoop *getOSLoop() = 0;
+    /// Get the instance of the singleton OSLoop
+    virtual OSLoop *getOSLoop() = 0;
 
-        /// Destroy the instance of OSLoop
-        virtual void destroyOSLoop() = 0;
+    /// Destroy the instance of OSLoop
+    virtual void destroyOSLoop() = 0;
 
-        /// Minimize all the windows
-        virtual void minimize() = 0;
+    /// Minimize all the windows
+    virtual void minimize() = 0;
 
-        /// Restore the minimized windows
-        virtual void restore() = 0;
+    /// Restore the minimized windows
+    virtual void restore() = 0;
 
-        /// Add an icon in the system tray
-        virtual void addInTray() = 0;
+    /// Add an icon in the system tray
+    virtual void addInTray() = 0;
 
-        /// Remove the icon from the system tray
-        virtual void removeFromTray() = 0;
+    /// Remove the icon from the system tray
+    virtual void removeFromTray() = 0;
 
-        /// Show the task in the task bar
-        virtual void addInTaskBar() = 0;
+    /// Show the task in the task bar
+    virtual void addInTaskBar() = 0;
 
-        /// Remove the task from the task bar
-        virtual void removeFromTaskBar() = 0;
+    /// Remove the task from the task bar
+    virtual void removeFromTaskBar() = 0;
 
-        /// Instantiate an OSTimer with the given command
-        virtual OSTimer *createOSTimer( CmdGeneric &rCmd ) = 0;
+    /// Instantiate an OSTimer with the given command
+    virtual OSTimer *createOSTimer( CmdGeneric &rCmd ) = 0;
 
-        /// Instantiate an object OSWindow
-        virtual OSWindow *createOSWindow( GenericWindow &rWindow,
-                                          bool dragDrop, bool playOnDrop,
-                                          OSWindow *pParent ) = 0;
+    /// Instantiate an object OSWindow
+    virtual OSWindow *createOSWindow( GenericWindow &rWindow,
+                                      bool dragDrop, bool playOnDrop,
+                                      OSWindow *pParent ) = 0;
 
-        /// Instantiate an object OSTooltip
-        virtual OSTooltip *createOSTooltip() = 0;
+    /// Instantiate an object OSTooltip
+    virtual OSTooltip *createOSTooltip() = 0;
 
-        /// Instantiate an object OSPopup
-        virtual OSPopup *createOSPopup() = 0;
+    /// Instantiate an object OSPopup
+    virtual OSPopup *createOSPopup() = 0;
 
-        /// Get the directory separator
-        virtual const string &getDirSeparator() const = 0;
+    /// Get the directory separator
+    virtual const string &getDirSeparator() const = 0;
 
-        /// Get the resource path
-        virtual const list<string> &getResourcePath() const = 0;
+    /// Get the resource path
+    virtual const list<string> &getResourcePath() const = 0;
 
-        /// Get the screen size
-        virtual int getScreenWidth() const = 0;
-        virtual int getScreenHeight() const = 0;
+    /// Get the screen size
+    virtual int getScreenWidth() const = 0;
+    virtual int getScreenHeight() const = 0;
 
-        /// Get the work area (screen area without taskbars)
-        virtual SkinsRect getWorkArea() const = 0;
+    /// Get the work area (screen area without taskbars)
+    virtual SkinsRect getWorkArea() const = 0;
 
-        /// Get the position of the mouse
-        virtual void getMousePos( int &rXPos, int &rYPos ) const = 0;
+    /// Get the position of the mouse
+    virtual void getMousePos( int &rXPos, int &rYPos ) const = 0;
 
-        /// Change the cursor
-        virtual void changeCursor( CursorType_t type ) const = 0;
+    /// Change the cursor
+    virtual void changeCursor( CursorType_t type ) const = 0;
 
-        /// Delete a directory recursively
-        virtual void rmDir( const string &rPath ) = 0;
+    /// Delete a directory recursively
+    virtual void rmDir( const string &rPath ) = 0;
 
-   protected:
-        // Protected because it's a singleton
-        OSFactory( intf_thread_t* pIntf ): SkinObject( pIntf ) {}
-        virtual ~OSFactory() {}
+protected:
+    // Protected because it's a singleton
+    OSFactory( intf_thread_t* pIntf ): SkinObject( pIntf ) { }
+    virtual ~OSFactory() { }
 };
 
 
index 8d744765f79383974687d456c28e602637ca95cd..1a2342ffa2a2012ab06941fe4b6d8c4b0569db08 100644 (file)
@@ -17,9 +17,9 @@
  * 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 this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
  *****************************************************************************/
 
 #ifndef OS_GRAPHICS_HPP
@@ -36,45 +36,45 @@ class OSWindow;
 /// OS specific graphics class
 class OSGraphics: public SkinObject, public Box
 {
-    public:
-        virtual ~OSGraphics() {}
+public:
+    virtual ~OSGraphics() { }
 
-        /// Clear the graphics
-        virtual void clear() = 0;
+    /// Clear the graphics
+    virtual void clear() = 0;
 
-        /// Draw another graphics on this one
-        virtual void drawGraphics( const OSGraphics &rGraphics, int xSrc = 0,
-                                   int ySrc = 0, int xDest = 0, int yDest = 0,
-                                   int width = -1, int height = -1 ) = 0;
+    /// Draw another graphics on this one
+    virtual void drawGraphics( const OSGraphics &rGraphics, int xSrc = 0,
+                               int ySrc = 0, int xDest = 0, int yDest = 0,
+                               int width = -1, int height = -1 ) = 0;
 
-        /// Render a bitmap on this graphics
-        virtual void drawBitmap( const GenericBitmap &rBitmap, int xSrc = 0,
-                                 int ySrc = 0, int xDest = 0, int yDest = 0,
-                                 int width = -1, int height = -1,
-                                 bool blend = false) = 0;
+    /// Render a bitmap on this graphics
+    virtual void drawBitmap( const GenericBitmap &rBitmap, int xSrc = 0,
+                             int ySrc = 0, int xDest = 0, int yDest = 0,
+                             int width = -1, int height = -1,
+                             bool blend = false) = 0;
 
-        /// Draw a filled rectangle on the grahics (color is #RRGGBB)
-        virtual void fillRect( int left, int top, int width, int height,
-                               uint32_t color ) = 0;
+    /// Draw a filled rectangle on the grahics (color is #RRGGBB)
+    virtual void fillRect( int left, int top, int width, int height,
+                           uint32_t color ) = 0;
 
-        /// Draw an empty rectangle on the grahics (color is #RRGGBB)
-        virtual void drawRect( int left, int top, int width, int height,
-                               uint32_t color ) = 0;
+    /// Draw an empty rectangle on the grahics (color is #RRGGBB)
+    virtual void drawRect( int left, int top, int width, int height,
+                           uint32_t color ) = 0;
 
 
-        /// Set the shape of a window with the mask of this graphics.
-        virtual void applyMaskToWindow( OSWindow &rWindow ) = 0;
+    /// Set the shape of a window with the mask of this graphics.
+    virtual void applyMaskToWindow( OSWindow &rWindow ) = 0;
 
-        /// Copy the graphics on a window
-        virtual void copyToWindow( OSWindow &rWindow, int xSrc,
-                                   int ySrc, int width, int height,
-                                   int xDest, int yDest ) = 0;
+    /// Copy the graphics on a window
+    virtual void copyToWindow( OSWindow &rWindow, int xSrc,
+                               int ySrc, int width, int height,
+                               int xDest, int yDest ) = 0;
 
-        /// Tell whether the pixel at the given position is visible
-        virtual bool hit( int x, int y ) const = 0;
+    /// Tell whether the pixel at the given position is visible
+    virtual bool hit( int x, int y ) const = 0;
 
-    protected:
-        OSGraphics( intf_thread_t *pIntf ): SkinObject( pIntf ) {}
+protected:
+    OSGraphics( intf_thread_t *pIntf ): SkinObject( pIntf ) { }
 };
 
 typedef CountedPtr<OSGraphics> OSGraphicsPtr;
index f616a64f715a8e307a8011cf752c892ec0302584..44ef940b544ee7c36a3a7d96d602fa506553a80d 100644 (file)
@@ -17,9 +17,9 @@
  * 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 this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
  *****************************************************************************/
 
 #ifndef OS_LOOP_HPP
 /// Abstract class for the main event loop
 class OSLoop: public SkinObject
 {
-    public:
-        virtual ~OSLoop() {}
+public:
+    virtual ~OSLoop() { }
 
-        /// Enter the main loop
-        virtual void run() = 0;
+    /// Enter the main loop
+    virtual void run() = 0;
 
-        /// Exit the main loop
-        virtual void exit() = 0;
+    /// Exit the main loop
+    virtual void exit() = 0;
 
-    protected:
-        OSLoop( intf_thread_t *pIntf ): SkinObject( pIntf ) {}
+protected:
+    OSLoop( intf_thread_t *pIntf ): SkinObject( pIntf ) { }
 };
 
 
index 2e0a660f8fdb118b43c21ffb4abaded6afb44f55..c9f7eae66f4a110e3c9a1bad901103627d76e5c0 100644 (file)
@@ -17,9 +17,9 @@
  * 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 this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
  *****************************************************************************/
 
 #ifndef OS_POPUP_HPP
@@ -34,26 +34,26 @@ class OSGraphics;
 /// Base class for OS specific Popup Windows
 class OSPopup: public SkinObject
 {
-    public:
-        virtual ~OSPopup() {}
+public:
+    virtual ~OSPopup() { }
 
-        /// Show the popup menu at the given (absolute) corrdinates
-        virtual void show( int xPos, int yPos ) = 0;
+    /// Show the popup menu at the given (absolute) corrdinates
+    virtual void show( int xPos, int yPos ) = 0;
 
-        /// Hide the popup menu
-        virtual void hide() = 0;
+    /// Hide the popup menu
+    virtual void hide() = 0;
 
-        /// Append a new menu item with the given label to the popup menu
-        virtual void addItem( const string &rLabel, int pos ) = 0;
+    /// Append a new menu item with the given label to the popup menu
+    virtual void addItem( const string &rLabel, int pos ) = 0;
 
-        /// Create a dummy menu item to separate sections
-        virtual void addSeparator( int pos ) = 0;
+    /// Create a dummy menu item to separate sections
+    virtual void addSeparator( int pos ) = 0;
 
-        /// Return the position of the item identified by the given id
-        virtual int getPosFromId( int id ) const = 0;
+    /// Return the position of the item identified by the given id
+    virtual int getPosFromId( int id ) const = 0;
 
-    protected:
-        OSPopup( intf_thread_t *pIntf ): SkinObject( pIntf ) {}
+protected:
+    OSPopup( intf_thread_t *pIntf ): SkinObject( pIntf ) { }
 };
 
 #endif
index 939b76598f8475e12003daae619a0ffeabf19418..eee0ebb17b32c582b72e3fe8022559612548fa8d 100644 (file)
@@ -17,9 +17,9 @@
  * 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 this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
  *****************************************************************************/
 
 #ifndef OS_TIMER_HPP
 // Base class for OS-specific timers
 class OSTimer: public SkinObject
 {
-    public:
-        virtual ~OSTimer() {}
+public:
+    virtual ~OSTimer() { }
 
-        /// (Re)start the timer with the given delay (in ms). If oneShot is
-        /// true, stop it after the first execution of the callback.
-        virtual void start( int delay, bool oneShot ) = 0;
+    /// (Re)start the timer with the given delay (in ms). If oneShot is
+    /// true, stop it after the first execution of the callback.
+    virtual void start( int delay, bool oneShot ) = 0;
 
-        /// Stop the timer
-        virtual void stop() = 0;
+    /// Stop the timer
+    virtual void stop() = 0;
 
-    protected:
-        OSTimer( intf_thread_t *pIntf ): SkinObject( pIntf ) {}
+protected:
+    OSTimer( intf_thread_t *pIntf ): SkinObject( pIntf ) { }
 };
 
 
index c3da5a60a8086761c610bcb132d92b6a12e3afd1..0e7fe5e2878b74f0d1c60cc6cacf3adbfa50a101 100644 (file)
@@ -17,9 +17,9 @@
  * 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 this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
  *****************************************************************************/
 
 #ifndef OS_TOOLTIP_HPP
@@ -33,17 +33,17 @@ class OSGraphics;
 /// Base class for OS specific Tooltip Windows
 class OSTooltip: public SkinObject
 {
-    public:
-        virtual ~OSTooltip() {}
+public:
+    virtual ~OSTooltip() { }
 
-        /// Show the tooltip
-        virtual void show( int left, int top, OSGraphics &rText ) = 0;
+    /// Show the tooltip
+    virtual void show( int left, int top, OSGraphics &rText ) = 0;
 
-        /// Hide the tooltip
-        virtual void hide() = 0;
+    /// Hide the tooltip
+    virtual void hide() = 0;
 
-    protected:
-        OSTooltip( intf_thread_t *pIntf ): SkinObject( pIntf ) {}
+protected:
+    OSTooltip( intf_thread_t *pIntf ): SkinObject( pIntf ) { }
 };
 
 #endif
index 2b6dd6ba9fbf455e49206277da659178478cc2e1..f8af4b1bf26da76edc5405bc35fcde28840de51c 100644 (file)
@@ -17,9 +17,9 @@
  * 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 this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
  *****************************************************************************/
 
 #ifndef OS_WINDOW_HPP
@@ -34,36 +34,36 @@ class OSGraphics;
 /// OS specific delegate class for GenericWindow
 class OSWindow: public SkinObject
 {
-    public:
-        virtual ~OSWindow() {}
+public:
+    virtual ~OSWindow() { }
 
-        // Show the window
-        virtual void show() const = 0;
+    // Show the window
+    virtual void show() const = 0;
 
-        // Hide the window
-        virtual void hide() const = 0;
+    // Hide the window
+    virtual void hide() const = 0;
 
-        /// Move and resize the window
-        virtual void moveResize( int left, int top,
-                                 int width, int height ) const = 0;
+    /// Move and resize the window
+    virtual void moveResize( int left, int top,
+                             int width, int height ) const = 0;
 
-        /// Bring the window on top
-        virtual void raise() const = 0;
+    /// Bring the window on top
+    virtual void raise() const = 0;
 
-        /// Set the opacity of the window (0 = transparent, 255 = opaque)
-        virtual void setOpacity( uint8_t value ) const = 0;
+    /// Set the opacity of the window (0 = transparent, 255 = opaque)
+    virtual void setOpacity( uint8_t value ) const = 0;
 
-        /// Toggle the window on top
-        virtual void toggleOnTop( bool onTop ) const = 0;
+    /// Toggle the window on top
+    virtual void toggleOnTop( bool onTop ) const = 0;
 
-        /// getter for handler
-        virtual void* getOSHandle( ) const = 0;
+    /// getter for handler
+    virtual void* getOSHandle( ) const = 0;
 
-        /// reparent the window
-        virtual void reparent( void* OSHandle, int x, int y, int w, int h ) = 0;
+    /// reparent the window
+    virtual void reparent( void* OSHandle, int x, int y, int w, int h ) = 0;
 
-    protected:
-        OSWindow( intf_thread_t *pIntf ): SkinObject( pIntf ) {}
+protected:
+    OSWindow( intf_thread_t *pIntf ): SkinObject( pIntf ) { }
 };
 
 
index 7573976f419f914a32443709b75091e2e1ecb1d6..d9419986da0264d0ebe7ce8c961ef074eeca591c 100644 (file)
@@ -16,9 +16,9 @@
  * 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 this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
  *****************************************************************************/
 
 #ifndef POPUP_HPP
@@ -39,33 +39,33 @@ class EvtMenu;
 /// Class handling a popup menu
 class Popup: public SkinObject
 {
-    public:
-        Popup( intf_thread_t *pIntf, WindowManager &rWindowManager );
-        virtual ~Popup() {}
+public:
+    Popup( intf_thread_t *pIntf, WindowManager &rWindowManager );
+    virtual ~Popup() { }
 
-        void show( int xPos, int yPos );
-        void hide();
+    void show( int xPos, int yPos );
+    void hide();
 
-        // XXX: it would be nice to use a UString here, if X11 supports it for
-        // its menu items (Windows doesn't, unfortunately)
-        /// Insert a new menu item to the popup menu, at the position pos
-        void addItem( const string &rLabel, CmdGeneric &rCmd, int pos );
+    // XXX: it would be nice to use a UString here, if X11 supports it for
+    // its menu items (Windows doesn't, unfortunately)
+    /// Insert a new menu item to the popup menu, at the position pos
+    void addItem( const string &rLabel, CmdGeneric &rCmd, int pos );
 
-        /// Create a dummy menu item to separate sections
-        void addSeparator( int pos );
+    /// Create a dummy menu item to separate sections
+    void addSeparator( int pos );
 
-        /// Execute the action corresponding to the chosen menu item
-        void handleEvent( const EvtMenu &rEvent );
+    /// Execute the action corresponding to the chosen menu item
+    void handleEvent( const EvtMenu &rEvent );
 
-    private:
-        /// OS specific implementation
-        OSPopup *m_pOsPopup;
+private:
+    /// OS specific implementation
+    OSPopup *m_pOsPopup;
 
-        /// Window manager
-        WindowManager &m_rWindowManager;
+    /// Window manager
+    WindowManager &m_rWindowManager;
 
-        /// Actions for the menu items, indexed by the position in the menu
-        map<int, CmdGeneric *> m_actions;
+    /// Actions for the menu items, indexed by the position in the menu
+    map<int, CmdGeneric *> m_actions;
 };
 
 typedef CountedPtr<Popup> PopupPtr;
index dff4f1a8e1f93482e98c9f8d3a7ff06f52a57ebf..819fb9be7acf842ba371e14022b207aee6824455 100644 (file)
@@ -17,9 +17,9 @@
  * 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 this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
  *****************************************************************************/
 
 #ifndef SCALED_BITMAP_HPP
 /// Class for scaling bitmaps
 class ScaledBitmap: public GenericBitmap
 {
-    public:
-        /// Create a scaled bitmap from the given bitmap and size
-        ScaledBitmap( intf_thread_t *pIntf, const GenericBitmap &rBitmap,
-                      int width, int height );
+public:
+    /// Create a scaled bitmap from the given bitmap and size
+    ScaledBitmap( intf_thread_t *pIntf, const GenericBitmap &rBitmap,
+                  int width, int height );
 
-        virtual ~ScaledBitmap();
+    virtual ~ScaledBitmap();
 
-        /// Get the width of the bitmap
-        virtual int getWidth() const { return m_width; }
+    /// Get the width of the bitmap
+    virtual int getWidth() const { return m_width; }
 
-        /// Get the heighth of the bitmap
-        virtual int getHeight() const { return m_height; }
+    /// Get the heighth of the bitmap
+    virtual int getHeight() const { return m_height; }
 
-        /// Get a linear buffer containing the image data.
-        /// Each pixel is stored in 4 bytes in the order B,G,R,A
-        virtual uint8_t *getData() const { return m_pData; }
+    /// Get a linear buffer containing the image data.
+    /// Each pixel is stored in 4 bytes in the order B,G,R,A
+    virtual uint8_t *getData() const { return m_pData; }
 
-    private:
-        /// Bitmap size
-        int m_width, m_height;
-        /// Image data buffer
-        uint8_t *m_pData;
+private:
+    /// Bitmap size
+    int m_width, m_height;
+    /// Image data buffer
+    uint8_t *m_pData;
 };
 
 
index 70ef4bad4b97a94a8a5d9ba404373a58a35c74af..9c92e441635c5c25ede19d92f9802158fa1f3992 100644 (file)
@@ -17,9 +17,9 @@
  * 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 this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
  *****************************************************************************/
 
 #ifdef HAVE_CONFIG_H
@@ -158,16 +158,16 @@ struct intf_sys_t
 /// Base class for all skin classes
 class SkinObject
 {
-    public:
-        SkinObject( intf_thread_t *pIntf ): m_pIntf( pIntf ) {}
-        virtual ~SkinObject() {}
+public:
+    SkinObject( intf_thread_t *pIntf ): m_pIntf( pIntf ) { }
+    virtual ~SkinObject() { }
 
-        /// Getter (public because it is used in C callbacks in the win32
-        /// interface)
-        intf_thread_t *getIntf() const { return m_pIntf; }
+    /// Getter (public because it is used in C callbacks in the win32
+    /// interface)
+    intf_thread_t *getIntf() const { return m_pIntf; }
 
-    private:
-        intf_thread_t *m_pIntf;
+private:
+    intf_thread_t *m_pIntf;
 };
 
 
index bcad169a2e01771be071f261ead32150caefd972..8d11773792d8ef3f647e79a2821c0c23b7438527 100644 (file)
@@ -17,9 +17,9 @@
  * 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 this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
  *****************************************************************************/
 
 #ifndef THEME_HPP
@@ -45,50 +45,50 @@ class Interpreter;
 /// Class storing the data of the current theme
 class Theme: public SkinObject
 {
-    private:
-        friend class Builder;
-        friend class Interpreter;
-    public:
-        Theme( intf_thread_t *pIntf ): SkinObject( pIntf ),
-            m_windowManager( getIntf() ) {}
-        virtual ~Theme();
+private:
+    friend class Builder;
+    friend class Interpreter;
+public:
+    Theme( intf_thread_t *pIntf ): SkinObject( pIntf ),
+        m_windowManager( getIntf() ) { }
+    virtual ~Theme();
 
-        void loadConfig();
-        void saveConfig();
+    void loadConfig();
+    void saveConfig();
 
-        GenericBitmap *getBitmapById( const string &id ) const;
-        GenericFont *getFontById( const string &id ) const;
-        Popup *getPopupById( const string &id ) const;
-        TopWindow *getWindowById( const string &id ) const;
-        GenericLayout *getLayoutById( const string &id ) const;
-        CtrlGeneric *getControlById( const string &id ) const;
-        Position *getPositionById( const string &id ) const;
+    GenericBitmap *getBitmapById( const string &id ) const;
+    GenericFont *getFontById( const string &id ) const;
+    Popup *getPopupById( const string &id ) const;
+    TopWindow *getWindowById( const string &id ) const;
+    GenericLayout *getLayoutById( const string &id ) const;
+    CtrlGeneric *getControlById( const string &id ) const;
+    Position *getPositionById( const string &id ) const;
 
-        WindowManager &getWindowManager() { return m_windowManager; }
+    WindowManager &getWindowManager() { return m_windowManager; }
 
-    private:
-        /// Store the bitmaps by ID
-        map<string, GenericBitmapPtr> m_bitmaps;
-        /// Store the fonts by ID
-        map<string, GenericFontPtr> m_fonts;
-        /// Store the popups by ID
-        map<string, PopupPtr> m_popups;
-        /// Store the windows by ID
-        map<string, TopWindowPtr> m_windows;
-        /// Store the layouts by ID
-        map<string, GenericLayoutPtr> m_layouts;
-        /// Store the controls by ID
-        map<string, CtrlGenericPtr> m_controls;
-        /// Store the panel positions by ID
-        map<string, PositionPtr> m_positions;
-        /// Store the commands
-        list<CmdGenericPtr> m_commands;
-        /// Store the Bezier curves
-        list<BezierPtr> m_curves;
-        /// Store the variables
-        list<VariablePtr> m_vars;
+private:
+    /// Store the bitmaps by ID
+    map<string, GenericBitmapPtr> m_bitmaps;
+    /// Store the fonts by ID
+    map<string, GenericFontPtr> m_fonts;
+    /// Store the popups by ID
+    map<string, PopupPtr> m_popups;
+    /// Store the windows by ID
+    map<string, TopWindowPtr> m_windows;
+    /// Store the layouts by ID
+    map<string, GenericLayoutPtr> m_layouts;
+    /// Store the controls by ID
+    map<string, CtrlGenericPtr> m_controls;
+    /// Store the panel positions by ID
+    map<string, PositionPtr> m_positions;
+    /// Store the commands
+    list<CmdGenericPtr> m_commands;
+    /// Store the Bezier curves
+    list<BezierPtr> m_curves;
+    /// Store the variables
+    list<VariablePtr> m_vars;
 
-        WindowManager m_windowManager;
+    WindowManager m_windowManager;
 };
 
 
index 42e69cfa0844e1fa0c5db08a76435cc85caa1b55..52457d116ec1e6256b16b7a01dedde9ceaadedf6 100644 (file)
@@ -17,9 +17,9 @@
  * 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 this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
  *****************************************************************************/
 
 #ifndef THEME_LOADER_HPP
 
 class ThemeLoader: public SkinObject
 {
-    public:
-        ThemeLoader( intf_thread_t *pIntf ): SkinObject( pIntf ) {}
-        virtual ~ThemeLoader() {}
+public:
+    ThemeLoader( intf_thread_t *pIntf ): SkinObject( pIntf ) { }
+    virtual ~ThemeLoader() { }
 
-        /// The expected fileName must be an UTF-8 string
-        bool load( const string &fileName );
+    /// The expected fileName must be an UTF-8 string
+    bool load( const string &fileName );
 
-    private:
+private:
 #if defined( HAVE_ZLIB_H )
-        /// Extract files from an archive (handles tar.gz and zip)
-        /**
-         * Expects a string from the current locale.
-         */
-        bool extract( const string &fileName );
+    /// Extract files from an archive (handles tar.gz and zip)
+    /**
+     * Expects a string from the current locale.
+     */
+    bool extract( const string &fileName );
 
-        /// Extract files from a tar.gz archive
-        /**
-         * Expects strings from the current locale.
-         */
-        bool extractTarGz( const string &tarFile, const string &rootDir );
+    /// Extract files from a tar.gz archive
+    /**
+     * Expects strings from the current locale.
+     */
+    bool extractTarGz( const string &tarFile, const string &rootDir );
 
-        /// Extract files from a .zip archive
-        /**
-         * Expects strings from the current locale.
-         */
-        bool extractZip( const string &zipFile, const string &rootDir );
+    /// Extract files from a .zip archive
+    /**
+     * Expects strings from the current locale.
+     */
+    bool extractZip( const string &zipFile, const string &rootDir );
 
-        /// Extract the current file from a .zip archive
-        /**
-         * Expects a string from the current locale.
-         */
-        bool extractFileInZip( unzFile file, const string &rootDir );
+    /// Extract the current file from a .zip archive
+    /**
+     * Expects a string from the current locale.
+     */
+    bool extractFileInZip( unzFile file, const string &rootDir );
 
-        /// Clean up the temporary files created by the extraction
-        /**
-         * Expects a string from the current locale.
-         */
-        void deleteTempFiles( const string &path );
+    /// Clean up the temporary files created by the extraction
+    /**
+     * Expects a string from the current locale.
+     */
+    void deleteTempFiles( const string &path );
 #endif
 
-        /// Parse the XML file given as a parameter and build the skin
-        /**
-         * Expects UTF8 strings
-         */
-        bool parse( const string &path, const string &xmlFile );
+    /// Parse the XML file given as a parameter and build the skin
+    /**
+     * Expects UTF8 strings
+     */
+    bool parse( const string &path, const string &xmlFile );
 
-        /// Recursively look for the XML file from rootDir.
-        /**
-         * The first corresponding file found will be chosen and themeFilePath
-         * will be updated accordingly.
-         * The method returns true if a theme file was found, false otherwise.
-         * rootDir and rFilename must both be strings in the current locale,
-         * whereas themeFilePath will be in UTF8.
-         */
-        bool findFile( const string &rootDir, const string &rFileName,
-                       string &themeFilePath );
+    /// Recursively look for the XML file from rootDir.
+    /**
+     * The first corresponding file found will be chosen and themeFilePath
+     * will be updated accordingly.
+     * The method returns true if a theme file was found, false otherwise.
+     * rootDir and rFilename must both be strings in the current locale,
+     * whereas themeFilePath will be in UTF8.
+     */
+    bool findFile( const string &rootDir, const string &rFileName,
+                   string &themeFilePath );
 
-        /// Get the base path of a file
-        string getFilePath( const string &rFullPath );
+    /// Get the base path of a file
+    string getFilePath( const string &rFullPath );
 
-        /// Replace '/' separators by the actual separator of the OS
-        string fixDirSeparators( const string &rPath );
+    /// Replace '/' separators by the actual separator of the OS
+    string fixDirSeparators( const string &rPath );
 };
 
 #endif
index c374bb58f5475bb075009d70f7e04d9449f6c225..bacc0e0ace8489622bed502f118310362275fdd6 100644 (file)
@@ -16,9 +16,9 @@
  * 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 this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
  *****************************************************************************/
 
 #ifndef THEME_REPOSITORY_HPP
 /// Singleton object handling the list of available themes
 class ThemeRepository: public SkinObject
 {
-    public:
-        /// Get the instance of ThemeRepository
-        /// Returns NULL if the initialization of the object failed
-        static ThemeRepository *instance( intf_thread_t *pIntf );
-
-        /// Delete the instance of ThemeRepository
-        static void destroy( intf_thread_t *pIntf );
-
-    protected:
-        // Protected because it is a singleton
-        ThemeRepository( intf_thread_t *pIntf );
-        virtual ~ThemeRepository();
-
-    private:
-
-        /// Look for themes in a directory
-        void parseDirectory( const string &rDir );
-
-        /// Callback for menu item selection
-        static int changeSkin( vlc_object_t *pThis, char const *pVariable,
-                               vlc_value_t oldval, vlc_value_t newval,
-                               void *pData );
+public:
+    /// Get the instance of ThemeRepository
+    /// Returns NULL if the initialization of the object failed
+    static ThemeRepository *instance( intf_thread_t *pIntf );
+
+    /// Delete the instance of ThemeRepository
+    static void destroy( intf_thread_t *pIntf );
+
+protected:
+    // Protected because it is a singleton
+    ThemeRepository( intf_thread_t *pIntf );
+    virtual ~ThemeRepository();
+
+private:
+    /// Look for themes in a directory
+    void parseDirectory( const string &rDir );
+
+    /// Callback for menu item selection
+    static int changeSkin( vlc_object_t *pThis, char const *pVariable,
+                           vlc_value_t oldval, vlc_value_t newval,
+                           void *pData );
 };
 
 
index eb57d007e72444dc7d83152403bbb251e21c8d41..b50f540c7d03161bc14c9ba59944858f7766b72b 100644 (file)
@@ -17,9 +17,9 @@
  * 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 this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
  *****************************************************************************/
 
 #ifndef TOOLTIP_HPP
@@ -37,44 +37,44 @@ class UString;
 
 class Tooltip: public SkinObject, public Observer<VarText>
 {
-    public:
-        /// Create a tooltip with the given font and delay (in milliseconds)
-        Tooltip( intf_thread_t *pIntf, const GenericFont &rFont, int delay );
+public:
+    /// Create a tooltip with the given font and delay (in milliseconds)
+    Tooltip( intf_thread_t *pIntf, const GenericFont &rFont, int delay );
 
-        virtual ~Tooltip();
+    virtual ~Tooltip();
 
-        /// Draw the tooltip and show it after the delay
-        void show();
+    /// Draw the tooltip and show it after the delay
+    void show();
 
-        /// Hide the tooltip and cancel the timer if a tooltip is waiting for
-        /// display
-        void hide();
+    /// Hide the tooltip and cancel the timer if a tooltip is waiting for
+    /// display
+    void hide();
 
-    private:
-        /// Font
-        const GenericFont &m_rFont;
-        /// Delay before popping the tooltip
-        int m_delay;
-        /// Timer to wait before showing the tooltip
-        OSTimer *m_pTimer;
-        /// OS specific tooltip window
-        OSTooltip *m_pOsTooltip;
-        /// Image of the tooltip
-        OSGraphics *m_pImage;
-        /// Position of the tooltip
-        int m_xPos, m_yPos;
+private:
+    /// Font
+    const GenericFont &m_rFont;
+    /// Delay before popping the tooltip
+    int m_delay;
+    /// Timer to wait before showing the tooltip
+    OSTimer *m_pTimer;
+    /// OS specific tooltip window
+    OSTooltip *m_pOsTooltip;
+    /// Image of the tooltip
+    OSGraphics *m_pImage;
+    /// Position of the tooltip
+    int m_xPos, m_yPos;
 
-        /// Method called when the observed variable is modified
-        virtual void onUpdate( Subject<VarText> &rVariable, void * );
+    /// Method called when the observed variable is modified
+    virtual void onUpdate( Subject<VarText> &rVariable, void * );
 
-        /// Display text of the tooltip
-        void displayText( const UString &rText );
+    /// Display text of the tooltip
+    void displayText( const UString &rText );
 
-        /// Build m_pImage with the given text
-        void makeImage( const UString &rText );
+    /// Build m_pImage with the given text
+    void makeImage( const UString &rText );
 
-        /// Callback to show the tooltip window
-        DEFINE_CALLBACK( Tooltip, Show );
+    /// Callback to show the tooltip window
+    DEFINE_CALLBACK( Tooltip, Show );
 };
 
 
index 2f06dd2d052363476c932d6dd97a864a6b18e958..653e41525715994a8c9af613c1d017a908da3a2e 100644 (file)
@@ -17,9 +17,9 @@
  * 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 this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
  *****************************************************************************/
 
 #ifndef TOP_WINDOW_HPP
@@ -39,96 +39,96 @@ class WindowManager;
 /// Class to handle top-level windows
 class TopWindow: public GenericWindow
 {
-    private:
-        friend class WindowManager;
-    public:
-        TopWindow( intf_thread_t *pIntf, int xPos, int yPos,
-                   WindowManager &rWindowManager,
-                   bool dragDrop, bool playOnDrop, bool visible );
-        virtual ~TopWindow();
-
-        /// Methods to process OS events.
-        virtual void processEvent( EvtRefresh &rEvtRefresh );
-        virtual void processEvent( EvtFocus &rEvtFocus );
-        virtual void processEvent( EvtMenu &rEvtMenu );
-        virtual void processEvent( EvtMotion &rEvtMotion );
-        virtual void processEvent( EvtMouse &rEvtMouse );
-        virtual void processEvent( EvtLeave &rEvtLeave );
-        virtual void processEvent( EvtKey &rEvtKey );
-        virtual void processEvent( EvtScroll &rEvtScroll );
-
-        /// Forward an event to a control
-        virtual void forwardEvent( EvtGeneric &rEvt, CtrlGeneric &rCtrl );
-
-        // Refresh an area of the window
-        virtual void refresh( int left, int top, int width, int height );
-
-        /// Get the active layout
-        virtual const GenericLayout& getActiveLayout() const;
-
-        /// Update the shape of the window from the active layout
-        virtual void updateShape();
-
-        /// Called by a control that wants to capture the mouse
-        virtual void onControlCapture( const CtrlGeneric &rCtrl );
-
-        /// Called by a control that wants to release the mouse
-        virtual void onControlRelease( const CtrlGeneric &rCtrl );
-
-        /// Called by a control when its tooltip changed
-        virtual void onTooltipChange( const CtrlGeneric &rCtrl );
-
-        /// Get the "maximized" variable
-        VarBool &getMaximizedVar() { return *m_pVarMaximized; }
-
-        /// Get the initial visibility status
-        bool isVisible() const { return m_visible; }
-
-    protected:
-        /// Actually show the window
-        virtual void innerShow();
-
-        /// Actually hide the window
-        virtual void innerHide();
-
-    private:
-        /**
-         * These methods are only used by the window manager
-         */
-        //@{
-        /// Change the active layout
-        virtual void setActiveLayout( GenericLayout *pLayout );
-        //@}
-
-        /// Initial visibility status
-        bool m_visible;
-        /// Window manager
-        WindowManager &m_rWindowManager;
-        /// Current active layout of the window
-        GenericLayout *m_pActiveLayout;
-        /// Last control on which the mouse was over
-        CtrlGeneric *m_pLastHitControl;
-        /// Control that has captured the mouse
-        CtrlGeneric *m_pCapturingControl;
-        /// Control that has the focus
-        CtrlGeneric *m_pFocusControl;
-        /// Current key modifier (also used for mouse)
-        int m_currModifier;
-
-        /// Variable for the visibility of the window
-        VarBoolImpl *m_pVarMaximized;
-
-        /**
-         * Find the uppest control in the layout hit by the mouse, and send
-         * it an enter event if needed
-         */
-        CtrlGeneric *findHitControl( int xPos, int yPos );
-
-        /**
-         * Update the lastHitControl pointer and send a leave event to the
-         * right control
-         */
-        void setLastHit( CtrlGeneric *pNewHitControl );
+private:
+    friend class WindowManager;
+public:
+    TopWindow( intf_thread_t *pIntf, int xPos, int yPos,
+               WindowManager &rWindowManager,
+               bool dragDrop, bool playOnDrop, bool visible );
+    virtual ~TopWindow();
+
+    /// Methods to process OS events.
+    virtual void processEvent( EvtRefresh &rEvtRefresh );
+    virtual void processEvent( EvtFocus &rEvtFocus );
+    virtual void processEvent( EvtMenu &rEvtMenu );
+    virtual void processEvent( EvtMotion &rEvtMotion );
+    virtual void processEvent( EvtMouse &rEvtMouse );
+    virtual void processEvent( EvtLeave &rEvtLeave );
+    virtual void processEvent( EvtKey &rEvtKey );
+    virtual void processEvent( EvtScroll &rEvtScroll );
+
+    /// Forward an event to a control
+    virtual void forwardEvent( EvtGeneric &rEvt, CtrlGeneric &rCtrl );
+
+    // Refresh an area of the window
+    virtual void refresh( int left, int top, int width, int height );
+
+    /// Get the active layout
+    virtual const GenericLayout& getActiveLayout() const;
+
+    /// Update the shape of the window from the active layout
+    virtual void updateShape();
+
+    /// Called by a control that wants to capture the mouse
+    virtual void onControlCapture( const CtrlGeneric &rCtrl );
+
+    /// Called by a control that wants to release the mouse
+    virtual void onControlRelease( const CtrlGeneric &rCtrl );
+
+    /// Called by a control when its tooltip changed
+    virtual void onTooltipChange( const CtrlGeneric &rCtrl );
+
+    /// Get the "maximized" variable
+    VarBool &getMaximizedVar() { return *m_pVarMaximized; }
+
+    /// Get the initial visibility status
+    bool isVisible() const { return m_visible; }
+
+protected:
+    /// Actually show the window
+    virtual void innerShow();
+
+    /// Actually hide the window
+    virtual void innerHide();
+
+private:
+    /**
+     * These methods are only used by the window manager
+     */
+    //@{
+    /// Change the active layout
+    virtual void setActiveLayout( GenericLayout *pLayout );
+    //@}
+
+    /// Initial visibility status
+    bool m_visible;
+    /// Window manager
+    WindowManager &m_rWindowManager;
+    /// Current active layout of the window
+    GenericLayout *m_pActiveLayout;
+    /// Last control on which the mouse was over
+    CtrlGeneric *m_pLastHitControl;
+    /// Control that has captured the mouse
+    CtrlGeneric *m_pCapturingControl;
+    /// Control that has the focus
+    CtrlGeneric *m_pFocusControl;
+    /// Current key modifier (also used for mouse)
+    int m_currModifier;
+
+    /// Variable for the visibility of the window
+    VarBoolImpl *m_pVarMaximized;
+
+    /**
+     * Find the uppest control in the layout hit by the mouse, and send
+     * it an enter event if needed
+     */
+    CtrlGeneric *findHitControl( int xPos, int yPos );
+
+    /**
+     * Update the lastHitControl pointer and send a leave event to the
+     * right control
+     */
+    void setLastHit( CtrlGeneric *pNewHitControl );
 };
 
 typedef CountedPtr<TopWindow> TopWindowPtr;
index 18f5209453732b8da1f35e1526d50bfeebb37351..1e49aac154c99c89a2026054c9d3d769f9a46c5f 100644 (file)
@@ -17,9 +17,9 @@
  * 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 this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
  *****************************************************************************/
 
 #ifndef VAR_MANAGER_HPP
 
 class VarManager: public SkinObject
 {
-    public:
-        /// Get the instance of VarManager
-        static VarManager *instance( intf_thread_t *pIntf );
-
-        /// Delete the instance of VarManager
-        static void destroy( intf_thread_t *pIntf );
-
-        /// Register a named variable in the manager
-        void registerVar( const VariablePtr &rcVar, const string &rName );
-
-        /// Register an anonymous variable in the manager
-        void registerVar( const VariablePtr &rcVar );
-
-        /// Get a variable by its name (NULL if not found)
-        Variable *getVar( const string &rName );
-
-        /// Get a variable by its name and check the type (NULL if not found)
-        Variable *getVar( const string &rName, const string &rType );
-
-        /// Get the tooltip text variable
-        VarText &getTooltipText() { return *m_pTooltipText; }
-
-        /// Get the help text variable
-        VarText &getHelpText() { return *m_pHelpText; }
-
-        /// Register a constant value
-        void registerConst( const string &rName, const string &rValue);
-
-        /// Get a constant value by its name
-        string getConst( const string &rName );
-
-    private:
-        /// Tooltip text
-        VarText *m_pTooltipText;
-        /// Help text
-        VarText *m_pHelpText;
-        /// Map of named registered variables
-        map<string, VariablePtr> m_varMap;
-        /// List of named registed variables
-        list<string> m_varList;
-        /// List of anonymous registed variables
-        list<VariablePtr> m_anonVarList;
-        /// Map of constant values
-        map<string, string> m_constMap;
-
-        /// Private because it is a singleton
-        VarManager( intf_thread_t *pIntf );
-        virtual ~VarManager();
+public:
+    /// Get the instance of VarManager
+    static VarManager *instance( intf_thread_t *pIntf );
+
+    /// Delete the instance of VarManager
+    static void destroy( intf_thread_t *pIntf );
+
+    /// Register a named variable in the manager
+    void registerVar( const VariablePtr &rcVar, const string &rName );
+
+    /// Register an anonymous variable in the manager
+    void registerVar( const VariablePtr &rcVar );
+
+    /// Get a variable by its name (NULL if not found)
+    Variable *getVar( const string &rName );
+
+    /// Get a variable by its name and check the type (NULL if not found)
+    Variable *getVar( const string &rName, const string &rType );
+
+    /// Get the tooltip text variable
+    VarText &getTooltipText() { return *m_pTooltipText; }
+
+    /// Get the help text variable
+    VarText &getHelpText() { return *m_pHelpText; }
+
+    /// Register a constant value
+    void registerConst( const string &rName, const string &rValue);
+
+    /// Get a constant value by its name
+    string getConst( const string &rName );
+
+private:
+    /// Tooltip text
+    VarText *m_pTooltipText;
+    /// Help text
+    VarText *m_pHelpText;
+    /// Map of named registered variables
+    map<string, VariablePtr> m_varMap;
+    /// List of named registed variables
+    list<string> m_varList;
+    /// List of anonymous registed variables
+    list<VariablePtr> m_anonVarList;
+    /// Map of constant values
+    map<string, string> m_constMap;
+
+    /// Private because it is a singleton
+    VarManager( intf_thread_t *pIntf );
+    virtual ~VarManager();
 };
 
 
index 81565775b2a5da56d0bdc8bed5a132695ce8e1c8..2fabfac474fb6a3d1fa1a531404cfbed0797da08 100644 (file)
@@ -17,9 +17,9 @@
  * 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 this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
  *****************************************************************************/
 
 #ifndef VLCPROC_HPP
@@ -48,187 +48,172 @@ struct vout_window_t;
 /// Singleton object handling VLC internal state and playlist
 class VlcProc: public SkinObject
 {
-    public:
-        /// Get the instance of VlcProc
-        /// Returns NULL if the initialization of the object failed
-        static VlcProc *instance( intf_thread_t *pIntf );
-
-        /// Delete the instance of VlcProc
-        static void destroy( intf_thread_t *pIntf );
-
-        /// Getter for the playtree variable
-        Playtree &getPlaytreeVar() { return *((Playtree*)m_cPlaytree.get()); }
-
-        /// Getter for the time variable
-        StreamTime &getTimeVar() { return *((StreamTime*)(m_cVarTime.get())); }
-
-        /// Getter for the volume variable
-        Volume &getVolumeVar() { return *((Volume*)(m_cVarVolume.get())); }
-
-        /// Getter for the stream name variable
-        VarText &getStreamNameVar()
-           { return *((VarText*)(m_cVarStreamName.get())); }
-
-        /// Getter for the stream URI variable
-        VarText &getStreamURIVar()
-            { return *((VarText*)(m_cVarStreamURI.get())); }
-
-        /// Getter for the stream bitrate variable
-        VarText &getStreamBitRateVar()
-            { return *((VarText*)(m_cVarStreamBitRate.get())); }
-
-        /// Getter for the stream sample rate variable
-        VarText &getStreamSampleRateVar()
-            { return *((VarText*)(m_cVarStreamSampleRate.get())); }
-
-        /// Getter for the vout size variable
-        VarBox &getVoutSizeVar() { return m_varVoutSize; }
-
-        /// Indicate whether the embedded video output is currently used
-        bool isVoutUsed() const { return m_pVout != NULL; }
-
-        /// update equalizer
-        void update_equalizer( );
-
-        void on_item_current_changed( vlc_object_t* p_obj, vlc_value_t newVal );
-        void on_intf_event_changed( vlc_object_t* p_obj, vlc_value_t newVal );
-        void on_bit_rate_changed( vlc_object_t* p_obj, vlc_value_t newVal );
-        void on_sample_rate_changed( vlc_object_t* p_obj, vlc_value_t newVal );
-        void on_can_record_changed( vlc_object_t* p_obj, vlc_value_t newVal );
-
-        void on_random_changed( vlc_object_t* p_obj, vlc_value_t newVal );
-        void on_loop_changed( vlc_object_t* p_obj, vlc_value_t newVal );
-        void on_repeat_changed( vlc_object_t* p_obj, vlc_value_t newVal );
-
-        void on_volume_changed( vlc_object_t* p_obj, vlc_value_t newVal );
-        void on_audio_filter_changed( vlc_object_t* p_obj, vlc_value_t newVal );
-
-    protected:
-        // Protected because it is a singleton
-        VlcProc( intf_thread_t *pIntf );
-        virtual ~VlcProc();
-
-    private:
-        /// Timer to call manage() regularly (via doManage())
-        OSTimer *m_pTimer;
-        /// Playtree variable
-        VariablePtr m_cPlaytree;
-        VariablePtr m_cVarRandom;
-        VariablePtr m_cVarLoop;
-        VariablePtr m_cVarRepeat;
-        /// Variable for current position of the stream
-        VariablePtr m_cVarTime;
-        /// Variable for audio volume
-        VariablePtr m_cVarVolume;
-        /// Variable for current stream properties
-        VariablePtr m_cVarStreamName;
-        VariablePtr m_cVarStreamURI;
-        VariablePtr m_cVarStreamBitRate;
-        VariablePtr m_cVarStreamSampleRate;
-        /// Variable for the "mute" state
-        VariablePtr m_cVarMute;
-        /// Variables related to the input
-        VariablePtr m_cVarPlaying;
-        VariablePtr m_cVarStopped;
-        VariablePtr m_cVarPaused;
-        VariablePtr m_cVarSeekable;
-        VariablePtr m_cVarRecordable;
-        VariablePtr m_cVarRecording;
-        /// Variables related to the vout
-        VariablePtr m_cVarFullscreen;
-        VarBox m_varVoutSize;
-        VariablePtr m_cVarHasVout;
-        /// Variables related to audio
-        VariablePtr m_cVarHasAudio;
-        /// Equalizer variables
-        EqualizerBands m_varEqBands;
-        VariablePtr m_cVarEqPreamp;
-        VariablePtr m_cVarEqualizer;
-        /// Variable for DVD detection
-        VariablePtr m_cVarDvdActive;
-
-        /// Vout thread
-        vout_thread_t *m_pVout;
-        /// Audio output
-        aout_instance_t *m_pAout;
-        bool m_bEqualizer_started;
-
-        /**
-         * Poll VLC internals to update the status (volume, current time in
-         * the stream, current filename, play/pause/stop status, ...)
-         * This function should be called regurlarly, since there is no
-         * callback mechanism (yet?) to automatically update a variable when
-         * the internal status changes
-         */
-        void manage();
-
-        // reset variables when input is over
-        void reset_input();
-
-        // init variables (libvlc and playlist levels)
-        void init_variables();
-
-        /// Define the command that calls manage()
-        DEFINE_CALLBACK( VlcProc, Manage );
-
-        /// Update the stream name variable
-        void updateStreamName();
-
-        /// Callback for intf-change variable
-        static int onIntfChange( vlc_object_t *pObj, const char *pVariable,
-                                 vlc_value_t oldVal, vlc_value_t newVal,
-                                 void *pParam );
-
-        /// Callback for intf-show variable
-        static int onIntfShow( vlc_object_t *pObj, const char *pVariable,
-                               vlc_value_t oldVal, vlc_value_t newVal,
-                               void *pParam );
-
-        /// Callback for input-current variable
-        static int onInputNew( vlc_object_t *pObj, const char *pVariable,
-                               vlc_value_t oldVal, vlc_value_t newVal,
-                               void *pParam );
-
-        /// Callback for item-change variable
-        static int onItemChange( vlc_object_t *pObj, const char *pVariable,
-                                 vlc_value_t oldVal, vlc_value_t newVal,
-                                 void *pParam );
-
-        /// Callback for item-change variable
-        static int onItemAppend( vlc_object_t *pObj, const char *pVariable,
-                                 vlc_value_t oldVal, vlc_value_t newVal,
-                                 void *pParam );
-
-        /// Callback for item-change variable
-        static int onItemDelete( vlc_object_t *pObj, const char *pVariable,
-                                 vlc_value_t oldVal, vlc_value_t newVal,
-                                 void *pParam );
-
-        /// Callback for skins2-to-load variable
-        static int onSkinToLoad( vlc_object_t *pObj, const char *pVariable,
-                                 vlc_value_t oldVal, vlc_value_t newVal,
-                                 void *pParam );
-
-        /// Callback for interaction variable
-        static int onInteraction( vlc_object_t *pObj, const char *pVariable,
+public:
+    /// Get the instance of VlcProc
+    /// Returns NULL if the initialization of the object failed
+    static VlcProc *instance( intf_thread_t *pIntf );
+
+    /// Delete the instance of VlcProc
+    static void destroy( intf_thread_t *pIntf );
+
+    /// Getter for the playtree variable
+    Playtree &getPlaytreeVar() { return *((Playtree*)m_cPlaytree.get()); }
+
+    /// Getter for the time variable
+    StreamTime &getTimeVar() { return *((StreamTime*)(m_cVarTime.get())); }
+
+    /// Getter for the volume variable
+    Volume &getVolumeVar() { return *((Volume*)(m_cVarVolume.get())); }
+
+    /// Getter for the stream name variable
+    VarText &getStreamNameVar()
+       { return *((VarText*)(m_cVarStreamName.get())); }
+
+    /// Getter for the stream URI variable
+    VarText &getStreamURIVar()
+        { return *((VarText*)(m_cVarStreamURI.get())); }
+
+    /// Getter for the stream bitrate variable
+    VarText &getStreamBitRateVar()
+        { return *((VarText*)(m_cVarStreamBitRate.get())); }
+
+    /// Getter for the stream sample rate variable
+    VarText &getStreamSampleRateVar()
+        { return *((VarText*)(m_cVarStreamSampleRate.get())); }
+
+    /// Getter for the vout size variable
+    VarBox &getVoutSizeVar() { return m_varVoutSize; }
+
+    /// Indicate whether the embedded video output is currently used
+    bool isVoutUsed() const { return m_pVout != NULL; }
+
+    /// update equalizer
+    void update_equalizer( );
+
+    void on_item_current_changed( vlc_object_t* p_obj, vlc_value_t newVal );
+    void on_intf_event_changed( vlc_object_t* p_obj, vlc_value_t newVal );
+    void on_bit_rate_changed( vlc_object_t* p_obj, vlc_value_t newVal );
+    void on_sample_rate_changed( vlc_object_t* p_obj, vlc_value_t newVal );
+    void on_can_record_changed( vlc_object_t* p_obj, vlc_value_t newVal );
+
+    void on_random_changed( vlc_object_t* p_obj, vlc_value_t newVal );
+    void on_loop_changed( vlc_object_t* p_obj, vlc_value_t newVal );
+    void on_repeat_changed( vlc_object_t* p_obj, vlc_value_t newVal );
+
+    void on_volume_changed( vlc_object_t* p_obj, vlc_value_t newVal );
+    void on_audio_filter_changed( vlc_object_t* p_obj, vlc_value_t newVal );
+
+protected:
+    // Protected because it is a singleton
+    VlcProc( intf_thread_t *pIntf );
+    virtual ~VlcProc();
+
+private:
+    /// Timer to call manage() regularly (via doManage())
+    OSTimer *m_pTimer;
+    /// Playtree variable
+    VariablePtr m_cPlaytree;
+    VariablePtr m_cVarRandom;
+    VariablePtr m_cVarLoop;
+    VariablePtr m_cVarRepeat;
+    /// Variable for current position of the stream
+    VariablePtr m_cVarTime;
+    /// Variable for audio volume
+    VariablePtr m_cVarVolume;
+    /// Variable for current stream properties
+    VariablePtr m_cVarStreamName;
+    VariablePtr m_cVarStreamURI;
+    VariablePtr m_cVarStreamBitRate;
+    VariablePtr m_cVarStreamSampleRate;
+    /// Variable for the "mute" state
+    VariablePtr m_cVarMute;
+    /// Variables related to the input
+    VariablePtr m_cVarPlaying;
+    VariablePtr m_cVarStopped;
+    VariablePtr m_cVarPaused;
+    VariablePtr m_cVarSeekable;
+    VariablePtr m_cVarRecordable;
+    VariablePtr m_cVarRecording;
+    /// Variables related to the vout
+    VariablePtr m_cVarFullscreen;
+    VarBox m_varVoutSize;
+    VariablePtr m_cVarHasVout;
+    /// Variables related to audio
+    VariablePtr m_cVarHasAudio;
+    /// Equalizer variables
+    EqualizerBands m_varEqBands;
+    VariablePtr m_cVarEqPreamp;
+    VariablePtr m_cVarEqualizer;
+    /// Variable for DVD detection
+    VariablePtr m_cVarDvdActive;
+
+    /// Vout thread
+    vout_thread_t *m_pVout;
+    /// Audio output
+    aout_instance_t *m_pAout;
+    bool m_bEqualizer_started;
+
+    /**
+     * Poll VLC internals to update the status (volume, current time in
+     * the stream, current filename, play/pause/stop status, ...)
+     * This function should be called regurlarly, since there is no
+     * callback mechanism (yet?) to automatically update a variable when
+     * the internal status changes
+     */
+    void manage();
+
+    // reset variables when input is over
+    void reset_input();
+
+    // init variables (libvlc and playlist levels)
+    void init_variables();
+
+    /// Define the command that calls manage()
+    DEFINE_CALLBACK( VlcProc, Manage );
+
+    /// Update the stream name variable
+    void updateStreamName();
+
+    /// Callback for intf-change variable
+    static int onIntfChange( vlc_object_t *pObj, const char *pVariable,
+                             vlc_value_t oldVal, vlc_value_t newVal,
+                             void *pParam );
+
+    /// Callback for intf-show variable
+    static int onIntfShow( vlc_object_t *pObj, const char *pVariable,
+                           vlc_value_t oldVal, vlc_value_t newVal,
+                           void *pParam );
+
+    /// Callback for input-current variable
+    static int onInputNew( vlc_object_t *pObj, const char *pVariable,
+                           vlc_value_t oldVal, vlc_value_t newVal,
+                           void *pParam );
+
+    /// Callback for item-change variable
+    static int onItemChange( vlc_object_t *pObj, const char *pVariable,
+                             vlc_value_t oldVal, vlc_value_t newVal,
+                             void *pParam );
+
+    /// Callback for item-change variable
+    static int onItemAppend( vlc_object_t *pObj, const char *pVariable,
+                             vlc_value_t oldVal, vlc_value_t newVal,
+                             void *pParam );
+
+    /// Callback for item-change variable
+    static int onItemDelete( vlc_object_t *pObj, const char *pVariable,
+                             vlc_value_t oldVal, vlc_value_t newVal,
+                             void *pParam );
+
+    /// Callback for skins2-to-load variable
+    static int onSkinToLoad( vlc_object_t *pObj, const char *pVariable,
+                             vlc_value_t oldVal, vlc_value_t newVal,
+                             void *pParam );
+
+    /// Generic Callback
+    static int onGenericCallback( vlc_object_t *pObj, const char *pVariable,
                                   vlc_value_t oldVal, vlc_value_t newVal,
                                   void *pParam );
 
-        /// Callback for equalizer-bands variable
-        static int onEqBandsChange( vlc_object_t *pObj, const char *pVariable,
-                                    vlc_value_t oldVal, vlc_value_t newVal,
-                                    void *pParam );
-
-        /// Callback for equalizer-preamp variable
-        static int onEqPreampChange( vlc_object_t *pObj, const char *pVariable,
-                                     vlc_value_t oldVal, vlc_value_t newVal,
-                                     void *pParam );
-
-        /// Generic Callback
-        static int onGenericCallback( vlc_object_t *pObj, const char *pVariable,
-                                      vlc_value_t oldVal, vlc_value_t newVal,
-                                      void *pParam );
-
 };
 
 
index dad59b8ab4646dc4befc5613dcb9560187e37acb..f94638355faec3e25955b2f06613b67d254b055a 100644 (file)
@@ -16,9 +16,9 @@
  * 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 this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
  *****************************************************************************/
 
 #ifndef VOUTMANAGER_HPP
@@ -41,11 +41,10 @@ class SavedWnd
 {
 public:
     SavedWnd( vout_window_t* pWnd, VoutWindow* pVoutWindow = NULL,
-               CtrlVideo* pCtrlVideo = NULL, int height = 0, int width = 0 ) :
-       pWnd( pWnd ), pVoutWindow( pVoutWindow ), pCtrlVideo( pCtrlVideo ),
-       height( height ), width( width ) {}
-
-    ~SavedWnd() {}
+               CtrlVideo* pCtrlVideo = NULL, int height = 0, int width = 0 )
+            : pWnd( pWnd ), pVoutWindow( pVoutWindow ),
+              pCtrlVideo( pCtrlVideo ), height( height ), width( width ) { }
+    ~SavedWnd() { }
 
     vout_window_t* pWnd;
     VoutWindow *pVoutWindow;
@@ -56,84 +55,83 @@ public:
 
 class VoutMainWindow: public GenericWindow
 {
-    public:
-
-        VoutMainWindow( intf_thread_t *pIntf, int left = 0, int top = 0 ) :
-                GenericWindow( pIntf, left, top, false, false, NULL )
-        {
-            resize( 10, 10 );
-            move( -50, -50 );
-        }
-        virtual ~VoutMainWindow() {}
+public:
 
+    VoutMainWindow( intf_thread_t *pIntf, int left = 0, int top = 0 ) :
+            GenericWindow( pIntf, left, top, false, false, NULL )
+    {
+        resize( 10, 10 );
+        move( -50, -50 );
+    }
+    virtual ~VoutMainWindow() { }
 };
 
 
 /// Singleton object handling VLC internal state and playlist
 class VoutManager: public SkinObject
 {
-    public:
-        /// Get the instance of VoutManager
-        /// Returns NULL if the initialization of the object failed
-        static VoutManager *instance( intf_thread_t *pIntf );
+public:
+    /// Get the instance of VoutManager
+    /// Returns NULL if the initialization of the object failed
+    static VoutManager *instance( intf_thread_t *pIntf );
 
-        /// Delete the instance of VoutManager
-        static void destroy( intf_thread_t *pIntf );
+    /// Delete the instance of VoutManager
+    static void destroy( intf_thread_t *pIntf );
 
-        /// Accept Wnd
-        void* acceptWnd( vout_window_t* pWnd );
+    /// Accept Wnd
+    void* acceptWnd( vout_window_t* pWnd );
 
-        /// Release Wnd
-        void releaseWnd( vout_window_t* pWnd );
+    /// Release Wnd
+    void releaseWnd( vout_window_t* pWnd );
 
-        /// set size Wnd
-        void setSizeWnd( vout_window_t* pWnd, int width, int height );
+    /// set size Wnd
+    void setSizeWnd( vout_window_t* pWnd, int width, int height );
 
-        /// set fullscreen Wnd
-        void setFullscreenWnd( vout_window_t* pWnd, bool b_fullscreen );
+    /// set fullscreen Wnd
+    void setFullscreenWnd( vout_window_t* pWnd, bool b_fullscreen );
 
-        /// Callback to request a vout window
-        static void *getWindow( intf_thread_t *pIntf, vout_window_t *pWnd );
+    /// Callback to request a vout window
+    static void *getWindow( intf_thread_t *pIntf, vout_window_t *pWnd );
 
-        // Window provider (release)
-        static void releaseWindow( intf_thread_t *pIntf, vout_window_t *pWnd  );
+    // Window provider (release)
+    static void releaseWindow( intf_thread_t *pIntf, vout_window_t *pWnd  );
 
-        /// Callback to change a vout window
-        static int controlWindow( struct vout_window_t *pWnd,
-                                  int query, va_list args );
+    /// Callback to change a vout window
+    static int controlWindow( struct vout_window_t *pWnd,
+                              int query, va_list args );
 
-        // Register Video Controls (when building theme)
-        void registerCtrlVideo( CtrlVideo* p_CtrlVideo );
+    // Register Video Controls (when building theme)
+    void registerCtrlVideo( CtrlVideo* p_CtrlVideo );
 
-        // save and restore vouts (when changing theme)
-        void saveVoutConfig( );
-        void restoreVoutConfig( bool b_success );
+    // save and restore vouts (when changing theme)
+    void saveVoutConfig( );
+    void restoreVoutConfig( bool b_success );
 
-        // save and restore vouts (when swapping Layout)
-        void discardVout( CtrlVideo* pCtrlVideo );
-        void requestVout( CtrlVideo* pCtrlVideo );
+    // save and restore vouts (when swapping Layout)
+    void discardVout( CtrlVideo* pCtrlVideo );
+    void requestVout( CtrlVideo* pCtrlVideo );
 
-        // get a useable video Control
-        CtrlVideo* getBestCtrlVideo( );
+    // get a useable video Control
+    CtrlVideo* getBestCtrlVideo( );
 
-        // get the VoutMainWindow
-        VoutMainWindow* getVoutMainWindow() { return m_pVoutMainWindow; }
+    // get the VoutMainWindow
+    VoutMainWindow* getVoutMainWindow() { return m_pVoutMainWindow; }
 
-        // test if vout are running
-        bool hasVout() { return ( m_SavedWndVec.size() != 0 ) ; }
+    // test if vout are running
+    bool hasVout() { return ( m_SavedWndVec.size() != 0 ) ; }
 
-    protected:
-        // Protected because it is a singleton
-        VoutManager( intf_thread_t *pIntf );
-        virtual ~VoutManager();
+protected:
+    // Protected because it is a singleton
+    VoutManager( intf_thread_t *pIntf );
+    virtual ~VoutManager();
 
-    private:
+private:
 
-        vector<CtrlVideo *> m_pCtrlVideoVec;
-        vector<CtrlVideo *> m_pCtrlVideoVecBackup;
-        vector<SavedWnd> m_SavedWndVec;
+    vector<CtrlVideo *> m_pCtrlVideoVec;
+    vector<CtrlVideo *> m_pCtrlVideoVecBackup;
+    vector<SavedWnd> m_SavedWndVec;
 
-        VoutMainWindow* m_pVoutMainWindow;
+    VoutMainWindow* m_pVoutMainWindow;
 };
 
 
index 887edee77a4b07c897bc8a2681cc4f285e0ead85..2ff60ba750f09867aea5c8c2d8249ab3de23ca29 100644 (file)
@@ -16,9 +16,9 @@
  * 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 this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
  *****************************************************************************/
 
 #ifndef VOUT_WINDOW_HPP
@@ -34,65 +34,65 @@ class CtrlVideo;
 /// Class to handle a video output window
 class VoutWindow: private GenericWindow
 {
-    public:
+public:
 
-        VoutWindow( intf_thread_t *pIntf, vout_window_t* pWnd,
-                    int width, int height, GenericWindow* pParent = NULL );
-        virtual ~VoutWindow();
+    VoutWindow( intf_thread_t *pIntf, vout_window_t* pWnd,
+                int width, int height, GenericWindow* pParent = NULL );
+    virtual ~VoutWindow();
 
-        // counter used for debugging purpose
-        static int count;
+    // counter used for debugging purpose
+    static int count;
 
-        /// Make some functions public
-        //@{
-        using GenericWindow::show;
-        using GenericWindow::hide;
-        using GenericWindow::move;
-        using GenericWindow::resize;
-        using GenericWindow::getOSHandle;
-        //@}
+    /// Make some functions public
+    //@{
+    using GenericWindow::show;
+    using GenericWindow::hide;
+    using GenericWindow::move;
+    using GenericWindow::resize;
+    using GenericWindow::getOSHandle;
+    //@}
 
-        /// get the parent  window
-        virtual GenericWindow* getWindow( ) { return m_pParentWindow; }
+    /// get the parent  window
+    virtual GenericWindow* getWindow( ) { return m_pParentWindow; }
 
-        /// hotkeys processing
-        virtual void processEvent( EvtKey &rEvtKey );
+    /// hotkeys processing
+    virtual void processEvent( EvtKey &rEvtKey );
 
-        /// set and get Video Control for VoutWindow
-        virtual void setCtrlVideo( CtrlVideo* pCtrlVideo );
-        virtual CtrlVideo* getCtrlVideo( ) { return m_pCtrlVideo; }
+    /// set and get Video Control for VoutWindow
+    virtual void setCtrlVideo( CtrlVideo* pCtrlVideo );
+    virtual CtrlVideo* getCtrlVideo( ) { return m_pCtrlVideo; }
 
-        /// toggle fullscreen mode
-        virtual void setFullscreen( bool b_fullscreen );
-        virtual bool isFullscreen() { return m_bFullscreen; }
+    /// toggle fullscreen mode
+    virtual void setFullscreen( bool b_fullscreen );
+    virtual bool isFullscreen() { return m_bFullscreen; }
 
-        /// get original size of vout
-        virtual int getOriginalWidth( ) { return original_width; }
-        virtual int getOriginalHeight( ) { return original_height; }
+    /// get original size of vout
+    virtual int getOriginalWidth( ) { return original_width; }
+    virtual int getOriginalHeight( ) { return original_height; }
 
-        /// set original size of vout
-        virtual void setOriginalWidth( int width ) { original_width = width; }
-        virtual void setOriginalHeight( int height ) { original_height = height; }
+    /// set original size of vout
+    virtual void setOriginalWidth( int width ) { original_width = width; }
+    virtual void setOriginalHeight( int height ) { original_height = height; }
 
-        virtual string getType() const { return "Vout"; }
+    virtual string getType() const { return "Vout"; }
 
-    private:
+private:
 
-        /// vout thread
-        vout_window_t* m_pWnd;
+    /// vout thread
+    vout_window_t* m_pWnd;
 
-        /// original width and height
-        int original_width;
-        int original_height;
+    /// original width and height
+    int original_width;
+    int original_height;
 
-        /// fulscreen mode indicator
-        bool m_bFullscreen;
+    /// fulscreen mode indicator
+    bool m_bFullscreen;
 
-        /// VideoControl attached to it
-        CtrlVideo* m_pCtrlVideo;
+    /// VideoControl attached to it
+    CtrlVideo* m_pCtrlVideo;
 
-        /// Parent Window
-        GenericWindow* m_pParentWindow;
+    /// Parent Window
+    GenericWindow* m_pParentWindow;
 };
 
 typedef CountedPtr<VoutWindow> VoutWindowPtr;
index 4cdca61d166533b005f73f803b3e429b55e7fd5c..4849f552dc19c13f2925a3f2b2762f7e754ba364 100644 (file)
@@ -17,9 +17,9 @@
  * 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 this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
  *****************************************************************************/
 
 #ifndef WINDOW_MANAGER_HPP
@@ -44,187 +44,182 @@ class Popup;
 /// Window manager for skin windows
 class WindowManager: public SkinObject
 {
-    public:
-        /// Direction of the resizing
-        enum Direction_t
-        {
-            kResizeE,   // East
-            kResizeSE,  // South-East
-            kResizeS,   // South
-            kNone       // Reserved for internal use
-        };
+public:
+    /// Direction of the resizing
+    enum Direction_t
+    {
+        kResizeE,   // East
+        kResizeSE,  // South-East
+        kResizeS,   // South
+        kNone       // Reserved for internal use
+    };
+    WindowManager( intf_thread_t *pIntf );
+    virtual ~WindowManager();
 
-        /// Constructor
-        WindowManager( intf_thread_t *pIntf);
+    /**
+     * Add a window to the list of known windows. Necessary if you want
+     * your window to be movable...
+     */
+    void registerWindow( TopWindow &rWindow );
 
-        /// Destructor
-        virtual ~WindowManager();
+    /// Remove a previously registered window
+    void unregisterWindow( TopWindow &rWindow );
 
-        /**
-         * Add a window to the list of known windows. Necessary if you want
-         * your window to be movable...
-         */
-        void registerWindow( TopWindow &rWindow );
+    /// Tell the window manager that a move is initiated for rWindow
+    void startMove( TopWindow &rWindow );
 
-        /// Remove a previously registered window
-        void unregisterWindow( TopWindow &rWindow );
+    /// Tell the window manager that the current move ended
+    void stopMove();
 
-        /// Tell the window manager that a move is initiated for rWindow
-        void startMove( TopWindow &rWindow );
-
-        /// Tell the window manager that the current move ended
-        void stopMove();
-
-        /**
-         * Move the rWindow window to (left, top), and move all its
-         * anchored windows.
-         * If a new anchoring is detected, the windows will move accordingly.
-         */
-        void move( TopWindow &rWindow, int left, int top ) const;
-
-        /// Tell the window manager that a resize is initiated for rLayout
-        void startResize( GenericLayout &rLayout, Direction_t direction );
-
-        /// Tell the window manager that the current resizing ended
-        void stopResize();
-
-        /**
-         * Resize the rLayout layout to (width, height), and move all its
-         * anchored windows, if some anchors are moved during the resizing.
-         * If a new anchoring is detected, the windows will move (or resize)
-         * accordingly.
-         */
-        void resize( GenericLayout &rLayout, int width, int height ) const;
-
-        /// Maximize the given window
-        void maximize( TopWindow &rWindow );
-
-        /// Unmaximize the given window
-        void unmaximize( TopWindow &rWindow );
-
-        /// Raise all the registered windows
-        void raiseAll() const;
-
-        /// Show all the registered windows
-        void showAll( bool firstTime = false ) const;
-
-        /// Hide all the registered windows
-        void hideAll() const;
-
-        /// Synchronize the windows with their visibility variable
-        void synchVisibility() const;
-
-        /// Save the current visibility of the windows
-        void saveVisibility();
-
-        /// Restore the saved visibility of the windows
-        void restoreVisibility() const;
-
-        /// Raise the given window
-        void raise( TopWindow &rWindow ) const { rWindow.raise(); }
-
-        /// Show the given window
-        void show( TopWindow &rWindow ) const { rWindow.show(); }
-
-        /// Hide the given window
-        void hide( TopWindow &rWindow ) const { rWindow.hide(); }
-
-        /// Toggle all the windows on top
-        void toggleOnTop();
-
-        /// Set the magnetism of screen edges
-        void setMagnetValue( int magnet ) { m_magnet = magnet; }
-
-        /// Set the alpha value of the static windows
-        void setAlphaValue( int alpha ) { m_alpha = alpha; }
-
-        /// Set the alpha value of the moving windows
-        void setMoveAlphaValue( int moveAlpha ) { m_moveAlpha = moveAlpha; }
-
-        /// Create the tooltip window
-        void createTooltip( const GenericFont &rTipFont );
-
-        /// Show the tooltip window
-        void showTooltip();
-
-        /// Hide the tooltip window
-        void hideTooltip();
-
-        /// Add a layout of the given window. This new layout will be the
-        /// active one.
-        void addLayout( TopWindow &rWindow, GenericLayout &rLayout );
-
-        /// Change the active layout of the given window
-        void setActiveLayout( TopWindow &rWindow, GenericLayout &rLayout );
-
-        /// Mark the given popup as active
-        void setActivePopup( Popup &rPopup ) { m_pPopup = &rPopup; }
-
-        /// Return the active popup, or NULL if none is active
-        Popup * getActivePopup() const { return m_pPopup; }
-
-    private:
-        /// Some useful typedefs for lazy people like me
-        typedef set<TopWindow*> WinSet_t;
-        typedef list<Anchor*> AncList_t;
-
-        /// Dependencies map
-        /**
-         * This map represents the graph of anchored windows: it associates
-         * to a given window all the windows that are directly anchored by it.
-         * This is not transitive, i.e. if a is in m_dep[b] and if b is in
-         * m_dep[c], it doesn't mean that a is in m_dep[c] (in fact, it
-         * would be extremely rare...)
-         */
-        map<TopWindow*, WinSet_t> m_dependencies;
-        /// Store all the windows
-        WinSet_t m_allWindows;
-        /**
-         * Store the windows that were visible when saveVisibility() was
-         * last called.
-         */
-        WinSet_t m_savedWindows;
-        /// Store the moving windows
-        /**
-         * This set is updated at every start of move.
-         */
-        WinSet_t m_movingWindows;
-        /**
-         * Store the moving windows in the context of resizing
-         * These sets are updated at every start of move
-         */
-        //@{
-        WinSet_t m_resizeMovingE;
-        WinSet_t m_resizeMovingS;
-        WinSet_t m_resizeMovingSE;
-        //@}
-        /// Indicate whether the windows are currently on top
-        VariablePtr m_cVarOnTop;
-        /// Magnetism of the screen edges (= scope of action)
-        int m_magnet;
-        /// Alpha value of the static windows
-        int m_alpha;
-        /// Alpha value of the moving windows
-        int m_moveAlpha;
-        /// Direction of the current resizing
-        Direction_t m_direction;
-        /// Rect of the last maximized window
-        SkinsRect m_maximizeRect;
-        /// Tooltip
-        Tooltip *m_pTooltip;
-        /// Active popup, if any
-        Popup *m_pPopup;
-
-        /// Recursively build a set of windows anchored to the one given.
-        void buildDependSet( WinSet_t &rWinSet, TopWindow *pWindow );
-
-        /// Check anchoring
-        /**
-         * This function updates xOffset and yOffset, to take care of a new
-         * anchoring (if any)
-         */
-        void checkAnchors( TopWindow *pWindow,
-                           int &xOffset, int &yOffset ) const;
+    /**
+     * Move the rWindow window to (left, top), and move all its
+     * anchored windows.
+     * If a new anchoring is detected, the windows will move accordingly.
+     */
+    void move( TopWindow &rWindow, int left, int top ) const;
+
+    /// Tell the window manager that a resize is initiated for rLayout
+    void startResize( GenericLayout &rLayout, Direction_t direction );
+
+    /// Tell the window manager that the current resizing ended
+    void stopResize();
+
+    /**
+     * Resize the rLayout layout to (width, height), and move all its
+     * anchored windows, if some anchors are moved during the resizing.
+     * If a new anchoring is detected, the windows will move (or resize)
+     * accordingly.
+     */
+    void resize( GenericLayout &rLayout, int width, int height ) const;
+
+    /// Maximize the given window
+    void maximize( TopWindow &rWindow );
+
+    /// Unmaximize the given window
+    void unmaximize( TopWindow &rWindow );
+
+    /// Raise all the registered windows
+    void raiseAll() const;
+
+    /// Show all the registered windows
+    void showAll( bool firstTime = false ) const;
+
+    /// Hide all the registered windows
+    void hideAll() const;
+
+    /// Synchronize the windows with their visibility variable
+    void synchVisibility() const;
+
+    /// Save the current visibility of the windows
+    void saveVisibility();
+
+    /// Restore the saved visibility of the windows
+    void restoreVisibility() const;
+
+    /// Raise the given window
+    void raise( TopWindow &rWindow ) const { rWindow.raise(); }
+
+    /// Show the given window
+    void show( TopWindow &rWindow ) const { rWindow.show(); }
+
+    /// Hide the given window
+    void hide( TopWindow &rWindow ) const { rWindow.hide(); }
+
+    /// Toggle all the windows on top
+    void toggleOnTop();
+
+    /// Set the magnetism of screen edges
+    void setMagnetValue( int magnet ) { m_magnet = magnet; }
+
+    /// Set the alpha value of the static windows
+    void setAlphaValue( int alpha ) { m_alpha = alpha; }
+
+    /// Set the alpha value of the moving windows
+    void setMoveAlphaValue( int moveAlpha ) { m_moveAlpha = moveAlpha; }
+
+    /// Create the tooltip window
+    void createTooltip( const GenericFont &rTipFont );
+
+    /// Show the tooltip window
+    void showTooltip();
+
+    /// Hide the tooltip window
+    void hideTooltip();
+
+    /// Add a layout of the given window. This new layout will be the
+    /// active one.
+    void addLayout( TopWindow &rWindow, GenericLayout &rLayout );
+
+    /// Change the active layout of the given window
+    void setActiveLayout( TopWindow &rWindow, GenericLayout &rLayout );
+
+    /// Mark the given popup as active
+    void setActivePopup( Popup &rPopup ) { m_pPopup = &rPopup; }
+
+    /// Return the active popup, or NULL if none is active
+    Popup * getActivePopup() const { return m_pPopup; }
+
+private:
+    /// Some useful typedefs for lazy people like me
+    typedef set<TopWindow*> WinSet_t;
+    typedef list<Anchor*> AncList_t;
+
+    /// Dependencies map
+    /**
+     * This map represents the graph of anchored windows: it associates
+     * to a given window all the windows that are directly anchored by it.
+     * This is not transitive, i.e. if a is in m_dep[b] and if b is in
+     * m_dep[c], it doesn't mean that a is in m_dep[c] (in fact, it
+     * would be extremely rare...)
+     */
+    map<TopWindow*, WinSet_t> m_dependencies;
+    /// Store all the windows
+    WinSet_t m_allWindows;
+    /**
+     * Store the windows that were visible when saveVisibility() was
+     * last called.
+     */
+    WinSet_t m_savedWindows;
+    /// Store the moving windows
+    /**
+     * This set is updated at every start of move.
+     */
+    WinSet_t m_movingWindows;
+    /**
+     * Store the moving windows in the context of resizing
+     * These sets are updated at every start of move
+     */
+    //@{
+    WinSet_t m_resizeMovingE;
+    WinSet_t m_resizeMovingS;
+    WinSet_t m_resizeMovingSE;
+    //@}
+    /// Indicate whether the windows are currently on top
+    VariablePtr m_cVarOnTop;
+    /// Magnetism of the screen edges (= scope of action)
+    int m_magnet;
+    /// Alpha value of the static windows
+    int m_alpha;
+    /// Alpha value of the moving windows
+    int m_moveAlpha;
+    /// Direction of the current resizing
+    Direction_t m_direction;
+    /// Rect of the last maximized window
+    SkinsRect m_maximizeRect;
+    /// Tooltip
+    Tooltip *m_pTooltip;
+    /// Active popup, if any
+    Popup *m_pPopup;
+
+    /// Recursively build a set of windows anchored to the one given.
+    void buildDependSet( WinSet_t &rWinSet, TopWindow *pWindow );
+
+    /// Check anchoring
+    /**
+     * This function updates xOffset and yOffset, to take care of a new
+     * anchoring (if any)
+     */
+    void checkAnchors( TopWindow *pWindow, int &xOffset, int &yOffset ) const;
 };
 
 
index f4e7d0b447ee4773b499d744e392bd00734ddb02..b747477ea1565f2ada49a3587826f15e53fa97d6 100644 (file)
@@ -17,9 +17,9 @@
  * 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 this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
  *****************************************************************************/
 
 #ifndef BEZIER_HPP
 /// Class for Bezier curves
 class Bezier: public SkinObject
 {
-    public:
-        /// Values to indicate which coordinate(s) must be checked to consider
-        /// that two points are distinct
-        enum Flag_t
-        {
-            kCoordsBoth,    // x or y must be different (default)
-            kCoordsX,       // only x is different
-            kCoordsY        // only y is different
-        };
-
-        Bezier( intf_thread_t *p_intf,
-                const vector<float> &pAbscissas,
-                const vector<float> &pOrdinates,
-                Flag_t flag = kCoordsBoth );
-        ~Bezier() {}
-
-        /// Get the number of control points used to define the curve
-        int getNbCtrlPoints() const { return m_nbCtrlPt; }
-
-        /// Return the percentage (between 0 and 1) of the curve point nearest
-        /// from (x, y)
-        float getNearestPercent( int x, int y ) const;
-
-        /// Return the distance of (x, y) to the curve, corrected
-        /// by the (optional) given scale factors
-        float getMinDist( int x, int y, float xScale = 1.0f,
-                          float yScale = 1.0f ) const;
-
-        /// Get the coordinates of the point at t percent of
-        /// the curve (t must be between 0 and 1)
-        void getPoint( float t, int &x, int &y ) const;
-
-        /// Get the width (maximum abscissa) of the curve
-        int getWidth() const;
-
-        /// Get the height (maximum ordinate) of the curve
-        int getHeight() const;
-
-    private:
-        /// Number of control points
-        int m_nbCtrlPt;
-        /// vectors containing the coordinates of the control points
-        vector<float> m_ptx;
-        vector<float> m_pty;
-        /// Vector containing precalculated factoriels
-        vector<float> m_ft;
-
-        /// Number of points (=pixels) used by the curve
-        int m_nbPoints;
-        /// Vectors with the coordinates of the different points of the curve
-        vector<int> m_leftVect;
-        vector<int> m_topVect;
-        /// Vector with the percentages associated with the points of the curve
-        vector<float> m_percVect;
-
-        /// Return the index of the curve point that is the nearest from (x, y)
-        int findNearestPoint( int x, int y ) const;
-        /// Compute the coordinates of a point corresponding to a given
-        /// percentage
-        void computePoint( float t, int &x, int &y ) const;
-        /// Helper function to compute a coefficient of the curve
-        inline float computeCoeff( int i, int n, float t ) const;
-        /// x^n
-        inline float power( float x, int n ) const;
+public:
+    /// Values to indicate which coordinate(s) must be checked to consider
+    /// that two points are distinct
+    enum Flag_t
+    {
+        kCoordsBoth,    // x or y must be different (default)
+        kCoordsX,       // only x is different
+        kCoordsY        // only y is different
+    };
+
+    Bezier( intf_thread_t *p_intf,
+            const vector<float> &pAbscissas,
+            const vector<float> &pOrdinates,
+            Flag_t flag = kCoordsBoth );
+    ~Bezier() { }
+
+    /// Get the number of control points used to define the curve
+    int getNbCtrlPoints() const { return m_nbCtrlPt; }
+
+    /// Return the percentage (between 0 and 1) of the curve point nearest
+    /// from (x, y)
+    float getNearestPercent( int x, int y ) const;
+
+    /// Return the distance of (x, y) to the curve, corrected
+    /// by the (optional) given scale factors
+    float getMinDist( int x, int y, float xScale = 1.0f,
+                      float yScale = 1.0f ) const;
+
+    /// Get the coordinates of the point at t percent of
+    /// the curve (t must be between 0 and 1)
+    void getPoint( float t, int &x, int &y ) const;
+
+    /// Get the width (maximum abscissa) of the curve
+    int getWidth() const;
+
+    /// Get the height (maximum ordinate) of the curve
+    int getHeight() const;
+
+private:
+    /// Number of control points
+    int m_nbCtrlPt;
+    /// vectors containing the coordinates of the control points
+    vector<float> m_ptx;
+    vector<float> m_pty;
+    /// Vector containing precalculated factoriels
+    vector<float> m_ft;
+
+    /// Number of points (=pixels) used by the curve
+    int m_nbPoints;
+    /// Vectors with the coordinates of the different points of the curve
+    vector<int> m_leftVect;
+    vector<int> m_topVect;
+    /// Vector with the percentages associated with the points of the curve
+    vector<float> m_percVect;
+
+    /// Return the index of the curve point that is the nearest from (x, y)
+    int findNearestPoint( int x, int y ) const;
+    /// Compute the coordinates of a point corresponding to a given
+    /// percentage
+    void computePoint( float t, int &x, int &y ) const;
+    /// Helper function to compute a coefficient of the curve
+    inline float computeCoeff( int i, int n, float t ) const;
+    /// x^n
+    inline float power( float x, int n ) const;
 };
 
 
index e2d7608995dbe8718e90694a34ed9f1ed3f0e92e..53629f12e9bcb79427555256e393624e7419064f 100644 (file)
@@ -17,9 +17,9 @@
  * 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 this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
  *****************************************************************************/
 
 #ifndef FSM_HPP
@@ -37,47 +37,47 @@ class CmdGeneric;
 /// This class implements a Finite State Machine (FSM)
 class FSM: public SkinObject
 {
-    public:
-        FSM( intf_thread_t *pIntf ): SkinObject( pIntf ) {}
-        virtual ~FSM() {}
+public:
+    FSM( intf_thread_t *pIntf ): SkinObject( pIntf ) { }
+    virtual ~FSM() { }
 
-        /// Add a state to the machine
-        void addState( const string &state );
+    /// Add a state to the machine
+    void addState( const string &state );
 
-        /// Add a transition to the machine
-        void addTransition( const string &state1, const string &event,
-                            const string &state2,
-                            CmdGeneric *pCmd = NULL );
+    /// Add a transition to the machine
+    void addTransition( const string &state1, const string &event,
+                        const string &state2,
+                        CmdGeneric *pCmd = NULL );
 
-        /// Retrieve the current state
-        const string &getState() const { return m_currentState; }
+    /// Retrieve the current state
+    const string &getState() const { return m_currentState; }
 
-        /// Set the current state, without bothering about transitions
-        void setState( const string &state );
+    /// Set the current state, without bothering about transitions
+    void setState( const string &state );
 
-        /// Find a transition from the current state with the input event,
-        /// change the state, and call the associated callback (if any).
-        void handleTransition( const string &event );
+    /// Find a transition from the current state with the input event,
+    /// change the state, and call the associated callback (if any).
+    void handleTransition( const string &event );
 
-    private:
-        /// A Key_t contains the initial state of a transition, and a string
-        /// characterizing an event (for example: "mouse:left:down:ctrl")
-        typedef pair<string, string> Key_t;
+private:
+    /// A Key_t contains the initial state of a transition, and a string
+    /// characterizing an event (for example: "mouse:left:down:ctrl")
+    typedef pair<string, string> Key_t;
 
-        /// A Data_t contains the final state of a transition, and a callback
-        /// to execute when the transition is applied
-        typedef pair<string, CmdGeneric*> Data_t;
+    /// A Data_t contains the final state of a transition, and a callback
+    /// to execute when the transition is applied
+    typedef pair<string, CmdGeneric*> Data_t;
 
-        /// Current state of the machine
-        string m_currentState;
+    /// Current state of the machine
+    string m_currentState;
 
-        /// Set containing the different states
-        set<string> m_states;
+    /// Set containing the different states
+    set<string> m_states;
 
-        /// Map containing the different transitions between defined types
-        /// It associates a final state (and potentially a callback)
-        /// with a couple of the form: (currentState, triggerEvent)
-        map<Key_t, Data_t> m_transitions;
+    /// Map containing the different transitions between defined types
+    /// It associates a final state (and potentially a callback)
+    /// with a couple of the form: (currentState, triggerEvent)
+    map<Key_t, Data_t> m_transitions;
 };
 
 
index fa3023a7d25c5c528e1b084f3c9aba91f48a9218..f88ee0837b97f18046707d24363a6dbc4e1b79eb 100644 (file)
@@ -17,9 +17,9 @@
  * 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 this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
  *****************************************************************************/
 
 #ifndef OBSERVER_HPP
@@ -34,69 +34,69 @@ template <class S, class ARG> class Observer;
 /// Template for subjects in the Observer design pattern
 template <class S, class ARG = void> class Subject
 {
-    public:
-        virtual ~Subject() {}
-
-        /// Remove all observers; should only be used for debugging purposes
-        virtual void clearObservers()
-        {
-            m_observers.clear();
-        }
-
-        /// Add an observer to this subject
-        /// Note: adding twice the same observer is not harmful
-        virtual void addObserver( Observer<S, ARG>* pObserver )
-        {
-            m_observers.insert( pObserver );
-        }
-
-        /// Remove an observer from this subject
-        /// Note: removing twice the same observer is not harmful
-        virtual void delObserver( Observer<S, ARG>* pObserver )
-        {
-            m_observers.erase( pObserver );
-        }
-
-        /// Notify the observers when the status has changed
-        virtual void notify( ARG *arg )
+public:
+    virtual ~Subject() { }
+
+    /// Remove all observers; should only be used for debugging purposes
+    virtual void clearObservers()
+    {
+        m_observers.clear();
+    }
+
+    /// Add an observer to this subject
+    /// Note: adding twice the same observer is not harmful
+    virtual void addObserver( Observer<S, ARG>* pObserver )
+    {
+        m_observers.insert( pObserver );
+    }
+
+    /// Remove an observer from this subject
+    /// Note: removing twice the same observer is not harmful
+    virtual void delObserver( Observer<S, ARG>* pObserver )
+    {
+        m_observers.erase( pObserver );
+    }
+
+    /// Notify the observers when the status has changed
+    virtual void notify( ARG *arg )
+    {
+        // This stupid gcc 3.2 needs "typename"
+        typename set<Observer<S, ARG>*>::const_iterator iter;
+        for( iter = m_observers.begin(); iter != m_observers.end();
+             iter++ )
         {
-            // This stupid gcc 3.2 needs "typename"
-            typename set<Observer<S, ARG>*>::const_iterator iter;
-            for( iter = m_observers.begin(); iter != m_observers.end();
-                 iter++ )
+            if( *iter == NULL )
             {
-                if( *iter == NULL )
-                {
-                    fprintf( stderr, "iter NULL !\n" );
-                    return;
-                }
-                (*iter)->onUpdate( *this , arg );
+                fprintf( stderr, "iter NULL !\n" );
+                return;
             }
+            (*iter)->onUpdate( *this , arg );
         }
+    }
 
-        /// Notify without any argument
-        virtual void notify() { notify( NULL ); }
+    /// Notify without any argument
+    virtual void notify() { notify( NULL ); }
 
-    protected:
-        Subject() {}
+protected:
+    Subject() { }
 
-    private:
-        /// Set of observers for this subject
-        set<Observer<S, ARG>*> m_observers;
+private:
+    /// Set of observers for this subject
+    set<Observer<S, ARG>*> m_observers;
 };
 
 
 /// Template for observers in the Observer design pattern
 template <class S, class ARG = void> class Observer
 {
-    public:
-        virtual ~Observer() {}
+public:
+    virtual ~Observer() { }
 
-        /// Method called when the subject is modified
-        virtual void onUpdate( Subject<S, ARG> &rSubject, ARG *arg) = 0;
+    /// Method called when the subject is modified
+    virtual void onUpdate( Subject<S, ARG> &rSubject, ARG *arg) = 0;
 
-    protected:
-        Observer() {}
+protected:
+    Observer() { }
 };
 
 
index 1c68cb4599bae46f8562e23169b29e909200c026..0c17144492c67b5cbe3fe9da050172ebe35a6e71 100644 (file)
@@ -17,9 +17,9 @@
  * 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 this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
  *****************************************************************************/
 
 #ifndef POINTER_HPP
 /// Reference couting pointer
 template <class T> class CountedPtr
 {
-    public:
-        explicit CountedPtr( T *pPtr = 0 ): m_pCounter( 0 )
-        {
-            if( pPtr ) m_pCounter = new Counter( pPtr );
-        }
+public:
+    explicit CountedPtr( T *pPtr = 0 ): m_pCounter( 0 )
+    {
+        if( pPtr ) m_pCounter = new Counter( pPtr );
+    }
 
-        ~CountedPtr() { release(); }
+    ~CountedPtr() { release(); }
 
-        CountedPtr(const CountedPtr &rPtr ) { acquire( rPtr.m_pCounter ); }
+    CountedPtr(const CountedPtr &rPtr ) { acquire( rPtr.m_pCounter ); }
 
-        CountedPtr &operator=( const CountedPtr &rPtr )
+    CountedPtr &operator=( const CountedPtr &rPtr )
+    {
+        if( this != &rPtr )
         {
-            if( this != &rPtr )
-            {
-                release();
-                acquire( rPtr.m_pCounter );
-            }
-            return *this;
+            release();
+            acquire( rPtr.m_pCounter );
         }
+        return *this;
+    }
 
-        T &operator*() const { return *m_pCounter->m_pPtr; }
+    T &operator*() const { return *m_pCounter->m_pPtr; }
 
-        T *operator->() const {return m_pCounter->m_pPtr; }
+    T *operator->() const {return m_pCounter->m_pPtr; }
 
-        T *get() const { return m_pCounter ? m_pCounter->m_pPtr : 0; }
+    T *get() const { return m_pCounter ? m_pCounter->m_pPtr : 0; }
 
-        bool unique() const
-        {
-            return ( m_pCounter ? m_pCounter->m_count == 1 : true );
-        }
+    bool unique() const
+    {
+        return ( m_pCounter ? m_pCounter->m_count == 1 : true );
+    }
 
-    private:
-        struct Counter
-        {
-            Counter( T* pPtr = 0, unsigned int c = 1 ):
-                m_pPtr( pPtr ), m_count( c ) {}
-            T* m_pPtr;
-            unsigned int m_count;
-        } *m_pCounter;
+private:
+    struct Counter
+    {
+        Counter( T* pPtr = 0, unsigned int c = 1 )
+               : m_pPtr( pPtr ), m_count( c ) { }
+        T* m_pPtr;
+        unsigned int m_count;
+    } *m_pCounter;
 
-        void acquire( Counter* pCount )
-        {
-            m_pCounter = pCount;
-            if( pCount ) ++pCount->m_count;
-        }
+    void acquire( Counter* pCount )
+    {
+        m_pCounter = pCount;
+        if( pCount ) ++pCount->m_count;
+    }
 
-        void release()
+    void release()
+    {
+        if( m_pCounter )
         {
-            if( m_pCounter )
+            if( --m_pCounter->m_count == 0 )
             {
-                if( --m_pCounter->m_count == 0 )
-                {
-                    delete m_pCounter->m_pPtr;
-                    delete m_pCounter;
-                }
-                m_pCounter = 0;
+                delete m_pCounter->m_pPtr;
+                delete m_pCounter;
             }
+            m_pCounter = 0;
         }
+    }
 };
 
 
index aba4b4af70d2cf41296107cae08755c72241284c..66601bd9ff7f08ce256a04233cacddb76139912c 100644 (file)
@@ -17,9 +17,9 @@
  * 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 this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
  *****************************************************************************/
 
 #ifndef POSITION_HPP
 /// Interface for rectangular objects
 class Box
 {
-    public:
-        virtual ~Box() {}
+public:
+    virtual ~Box() { }
 
-        /// Get the size of the box
-        virtual int getWidth() const = 0;
-        virtual int getHeight() const = 0;
+    /// Get the size of the box
+    virtual int getWidth() const = 0;
+    virtual int getHeight() const = 0;
 };
 
 
 /// Interface for rectangular objects with a position
 class GenericRect: public Box
 {
-    public:
-        virtual int getLeft() const = 0;
-        virtual int getTop() const = 0;
+public:
+    virtual int getLeft() const = 0;
+    virtual int getTop() const = 0;
 };
 
 
 /// Characterization of a rectangle
 class SkinsRect: public GenericRect
 {
-    public:
-        SkinsRect( int left, int top, int right, int bottom );
-
-        virtual int getLeft() const { return m_left; }
-        virtual int getTop() const { return m_top; }
-        virtual int getRight() const { return m_right; }
-        virtual int getBottom() const { return m_bottom; }
-        virtual int getWidth() const { return m_right - m_left; }
-        virtual int getHeight() const { return m_bottom - m_top; }
-
-    private:
-        int m_left;
-        int m_top;
-        int m_right;
-        int m_bottom;
+public:
+    SkinsRect( int left, int top, int right, int bottom );
+
+    virtual int getLeft() const { return m_left; }
+    virtual int getTop() const { return m_top; }
+    virtual int getRight() const { return m_right; }
+    virtual int getBottom() const { return m_bottom; }
+    virtual int getWidth() const { return m_right - m_left; }
+    virtual int getHeight() const { return m_bottom - m_top; }
+
+private:
+    int m_left;
+    int m_top;
+    int m_right;
+    int m_bottom;
 };
 
 
 /// Relative position of a rectangle in a box
 /**
  * Note: Even if the object is tied to its direct container rectangle, the
- * coordinates returned by getLeft(), getTop(), getRight() and getBottom() are
- * not relative to the direct container (which is usually a panel or the layout)
- * but to the root container (i.e. the layout).
+ * coordinates returned by getLeft(), getTop(), getRight() and getBottom()
+ * are not relative to the direct container (which is usually a panel or
+ * the layout) but to the root container (i.e. the layout).
  */
 class Position: public GenericRect
 {
-    public:
-        /// Type for reference edge/corner
-        enum Ref_t
-        {
-            /// Coordinates are relative to the upper left corner
-            kLeftTop,
-            /// Coordinates are relative to the upper right corner
-            kRightTop,
-            /// Coordinates are relative to the lower left corner
-            kLeftBottom,
-            /// Coordinates are relative to the lower right corner
-            kRightBottom
-        };
-
-        /// Create a new position relative to the given box
-        Position( int left, int top, int right, int bottom,
-                  const GenericRect &rRect,
-                  Ref_t refLeftTop, Ref_t refRightBottom,
-                  bool xKeepRatio, bool yKeepRatio );
-
-        ~Position() {}
-
-        /// Get the position relative to the left top corner of the box
-        virtual int getLeft() const;
-        virtual int getTop() const;
-        int getRight() const;
-        int getBottom() const;
-        /// Get the size of the rectangle
-        virtual int getWidth() const;
-        virtual int getHeight() const;
-        /// Get the reference corners
-        Ref_t getRefLeftTop() const { return m_refLeftTop; }
-        Ref_t getRefRightBottom() const { return m_refRighBottom; }
-
-    private:
-        /// Position and reference edge/corner
-        int m_left;
-        int m_top;
-        int m_right;
-        int m_bottom;
-        const GenericRect &m_rRect;
-        Ref_t m_refLeftTop;
-        Ref_t m_refRighBottom;
-        /// "Keep ratio" mode
-        bool m_xKeepRatio;
-        bool m_yKeepRatio;
-        /// Initial width ratio (usually between 0 and 1)
-        double m_xRatio;
-        /// Initial height ratio (usually between 0 and 1)
-        double m_yRatio;
+public:
+    /// Type for reference edge/corner
+    enum Ref_t
+    {
+        /// Coordinates are relative to the upper left corner
+        kLeftTop,
+        /// Coordinates are relative to the upper right corner
+        kRightTop,
+        /// Coordinates are relative to the lower left corner
+        kLeftBottom,
+        /// Coordinates are relative to the lower right corner
+        kRightBottom
+    };
+
+    /// Create a new position relative to the given box
+    Position( int left, int top, int right, int bottom,
+              const GenericRect &rRect,
+              Ref_t refLeftTop, Ref_t refRightBottom,
+              bool xKeepRatio, bool yKeepRatio );
+
+    ~Position() { }
+
+    /// Get the position relative to the left top corner of the box
+    virtual int getLeft() const;
+    virtual int getTop() const;
+    int getRight() const;
+    int getBottom() const;
+    /// Get the size of the rectangle
+    virtual int getWidth() const;
+    virtual int getHeight() const;
+    /// Get the reference corners
+    Ref_t getRefLeftTop() const { return m_refLeftTop; }
+    Ref_t getRefRightBottom() const { return m_refRighBottom; }
+
+private:
+    /// Position and reference edge/corner
+    int m_left;
+    int m_top;
+    int m_right;
+    int m_bottom;
+    const GenericRect &m_rRect;
+    Ref_t m_refLeftTop;
+    Ref_t m_refRighBottom;
+    /// "Keep ratio" mode
+    bool m_xKeepRatio;
+    bool m_yKeepRatio;
+    /// Initial width ratio (usually between 0 and 1)
+    double m_xRatio;
+    /// Initial height ratio (usually between 0 and 1)
+    double m_yRatio;
 };
 
 typedef CountedPtr<Position> PositionPtr;
@@ -139,26 +139,26 @@ typedef CountedPtr<Position> PositionPtr;
 /// Variable implementing the Box interface
 class VarBox: public Variable, public Box, public Subject<VarBox>
 {
-    public:
-        VarBox( intf_thread_t *pIntf, int width = 0, int height = 0 );
+public:
+    VarBox( intf_thread_t *pIntf, int width = 0, int height = 0 );
 
-        virtual ~VarBox() {}
+    virtual ~VarBox() { }
 
-        /// Get the variable type
-        virtual const string &getType() const { return m_type; }
+    /// Get the variable type
+    virtual const string &getType() const { return m_type; }
 
-        /// Get the size of the box
-        virtual int getWidth() const;
-        virtual int getHeight() const;
+    /// Get the size of the box
+    virtual int getWidth() const;
+    virtual int getHeight() const;
 
-        /// Change the size of the box
-        void setSize( int width, int height );
+    /// Change the size of the box
+    void setSize( int width, int height );
 
-    private:
-        /// Variable type
-        static const string m_type;
-        /// Size
-        int m_width, m_height;
+private:
+    /// Variable type
+    static const string m_type;
+    /// Size
+    int m_width, m_height;
 };
 
 
index 36ad95253d5783fa3fa5c623811d10d2d23baea5..5360aec5af38298e9446f14ce39b795a39d97de5 100644 (file)
@@ -17,9 +17,9 @@
  * 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 this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
  *****************************************************************************/
 
 #ifndef USTRING_HPP
 // Class for UNICODE strings handling
 class UString: public SkinObject
 {
-    public:
-        static const uint32_t npos;
-
-        /// Copy constructor
-        UString( const UString &rOther );
-
-        /// Create a new unicode string from an UTF8 string
-        UString( intf_thread_t *pIntf, const char *pString );
-
-        ~UString();
-
-        /// Get the unicode string
-        const uint32_t *u_str() const { return m_pString; }
-
-        /// Get the length of the string
-        uint32_t length() const { return m_length; }
-        uint32_t size() const { return m_length; }
-
-        /// Comparison
-        bool operator ==( const UString &rOther ) const;
-        bool operator !=( const UString &rOther ) const;
-        bool operator <( const UString &rOther ) const;
-        bool operator <=( const UString &rOther ) const;
-        bool operator >( const UString &rOther ) const;
-        bool operator >=( const UString &rOther ) const;
-        /// Assignment
-        UString& operator =( const UString &rOther );
-        /// Concatenation with assignment
-        UString& operator +=( const UString &rOther );
-        /// Concatenation
-        const UString operator +( const UString &rOther ) const;
-        const UString operator +( const char *pString ) const;
-
-
-        /// Search for the first occurance of the substring specified by str
-        /// in this string, starting at position. If found, it returns the
-        /// index of the first character of the matching substring. If not
-        /// found, it returns npos
-        uint32_t find( const UString &str, uint32_t position = 0 ) const;
-        uint32_t find( const char *pString, uint32_t position = 0 ) const;
-
-        /// Insert elements of str in place of n1 elements in this string,
-        /// starting at position position
-        void replace( uint32_t position, uint32_t n1, const UString &str );
-        void replace( uint32_t position, uint32_t n1, const char *pString );
-
-        /// Returns a string composed of copies of the lesser of n and size()
-        /// characters in this string starting at index position
-        UString substr( uint32_t position = 0, uint32_t n = npos) const;
-
-        /// Build a string from an integer
-        static UString fromInt(intf_thread_t *pIntf, int number);
-
-    private:
-        /// Unicode string
-        uint32_t *m_pString;
-        /// String length
-        uint32_t m_length;
+public:
+    static const uint32_t npos;
+
+    /// Copy constructor
+    UString( const UString &rOther );
+
+    /// Create a new unicode string from an UTF8 string
+    UString( intf_thread_t *pIntf, const char *pString );
+
+    ~UString();
+
+    /// Get the unicode string
+    const uint32_t *u_str() const { return m_pString; }
+
+    /// Get the length of the string
+    uint32_t length() const { return m_length; }
+    uint32_t size() const { return m_length; }
+
+    /// Comparison
+    bool operator ==( const UString &rOther ) const;
+    bool operator !=( const UString &rOther ) const;
+    bool operator <( const UString &rOther ) const;
+    bool operator <=( const UString &rOther ) const;
+    bool operator >( const UString &rOther ) const;
+    bool operator >=( const UString &rOther ) const;
+    /// Assignment
+    UString& operator =( const UString &rOther );
+    /// Concatenation with assignment
+    UString& operator +=( const UString &rOther );
+    /// Concatenation
+    const UString operator +( const UString &rOther ) const;
+    const UString operator +( const char *pString ) const;
+
+
+    /// Search for the first occurance of the substring specified by str
+    /// in this string, starting at position. If found, it returns the
+    /// index of the first character of the matching substring. If not
+    /// found, it returns npos
+    uint32_t find( const UString &str, uint32_t position = 0 ) const;
+    uint32_t find( const char *pString, uint32_t position = 0 ) const;
+
+    /// Insert elements of str in place of n1 elements in this string,
+    /// starting at position position
+    void replace( uint32_t position, uint32_t n1, const UString &str );
+    void replace( uint32_t position, uint32_t n1, const char *pString );
+
+    /// Returns a string composed of copies of the lesser of n and size()
+    /// characters in this string starting at index position
+    UString substr( uint32_t position = 0, uint32_t n = npos) const;
+
+    /// Build a string from an integer
+    static UString fromInt(intf_thread_t *pIntf, int number);
+
+private:
+    /// Unicode string
+    uint32_t *m_pString;
+    /// String length
+    uint32_t m_length;
 };
 
 
index 5b3cab356d0aa0db0b248116b6467030f6f64304..4b0618ff57ee80e1beafdfc9fcabcd98bff147b4 100644 (file)
@@ -17,9 +17,9 @@
  * 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 this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
  *****************************************************************************/
 
 #ifndef VAR_BOOL_HPP
 /// Interface for read-only boolean variable
 class VarBool: public Variable, public Subject<VarBool>
 {
-    public:
-        /// Get the variable type
-        virtual const string &getType() const { return m_type; }
+public:
+    /// Get the variable type
+    virtual const string &getType() const { return m_type; }
 
-        /// Get the boolean value
-        virtual bool get() const = 0;
+    /// Get the boolean value
+    virtual bool get() const = 0;
 
-    protected:
-        VarBool( intf_thread_t *pIntf ): Variable( pIntf ) {}
-        virtual ~VarBool() {}
+protected:
+    VarBool( intf_thread_t *pIntf ): Variable( pIntf ) { }
+    virtual ~VarBool() { }
 
-    private:
-        /// Variable type
-        static const string m_type;
+private:
+    /// Variable type
+    static const string m_type;
 };
 
 
 /// Constant true VarBool
 class VarBoolTrue: public VarBool
 {
-    public:
-        VarBoolTrue( intf_thread_t *pIntf ): VarBool( pIntf ) {}
-        virtual ~VarBoolTrue() {}
-        virtual bool get() const { return true; }
+public:
+    VarBoolTrue( intf_thread_t *pIntf ): VarBool( pIntf ) { }
+    virtual ~VarBoolTrue() { }
+    virtual bool get() const { return true; }
 };
 
 
 /// Constant false VarBool
 class VarBoolFalse: public VarBool
 {
-    public:
-        VarBoolFalse( intf_thread_t *pIntf ): VarBool( pIntf ) {}
-        virtual ~VarBoolFalse() {}
-        virtual bool get() const { return false; }
+public:
+    VarBoolFalse( intf_thread_t *pIntf ): VarBool( pIntf ) { }
+    virtual ~VarBoolFalse() { }
+    virtual bool get() const { return false; }
 };
 
 
 /// Boolean variable implementation (read/write)
 class VarBoolImpl: public VarBool
 {
-    public:
-        VarBoolImpl( intf_thread_t *pIntf );
-        virtual ~VarBoolImpl() {}
+public:
+    VarBoolImpl( intf_thread_t *pIntf );
+    virtual ~VarBoolImpl() { }
 
-        // Get the boolean value
-        virtual bool get() const { return m_value; }
+    // Get the boolean value
+    virtual bool get() const { return m_value; }
 
-        /// Set the internal value
-        virtual void set( bool value );
+    /// Set the internal value
+    virtual void set( bool value );
 
-    private:
-        /// Boolean value
-        bool m_value;
+private:
+    /// Boolean value
+    bool m_value;
 };
 
 
 /// Conjunction of two boolean variables (AND)
 class VarBoolAndBool: public VarBool, public Observer<VarBool>
 {
-    public:
-        VarBoolAndBool( intf_thread_t *pIntf, VarBool &rVar1, VarBool &rVar2 );
-        virtual ~VarBoolAndBool();
+public:
+    VarBoolAndBool( intf_thread_t *pIntf, VarBool &rVar1, VarBool &rVar2 );
+    virtual ~VarBoolAndBool();
+    virtual bool get() const { return m_rVar1.get() && m_rVar2.get(); }
 
-        // Get the boolean value
-        virtual bool get() const { return m_rVar1.get() && m_rVar2.get(); }
+    // Called when one of the observed variables is changed
+    void onUpdate( Subject<VarBool> &rVariable, void* );
 
-        // Called when one of the observed variables is changed
-        void onUpdate( Subject<VarBool> &rVariable, void* );
-
-    private:
-        /// Boolean variables
-        VarBool &m_rVar1, &m_rVar2;
+private:
+    /// Boolean variables
+    VarBool &m_rVar1, &m_rVar2;
 };
 
 
 /// Disjunction of two boolean variables (OR)
 class VarBoolOrBool: public VarBool, public Observer<VarBool>
 {
-    public:
-        VarBoolOrBool( intf_thread_t *pIntf, VarBool &rVar1, VarBool &rVar2 );
-        virtual ~VarBoolOrBool();
-
-        // Get the boolean value
-        virtual bool get() const { return m_rVar1.get() || m_rVar2.get(); }
+public:
+    VarBoolOrBool( intf_thread_t *pIntf, VarBool &rVar1, VarBool &rVar2 );
+    virtual ~VarBoolOrBool();
+    virtual bool get() const { return m_rVar1.get() || m_rVar2.get(); }
 
-        // Called when one of the observed variables is changed
-        void onUpdate( Subject<VarBool> &rVariable, void* );
+    // Called when one of the observed variables is changed
+    void onUpdate( Subject<VarBool> &rVariable, void* );
 
-    private:
-        /// Boolean variables
-        VarBool &m_rVar1, &m_rVar2;
+private:
+    /// Boolean variables
+    VarBool &m_rVar1, &m_rVar2;
 };
 
 
 /// Negation of a boolean variable (NOT)
 class VarNotBool: public VarBool, public Observer<VarBool>
 {
-    public:
-        VarNotBool( intf_thread_t *pIntf, VarBool &rVar );
-        virtual ~VarNotBool();
-
-        // Get the boolean value
-        virtual bool get() const { return !m_rVar.get(); }
+public:
+    VarNotBool( intf_thread_t *pIntf, VarBool &rVar );
+    virtual ~VarNotBool();
+    virtual bool get() const { return !m_rVar.get(); }
 
-        // Called when the observed variable is changed
-        void onUpdate( Subject<VarBool> &rVariable, void* );
+    // Called when the observed variable is changed
+    void onUpdate( Subject<VarBool> &rVariable, void* );
 
-    private:
-        /// Boolean variable
-        VarBool &m_rVar;
+private:
+    /// Boolean variable
+    VarBool &m_rVar;
 };
 
 
index d8d7f09cd92a79b5fee0d15e1ea5284ead4adb8f..49d70e636a44482febc95c069472eb8160c757b6 100644 (file)
@@ -17,9 +17,9 @@
  * 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 this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
  *****************************************************************************/
 
 #ifndef VAR_LIST_HPP
 /// List variable
 class VarList: public Variable, public Subject<VarList>
 {
-    public:
-        VarList( intf_thread_t *pIntf );
-        virtual ~VarList();
+public:
+    VarList( intf_thread_t *pIntf );
+    virtual ~VarList();
 
-        /// Get the variable type
-        virtual const string &getType() const { return m_type; }
+    /// Get the variable type
+    virtual const string &getType() const { return m_type; }
 
-        /// Add a pointer on a string in the list
-        virtual void add( const UStringPtr &rcString );
+    /// Add a pointer on a string in the list
+    virtual void add( const UStringPtr &rcString );
 
-        /// Remove the selected elements from the list
-        virtual void delSelected();
+    /// Remove the selected elements from the list
+    virtual void delSelected();
 
-        /// Remove all the elements from the list
-        virtual void clear();
+    /// Remove all the elements from the list
+    virtual void clear();
 
-        /// Get the number of items in the list
-        int size() const { return m_list.size(); }
+    /// Get the number of items in the list
+    int size() const { return m_list.size(); }
 
-        /// Type of an element in the list
-        struct Elem_t
-        {
-            UStringPtr m_cString;
-            bool m_selected;
-            bool m_playing;
+    /// Type of an element in the list
+    struct Elem_t
+    {
+        UStringPtr m_cString;
+        bool m_selected;
+        bool m_playing;
 
-            Elem_t( const UStringPtr &rcString, bool selected = false, bool
-                    playing = false ):
-                m_cString( rcString ), m_selected( selected ),
-                m_playing( playing) {}
-        };
+        Elem_t( const UStringPtr &rcString,
+                bool selected = false, bool playing = false )
+              : m_cString( rcString ),
+                m_selected( selected ), m_playing( playing ) { }
+    };
 
-        /// Iterators
-        typedef list<Elem_t>::iterator Iterator;
-        typedef list<Elem_t>::const_iterator ConstIterator;
+    /// Iterators
+    typedef list<Elem_t>::iterator Iterator;
+    typedef list<Elem_t>::const_iterator ConstIterator;
 
-        /// Beginning of the list
-        Iterator begin() { return m_list.begin(); }
-        ConstIterator begin() const { return m_list.begin(); }
+    /// Beginning of the list
+    Iterator begin() { return m_list.begin(); }
+    ConstIterator begin() const { return m_list.begin(); }
 
-        /// End of the list
-        Iterator end() { return m_list.end(); }
-        ConstIterator end() const { return m_list.end(); }
+    /// End of the list
+    Iterator end() { return m_list.end(); }
+    ConstIterator end() const { return m_list.end(); }
 
-        /// Return an iterator on the n'th element of the list
-        Iterator operator[]( int n );
-        ConstIterator operator[]( int n ) const;
+    /// Return an iterator on the n'th element of the list
+    Iterator operator[]( int n );
+    ConstIterator operator[]( int n ) const;
 
-        /// Execute the action associated to this item
-        virtual void action( Elem_t *pItem ) {}
+    /// Execute the action associated to this item
+    virtual void action( Elem_t *pItem ) { }
 
-        /// Get a reference on the position variable
-        VarPercent &getPositionVar() const
-            { return *((VarPercent*)m_cPosition.get()); }
+    /// Get a reference on the position variable
+    VarPercent &getPositionVar() const
+        { return *((VarPercent*)m_cPosition.get()); }
 
-        /// Get a counted pointer on the position variable
-        const VariablePtr &getPositionVarPtr() const { return m_cPosition; }
+    /// Get a counted pointer on the position variable
+    const VariablePtr &getPositionVarPtr() const { return m_cPosition; }
 
-    protected:
-        /// List of elements
-        list<Elem_t> m_list;
+protected:
+    /// List of elements
+    list<Elem_t> m_list;
 
-    private:
-        /// Variable type
-        static const string m_type;
-        /// Position variable
-        VariablePtr m_cPosition;
+private:
+    /// Variable type
+    static const string m_type;
+    /// Position variable
+    VariablePtr m_cPosition;
 };
 
 
index 7a18ab672ecc746bd25af064d1de39ab7ebe8406..5f5ca3c6b96e4163876233ac5a6d5b9607b837fe 100644 (file)
@@ -17,9 +17,9 @@
  * 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 this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
  *****************************************************************************/
 
 #ifndef VAR_PERCENT_HPP
@@ -34,22 +34,22 @@ class VarPercent;
 /// Percentage variable
 class VarPercent: public Variable, public Subject<VarPercent>
 {
-    public:
-        VarPercent( intf_thread_t *pIntf ): Variable( pIntf ), m_value( 0 ) {}
-        virtual ~VarPercent() {}
-
-        /// Get the variable type
-        virtual const string &getType() const { return m_type; }
-
-        /// Set the internal value
-        virtual void set( float percentage );
-        virtual float get() const { return m_value; }
-
-    private:
-        /// Variable type
-        static const string m_type;
-        /// Percent value
-        float m_value;
+public:
+    VarPercent( intf_thread_t *pIntf ): Variable( pIntf ), m_value( 0 ) { }
+    virtual ~VarPercent() { }
+
+    /// Get the variable type
+    virtual const string &getType() const { return m_type; }
+
+    /// Set the internal value
+    virtual void set( float percentage );
+    virtual float get() const { return m_value; }
+
+private:
+    /// Variable type
+    static const string m_type;
+    /// Percent value
+    float m_value;
 };
 
 #endif
index 0c4e34aa9ca02466419e828cbd2a65788c5cf9bd..36162876d109af9efdef634e3e842d64474e071c 100644 (file)
@@ -17,9 +17,9 @@
  * 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 this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
  *****************************************************************************/
 
 #ifndef VAR_TEXT_HPP
@@ -36,34 +36,34 @@ class VarText: public Variable, public Subject<VarText>,
                public Observer<VarPercent>,
                public Observer<VarText>
 {
-    public:
-        // Set substVars to true to replace "$X" variables in the text
-        VarText( intf_thread_t *pIntf, bool substVars = true );
-        virtual ~VarText();
+public:
+    // Set substVars to true to replace "$X" variables in the text
+    VarText( intf_thread_t *pIntf, bool substVars = true );
+    virtual ~VarText();
 
-        /// Get the variable type
-        virtual const string &getType() const { return m_type; }
+    /// Get the variable type
+    virtual const string &getType() const { return m_type; }
 
-        /// Set the internal value
-        virtual void set( const UString &rText );
-        virtual const UString get() const;
+    /// Set the internal value
+    virtual void set( const UString &rText );
+    virtual const UString get() const;
 
-        /// Methods called when an observed variable is modified
-        virtual void onUpdate( Subject<VarPercent> &rVariable, void* );
-        virtual void onUpdate( Subject<VarText> &rVariable, void* );
+    /// Methods called when an observed variable is modified
+    virtual void onUpdate( Subject<VarPercent> &rVariable, void* );
+    virtual void onUpdate( Subject<VarText> &rVariable, void* );
 
-    private:
-        /// Stop observing other variables
-        void delObservers();
+private:
+    /// Stop observing other variables
+    void delObservers();
 
-        /// Variable type
-        static const string m_type;
-        /// The text of the variable
-        UString m_text;
-        /// Actual text after having replaced the variables
-        UString m_lastText;
-        /// Flag to activate or not "$X" variables substitution
-        bool m_substVars;
+    /// Variable type
+    static const string m_type;
+    /// The text of the variable
+    UString m_text;
+    /// Actual text after having replaced the variables
+    UString m_lastText;
+    /// Flag to activate or not "$X" variables substitution
+    bool m_substVars;
 };
 
 #endif
index ad269bbdfecc20e112de304b29970788214850dc..c03425e84a7648528b487599b595e2c97c1470f9 100644 (file)
@@ -17,9 +17,9 @@
  * 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 this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
  *****************************************************************************/
 
 #ifndef VAR_TREE_HPP
@@ -45,160 +45,161 @@ typedef struct tree_update
 /// Tree variable
 class VarTree: public Variable, public Subject<VarTree, tree_update>
 {
-    public:
-        VarTree( intf_thread_t *pIntf );
+public:
+    VarTree( intf_thread_t *pIntf );
 
-        VarTree( intf_thread_t *pIntf, VarTree *pParent, int id,
-                 const UStringPtr &rcString, bool selected, bool playing,
-                 bool expanded,bool readonly, void *pData );
+    VarTree( intf_thread_t *pIntf, VarTree *pParent, int id,
+             const UStringPtr &rcString, bool selected, bool playing,
+             bool expanded,bool readonly, void *pData );
 
-        virtual ~VarTree();
+    virtual ~VarTree();
 
-        /// Get the variable type
-        virtual const string &getType() const { return m_type; }
+    /// Get the variable type
+    virtual const string &getType() const { return m_type; }
 
-        /// Add a pointer on string in the children's list
-        virtual void add( int id, const UStringPtr &rcString, bool selected,
-                          bool playing, bool expanded, bool readonly,
-                          void *pData );
+    /// Add a pointer on string in the children's list
+    virtual void add( int id, const UStringPtr &rcString, bool selected,
+                      bool playing, bool expanded, bool readonly,
+                      void *pData );
 
-        /// Remove the selected item from the children's list
-        virtual void delSelected();
+    /// Remove the selected item from the children's list
+    virtual void delSelected();
 
-        /// Remove all elements from the children's list
-        virtual void clear();
+    /// Remove all elements from the children's list
+    virtual void clear();
 
-        /// \todo Use accessors for these fields ?
-        int m_id;
-        UStringPtr m_cString;
-        bool m_selected;
-        bool m_playing;
-        bool m_expanded;
-        bool m_deleted;
-        void *m_pData;
+    /// \todo Use accessors for these fields ?
+    int m_id;
+    UStringPtr m_cString;
+    bool m_selected;
+    bool m_playing;
+    bool m_expanded;
+    bool m_deleted;
+    void *m_pData;
 
-        inline bool isReadonly() { return m_readonly; };
+    inline bool isReadonly() { return m_readonly; };
 
-        /// Get the number of children
-        int size() const { return m_children.size(); }
+    /// Get the number of children
+    int size() const { return m_children.size(); }
 
-        /// Iterators
-        typedef list<VarTree>::iterator Iterator;
-        typedef list<VarTree>::const_iterator ConstIterator;
+    /// Iterators
+    typedef list<VarTree>::iterator Iterator;
+    typedef list<VarTree>::const_iterator ConstIterator;
 
-        /// Begining of the children's list
-        Iterator begin() { return m_children.begin(); }
-        ConstIterator begin() const { return m_children.begin(); }
+    /// Begining of the children's list
+    Iterator begin() { return m_children.begin(); }
+    ConstIterator begin() const { return m_children.begin(); }
 
-        /// End of children's list
-        Iterator end() { return m_children.end(); }
-        ConstIterator end() const { return m_children.end(); }
+    /// End of children's list
+    Iterator end() { return m_children.end(); }
+    ConstIterator end() const { return m_children.end(); }
 
-        /// Back of children's list
-        VarTree &back() { return m_children.back(); }
+    /// Back of children's list
+    VarTree &back() { return m_children.back(); }
 
-        /// Return an iterator on the n'th element of the children's list
-        Iterator operator[]( int n );
-        ConstIterator operator[]( int n ) const;
+    /// Return an iterator on the n'th element of the children's list
+    Iterator operator[]( int n );
+    ConstIterator operator[]( int n ) const;
 
-        /// Parent node
-        VarTree *parent() { return m_pParent; }
-        void checkParents( VarTree *pParent );
+    /// Parent node
+    VarTree *parent() { return m_pParent; }
+    void checkParents( VarTree *pParent );
 
-        /// Get next sibling
-        Iterator getNextSibling( Iterator );
+    /// Get next sibling
+    Iterator getNextSibling( Iterator );
 
-        Iterator next_uncle();
-        Iterator prev_uncle();
+    Iterator next_uncle();
+    Iterator prev_uncle();
 
-        /// Get root node
-        VarTree *root()
-        {
-            VarTree *parent = this;
-            while( parent->parent() != NULL )
-                parent = parent->parent();
-            return parent;
-        }
+    /// Get root node
+    VarTree *root()
+    {
+        VarTree *parent = this;
+        while( parent->parent() != NULL )
+            parent = parent->parent();
+        return parent;
+    }
 
-        /// Get first leaf
-        Iterator firstLeaf();
+    /// Get first leaf
+    Iterator firstLeaf();
 
-        void removeChild( VarTree::Iterator item )
-        {
-            m_children.erase( item );
-        }
+    void removeChild( VarTree::Iterator item )
+    {
+        m_children.erase( item );
+    }
 
-        /// Execute the action associated to this item
-        virtual void action( VarTree *pItem ) {}
+    /// Execute the action associated to this item
+    virtual void action( VarTree *pItem ) { }
 
-        /// Get a reference on the position variable
-        VarPercent &getPositionVar() const
-        { return *((VarPercent*)m_cPosition.get()); }
+    /// Get a reference on the position variable
+    VarPercent &getPositionVar() const
+    { return *((VarPercent*)m_cPosition.get()); }
 
-        /// Get a counted pointer on the position variable
-        const VariablePtr &getPositionVarPtr() const { return m_cPosition; }
+    /// Get a counted pointer on the position variable
+    const VariablePtr &getPositionVarPtr() const { return m_cPosition; }
 
-        /// Count the number of items that should be displayed if the playlist window wasn't limited
-        int visibleItems();
+    /// Count the number of items that should be displayed if the
+    /// playlist window wasn't limited
+    int visibleItems();
 
-        /// Count the number of leafs in the tree
-        int countLeafs();
+    /// Count the number of leafs in the tree
+    int countLeafs();
 
-        /// Return iterator to the n'th visible item
-        Iterator getVisibleItem( int n );
+    /// Return iterator to the n'th visible item
+    Iterator getVisibleItem( int n );
 
-        /// Return iterator to the n'th leaf
-        Iterator getLeaf( int n );
+    /// Return iterator to the n'th leaf
+    Iterator getLeaf( int n );
 
-        /// Given an iterator to a visible item, return the next visible item
-        Iterator getNextVisibleItem( Iterator it );
+    /// Given an iterator to a visible item, return the next visible item
+    Iterator getNextVisibleItem( Iterator it );
 
-        /// Given an it to a visible item, return the previous visible item
-        Iterator getPrevVisibleItem( Iterator it );
+    /// Given an it to a visible item, return the previous visible item
+    Iterator getPrevVisibleItem( Iterator it );
 
-        /// Given an iterator to an item, return the next item
-        Iterator getNextItem( Iterator it );
+    /// Given an iterator to an item, return the next item
+    Iterator getNextItem( Iterator it );
 
-        /// Given an iterator to an item, return the previous item
-        Iterator getPrevItem( Iterator it );
+    /// Given an iterator to an item, return the previous item
+    Iterator getPrevItem( Iterator it );
 
-        /// Given an iterator to an item, return the next leaf
-        Iterator getNextLeaf( Iterator it );
+    /// Given an iterator to an item, return the next leaf
+    Iterator getNextLeaf( Iterator it );
 
-        /// Given an iterator to an item, return the previous leaf
-        Iterator getPrevLeaf( Iterator it );
+    /// Given an iterator to an item, return the previous leaf
+    Iterator getPrevLeaf( Iterator it );
 
-        /// Find a children node with the given id
-        Iterator findById( int id );
+    /// Find a children node with the given id
+    Iterator findById( int id );
 
-        /// Ensure an item is expanded
-        void ensureExpanded( VarTree::Iterator );
+    /// Ensure an item is expanded
+    void ensureExpanded( VarTree::Iterator );
 
-        /// Get depth (root depth is 0)
-        int depth()
-        {
-            VarTree *parent = this;
-            int depth = 0;
-            while( ( parent = parent->parent() ) != NULL )
-                depth++;
-            return depth;
-        }
+    /// Get depth (root depth is 0)
+    int depth()
+    {
+        VarTree *parent = this;
+        int depth = 0;
+        while( ( parent = parent->parent() ) != NULL )
+            depth++;
+        return depth;
+    }
 
 
-    private:
-        /// List of children
-        list<VarTree> m_children;
+private:
+    /// List of children
+    list<VarTree> m_children;
 
-        /// Pointer to parent node
-        VarTree *m_pParent;
+    /// Pointer to parent node
+    VarTree *m_pParent;
 
-        bool m_readonly;
+    bool m_readonly;
 
-        /// Variable type
-        static const string m_type;
+    /// Variable type
+    static const string m_type;
 
-        /// Position variable
-        VariablePtr m_cPosition;
+    /// Position variable
+    VariablePtr m_cPosition;
 };
 
 #endif
index ac4b568f0cce987a493b0d1a22d775a595e03a0e..857e9e2521f17004edda68a561233fc9bffdf994 100644 (file)
@@ -17,9 +17,9 @@
  * 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 this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
  *****************************************************************************/
 
 #ifndef VARIABLE_HPP
 /// Base class for variable objects
 class Variable: public SkinObject
 {
-    public:
-        virtual ~Variable() {}
+public:
+    virtual ~Variable() { }
 
-        /// Get the variable type
-        virtual const string &getType() const = 0;
+    /// Get the variable type
+    virtual const string &getType() const = 0;
 
-    protected:
-        Variable( intf_thread_t *pIntf ): SkinObject( pIntf ) {}
+protected:
+    Variable( intf_thread_t *pIntf ): SkinObject( pIntf ) { }
 };
 
 
index 18c59d931aa170e4d283a1d2c9e7f535860234a3..ae90966a0be87f9fb8b1930a856beb318a9ae04f 100644 (file)
@@ -16,9 +16,9 @@
  * 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 this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
  *****************************************************************************/
 
 #ifndef EQUALIZER_HPP
 /// Variable for graphical equalizer
 class EqualizerBands: public SkinObject, public Observer<VarPercent>
 {
-    public:
-        /// Number of bands
-        static const int kNbBands = 10;
+public:
+    /// Number of bands
+    static const int kNbBands = 10;
 
-        EqualizerBands( intf_thread_t *pIntf );
-        virtual ~EqualizerBands();
+    EqualizerBands( intf_thread_t *pIntf );
+    virtual ~EqualizerBands();
 
-        /// Set the equalizer bands from a configuration string,
-        /// e.g. "1 5.2 -3.6 0 0 2.5 0 0 0 0"
-        void set( string bands );
+    /// Set the equalizer bands from a configuration string,
+    /// e.g. "1 5.2 -3.6 0 0 2.5 0 0 0 0"
+    void set( string bands );
 
-        /// Return the variable for a specific band
-        VariablePtr getBand( int band );
+    /// Return the variable for a specific band
+    VariablePtr getBand( int band );
 
-    private:
-        /// Array of equalizer bands
-        VariablePtr m_cBands[kNbBands];
-        /// Flag set when an update is in progress
-        bool m_isUpdating;
+private:
+    /// Array of equalizer bands
+    VariablePtr m_cBands[kNbBands];
+    /// Flag set when an update is in progress
+    bool m_isUpdating;
 
-        /// Callback for band updates
-        virtual void onUpdate( Subject<VarPercent> &rBand , void *);
+    /// Callback for band updates
+    virtual void onUpdate( Subject<VarPercent> &rBand , void *);
 };
 
 
 /// Variable for equalizer preamp
 class EqualizerPreamp: public VarPercent
 {
-    public:
-        EqualizerPreamp( intf_thread_t *pIntf );
-        virtual ~EqualizerPreamp() {}
+public:
+    EqualizerPreamp( intf_thread_t *pIntf );
+    virtual ~EqualizerPreamp() { }
 
-        virtual void set( float percentage, bool updateVLC );
+    virtual void set( float percentage, bool updateVLC );
 
-        void set( float percentage ) { set( percentage, true ); }
+    void set( float percentage ) { set( percentage, true ); }
 };
 
 
index b1d1db675bdd0c0a59e7cd5557b9ec08761d4906..07eadd30fc095c330ce6bf5810c1ab45c54db8e4 100644 (file)
@@ -17,9 +17,9 @@
  * 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 this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
  *****************************************************************************/
 
 #ifndef PLAYTREE_HPP
 /// Variable for VLC playlist (new tree format)
 class Playtree: public VarTree
 {
-    public:
-        Playtree( intf_thread_t *pIntf );
-        virtual ~Playtree();
+public:
+    Playtree( intf_thread_t *pIntf );
+    virtual ~Playtree();
 
-        /// Remove the selected elements from the list
-        virtual void delSelected();
+    /// Remove the selected elements from the list
+    virtual void delSelected();
 
-        /// Execute the action associated to this item
-        virtual void action( VarTree *pItem );
+    /// Execute the action associated to this item
+    virtual void action( VarTree *pItem );
 
-        /// Function called to notify playlist changes
-        void onChange();
+    /// Function called to notify playlist changes
+    void onChange();
 
-        /// Function called to notify playlist item update
-        void onUpdateItem( int id );
+    /// Function called to notify playlist item update
+    void onUpdateItem( int id );
 
-        /// Function called to notify playlist item append
-        void onAppend( playlist_add_t * );
+    /// Function called to notify playlist item append
+    void onAppend( playlist_add_t * );
 
-        /// Function called to notify playlist item delete
-        void onDelete( int );
+    /// Function called to notify playlist item delete
+    void onDelete( int );
 
-        /// Items waiting to be appended
-        int i_items_to_append;
+    /// Items waiting to be appended
+    int i_items_to_append;
 
-    private:
-        /// VLC playlist object
-        playlist_t *m_pPlaylist;
+private:
+    /// VLC playlist object
+    playlist_t *m_pPlaylist;
 
-        /// Build the list from the VLC playlist
-        void buildTree();
+    /// Build the list from the VLC playlist
+    void buildTree();
 
-        /// Update Node's children
-        void buildNode( playlist_item_t *p_node, VarTree &m_pNode );
+    /// Update Node's children
+    void buildNode( playlist_item_t *p_node, VarTree &m_pNode );
 };
 
 #endif
index f45527549beabedbe4c18ce4962c3f0a8566006a..ea4cb70992827dae5884641864302a8404511978 100644 (file)
@@ -17,9 +17,9 @@
  * 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 this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
  *****************************************************************************/
 
 #ifndef TIME_HPP
 /// Variable for VLC stream time
 class StreamTime: public VarPercent
 {
-    public:
-        StreamTime( intf_thread_t *pIntf ): VarPercent( pIntf ) {}
-        virtual ~StreamTime() {}
-
-        virtual void set( float percentage, bool updateVLC );
-
-        virtual void set( float percentage ) { set( percentage, true ); }
-
-        /// Return a string containing a value from 0 to 100
-        virtual const string getAsStringPercent() const;
-        /// Return the current time formatted as a time display (h:mm:ss)
-        virtual const string getAsStringCurrTime( bool bShortFormat = false ) const;
-        /// Return the time left formatted as a time display (h:mm:ss)
-        virtual const string getAsStringTimeLeft( bool bShortFormat = false ) const;
-        /// Return the duration formatted as a time display (h:mm:ss)
-        virtual const string getAsStringDuration( bool bShortFormat = false ) const;
-
-    private:
-        /// Convert a number of seconds into "h:mm:ss" format
-        const string formatTime( int seconds, bool bShortFormat ) const;
+public:
+    StreamTime( intf_thread_t *pIntf ): VarPercent( pIntf ) { }
+    virtual ~StreamTime() { }
+
+    virtual void set( float percentage, bool updateVLC );
+
+    virtual void set( float percentage ) { set( percentage, true ); }
+
+    /// Return a string containing a value from 0 to 100
+    virtual const string getAsStringPercent() const;
+    /// Return the current time formatted as a time display (h:mm:ss)
+    virtual const string getAsStringCurrTime( bool bShortFormat = false ) const;
+    /// Return the time left formatted as a time display (h:mm:ss)
+    virtual const string getAsStringTimeLeft( bool bShortFormat = false ) const;
+    /// Return the duration formatted as a time display (h:mm:ss)
+    virtual const string getAsStringDuration( bool bShortFormat = false ) const;
+
+private:
+    /// Convert a number of seconds into "h:mm:ss" format
+    const string formatTime( int seconds, bool bShortFormat ) const;
 };
 
 #endif
index 1e36775d62abf74519308f04cb13fe6e05113482..7a12e609f1b39d70bdbf859c3280f3e6777e8abd 100644 (file)
@@ -17,9 +17,9 @@
  * 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 this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
  *****************************************************************************/
 
 #ifndef VOLUME_HPP
 /// Variable for VLC volume
 class Volume: public VarPercent
 {
-    public:
-        Volume( intf_thread_t *pIntf );
-        virtual ~Volume() {}
+public:
+    Volume( intf_thread_t *pIntf );
+    virtual ~Volume() { }
 
-        virtual void set( float percentage, bool updateVLC );
+    virtual void set( float percentage, bool updateVLC );
 
-        virtual void set( float percentage ) { set( percentage, true ); }
+    virtual void set( float percentage ) { set( percentage, true ); }
 
-        virtual string getAsStringPercent() const;
+    virtual string getAsStringPercent() const;
 };
 
 
index 3c263deba7e1abe049c9ec4aac48b853268a3155..c7f80d83b5cd1cc9869c225e76143096570c2900 100644 (file)
@@ -17,9 +17,9 @@
  * 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 this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
  *****************************************************************************/
 
 #ifndef WIN32_DRAGDROP_HPP
 
 class Win32DragDrop: public SkinObject, public IDropTarget
 {
-    public:
-       Win32DragDrop( intf_thread_t *pIntf, bool playOnDrop );
-       virtual ~Win32DragDrop() {}
+public:
+   Win32DragDrop( intf_thread_t *pIntf, bool playOnDrop );
+   virtual ~Win32DragDrop() { }
 
-    protected:
-        // IUnknown methods
-        STDMETHOD(QueryInterface)( REFIID riid, void FAR* FAR* ppvObj );
-        STDMETHOD_(ULONG, AddRef)();
-        STDMETHOD_(ULONG, Release)();
+protected:
+    // IUnknown methods
+    STDMETHOD(QueryInterface)( REFIID riid, void FAR* FAR* ppvObj );
+    STDMETHOD_(ULONG, AddRef)();
+    STDMETHOD_(ULONG, Release)();
 
-        // IDropTarget methods
-        STDMETHOD(DragEnter)( LPDATAOBJECT pDataObj, DWORD grfKeyState,
-                              POINTL pt, DWORD *pdwEffect );
-        STDMETHOD(DragOver)( DWORD grfKeyState, POINTL pt, DWORD *pdwEffect );
-        STDMETHOD(DragLeave)();
-        STDMETHOD(Drop)( LPDATAOBJECT pDataObj, DWORD grfKeyState,
-                         POINTL pt, DWORD *pdwEffect );
+    // IDropTarget methods
+    STDMETHOD(DragEnter)( LPDATAOBJECT pDataObj, DWORD grfKeyState,
+                          POINTL pt, DWORD *pdwEffect );
+    STDMETHOD(DragOver)( DWORD grfKeyState, POINTL pt, DWORD *pdwEffect );
+    STDMETHOD(DragLeave)();
+    STDMETHOD(Drop)( LPDATAOBJECT pDataObj, DWORD grfKeyState,
+                     POINTL pt, DWORD *pdwEffect );
 
-    private:
-        /// Internal reference counter
-        unsigned long m_references;
-        /// Indicates whether the file(s) must be played immediately
-        bool m_playOnDrop;
+private:
+    /// Internal reference counter
+    unsigned long m_references;
+    /// Indicates whether the file(s) must be played immediately
+    bool m_playOnDrop;
 
-        /// Helper function
-        void HandleDrop( HDROP HDrop );
+    /// Helper function
+    void HandleDrop( HDROP HDrop );
 };
 
 
index 77904d239ec3164e88bcd9fc7145964df37198cd..9846e96d39db83f3c67b7305c9bff024e59ab3fa 100644 (file)
@@ -17,9 +17,9 @@
  * 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 this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
  *****************************************************************************/
 
 #ifndef WIN32_FACTORY_HPP
 /// Class used to instanciate Win32 specific objects
 class Win32Factory: public OSFactory
 {
-    public:
-        Win32Factory( intf_thread_t *pIntf );
-        virtual ~Win32Factory();
+public:
+    Win32Factory( intf_thread_t *pIntf );
+    virtual ~Win32Factory();
 
-        /// Initialization method
-        virtual bool init();
+    /// Initialization method
+    virtual bool init();
 
-        /// Instantiate an object OSGraphics
-        virtual OSGraphics *createOSGraphics( int width, int height );
+    /// Instantiate an object OSGraphics
+    virtual OSGraphics *createOSGraphics( int width, int height );
 
-        /// Get the instance of the singleton OSLoop
-        virtual OSLoop *getOSLoop();
+    /// Get the instance of the singleton OSLoop
+    virtual OSLoop *getOSLoop();
 
-        /// Destroy the instance of OSLoop
-        virtual void destroyOSLoop();
+    /// Destroy the instance of OSLoop
+    virtual void destroyOSLoop();
 
-        /// Minimize all the windows
-        virtual void minimize();
+    /// Minimize all the windows
+    virtual void minimize();
 
-        /// Restore the minimized windows
-        virtual void restore();
+    /// Restore the minimized windows
+    virtual void restore();
 
-        /// Add an icon in the system tray
-        virtual void addInTray();
+    /// Add an icon in the system tray
+    virtual void addInTray();
 
-        /// Remove the icon from the system tray
-        virtual void removeFromTray();
+    /// Remove the icon from the system tray
+    virtual void removeFromTray();
 
-        /// Show the task in the task bar
-        virtual void addInTaskBar();
+    /// Show the task in the task bar
+    virtual void addInTaskBar();
 
-        /// Remove the task from the task bar
-        virtual void removeFromTaskBar();
+    /// Remove the task from the task bar
+    virtual void removeFromTaskBar();
 
-        /// Instantiate an OSTimer with the given command
-        virtual OSTimer *createOSTimer( CmdGeneric &rCmd );
+    /// Instantiate an OSTimer with the given command
+    virtual OSTimer *createOSTimer( CmdGeneric &rCmd );
 
-        /// Instantiate an OSWindow object
-        virtual OSWindow *createOSWindow( GenericWindow &rWindow,
-                                          bool dragDrop, bool playOnDrop,
-                                          OSWindow *pParent );
+    /// Instantiate an OSWindow object
+    virtual OSWindow *createOSWindow( GenericWindow &rWindow,
+                                      bool dragDrop, bool playOnDrop,
+                                      OSWindow *pParent );
 
-        /// Instantiate an object OSTooltip
-        virtual OSTooltip *createOSTooltip();
+    /// Instantiate an object OSTooltip
+    virtual OSTooltip *createOSTooltip();
 
-        /// Instantiate an object OSPopup
-        virtual OSPopup *createOSPopup();
+    /// Instantiate an object OSPopup
+    virtual OSPopup *createOSPopup();
 
-        /// Get the directory separator
-        virtual const string &getDirSeparator() const { return m_dirSep; }
+    /// Get the directory separator
+    virtual const string &getDirSeparator() const { return m_dirSep; }
 
-        /// Get the resource path
-        virtual const list<string> &getResourcePath() const
-            { return m_resourcePath; }
+    /// Get the resource path
+    virtual const list<string> &getResourcePath() const
+        { return m_resourcePath; }
 
-        /// Get the screen size
-        virtual int getScreenWidth() const;
-        virtual int getScreenHeight() const;
+    /// Get the screen size
+    virtual int getScreenWidth() const;
+    virtual int getScreenHeight() const;
 
-        /// Get the work area (screen area without taskbars)
-        virtual SkinsRect getWorkArea() const;
+    /// Get the work area (screen area without taskbars)
+    virtual SkinsRect getWorkArea() const;
 
-        /// Get the position of the mouse
-        virtual void getMousePos( int &rXPos, int &rYPos ) const;
+    /// Get the position of the mouse
+    virtual void getMousePos( int &rXPos, int &rYPos ) const;
 
-        /// Change the cursor
-        virtual void changeCursor( CursorType_t type ) const;
+    /// Change the cursor
+    virtual void changeCursor( CursorType_t type ) const;
 
-        /// Delete a directory recursively
-        virtual void rmDir( const string &rPath );
+    /// Delete a directory recursively
+    virtual void rmDir( const string &rPath );
 
-        /// Map to find the GenericWindow associated with a Win32Window
-        map<HWND, GenericWindow*> m_windowMap;
+    /// Map to find the GenericWindow associated with a Win32Window
+    map<HWND, GenericWindow*> m_windowMap;
 
-        /// Functions dynamically loaded from the dll, because they don't exist
-        /// on Win9x/NT4
-        // We dynamically load msimg32.dll to get a pointer to TransparentBlt()
-        BOOL (WINAPI *TransparentBlt)( HDC, int, int, int, int,
-                                       HDC, int, int, int, int, UINT );
-        BOOL (WINAPI *AlphaBlend)( HDC, int, int, int, int,
-                                   HDC, int, int, int, int, BLENDFUNCTION );
+    /// Functions dynamically loaded from the dll, because they don't exist
+    /// on Win9x/NT4
+    // We dynamically load msimg32.dll to get a pointer to TransparentBlt()
+    BOOL (WINAPI *TransparentBlt)( HDC, int, int, int, int,
+                                   HDC, int, int, int, int, UINT );
+    BOOL (WINAPI *AlphaBlend)( HDC, int, int, int, int,
+                               HDC, int, int, int, int, BLENDFUNCTION );
 
-        // Idem for user32.dll and SetLayeredWindowAttributes()
-        BOOL (WINAPI *SetLayeredWindowAttributes)( HWND, COLORREF,
-                                                   BYTE, DWORD );
+    // Idem for user32.dll and SetLayeredWindowAttributes()
+    BOOL (WINAPI *SetLayeredWindowAttributes)( HWND, COLORREF,
+                                               BYTE, DWORD );
 
-    private:
-        /// Handle of the instance
-        HINSTANCE m_hInst;
-        /// Handle of the parent window
-        HWND m_hParentWindow;
-        /// Structure for the system tray
-        NOTIFYICONDATA m_trayIcon;
-        /// Handle on msimg32.dll (for TransparentBlt)
-        HINSTANCE m_hMsimg32;
-        /// Handle on user32.dll (for SetLayeredWindowAttributes)
-        HINSTANCE m_hUser32;
-        /// Directory separator
-        const string m_dirSep;
-        /// Resource path
-        list<string> m_resourcePath;
+private:
+    /// Handle of the instance
+    HINSTANCE m_hInst;
+    /// Handle of the parent window
+    HWND m_hParentWindow;
+    /// Structure for the system tray
+    NOTIFYICONDATA m_trayIcon;
+    /// Handle on msimg32.dll (for TransparentBlt)
+    HINSTANCE m_hMsimg32;
+    /// Handle on user32.dll (for SetLayeredWindowAttributes)
+    HINSTANCE m_hUser32;
+    /// Directory separator
+    const string m_dirSep;
+    /// Resource path
+    list<string> m_resourcePath;
 };
 
 
index 06b3bd3b8ef2e2a87998e45e045435f6ced81058..aa728add46676223269838dbe0bb990cc76b5e64 100644 (file)
@@ -17,9 +17,9 @@
  * 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 this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
  *****************************************************************************/
 
 #ifndef WIN32_GRAPHICS_HPP
@@ -34,66 +34,66 @@ class GenericBitmap;
 /// Win32 implementation of OSGraphics
 class Win32Graphics: public OSGraphics
 {
-    public:
-        Win32Graphics( intf_thread_t *pIntf, int width, int height );
-        virtual ~Win32Graphics();
+public:
+    Win32Graphics( intf_thread_t *pIntf, int width, int height );
+    virtual ~Win32Graphics();
 
-        /// Clear the graphics
-        virtual void clear();
+    /// Clear the graphics
+    virtual void clear();
 
-        /// Render a bitmap on this graphics
-        virtual void drawBitmap( const GenericBitmap &rBitmap, int xSrc = 0,
-                                 int ySrc = 0, int xDest = 0, int yDest = 0,
-                                 int width = -1, int height = -1,
-                                 bool blend = false );
+    /// Render a bitmap on this graphics
+    virtual void drawBitmap( const GenericBitmap &rBitmap, int xSrc = 0,
+                             int ySrc = 0, int xDest = 0, int yDest = 0,
+                             int width = -1, int height = -1,
+                             bool blend = false );
 
-        /// Draw another graphics on this one
-        virtual void drawGraphics( const OSGraphics &rGraphics, int xSrc = 0,
-                                   int ySrc = 0, int xDest = 0, int yDest = 0,
-                                   int width = -1, int height = -1 );
+    /// Draw another graphics on this one
+    virtual void drawGraphics( const OSGraphics &rGraphics, int xSrc = 0,
+                               int ySrc = 0, int xDest = 0, int yDest = 0,
+                               int width = -1, int height = -1 );
 
-        /// Draw an empty rectangle on the grahics (color is #RRGGBB)
-        virtual void drawRect( int left, int top, int width, int height,
-                               uint32_t color );
+    /// Draw an empty rectangle on the grahics (color is #RRGGBB)
+    virtual void drawRect( int left, int top, int width, int height,
+                           uint32_t color );
 
 
-        /// Draw a filled rectangle on the grahics (color is #RRGGBB)
-        virtual void fillRect( int left, int top, int width, int height,
-                               uint32_t color );
+    /// Draw a filled rectangle on the grahics (color is #RRGGBB)
+    virtual void fillRect( int left, int top, int width, int height,
+                           uint32_t color );
 
-        /// Set the shape of a window with the mask of this graphics.
-        virtual void applyMaskToWindow( OSWindow &rWindow );
+    /// Set the shape of a window with the mask of this graphics.
+    virtual void applyMaskToWindow( OSWindow &rWindow );
 
-        /// Copy the graphics on a window
-        virtual void copyToWindow( OSWindow &rWindow, int xSrc,
-                                   int ySrc, int width, int height,
-                                   int xDest, int yDest );
+    /// Copy the graphics on a window
+    virtual void copyToWindow( OSWindow &rWindow, int xSrc,
+                               int ySrc, int width, int height,
+                               int xDest, int yDest );
 
-        /// Tell whether the pixel at the given position is visible
-        virtual bool hit( int x, int y ) const;
+    /// Tell whether the pixel at the given position is visible
+    virtual bool hit( int x, int y ) const;
 
-        /// Getters for the size
-        virtual int getWidth() const { return m_width; }
-        virtual int getHeight() const { return m_height; }
+    /// Getters for the size
+    virtual int getWidth() const { return m_width; }
+    virtual int getHeight() const { return m_height; }
 
-        /// Get the device context handler
-        virtual HDC getDC() const { return m_hDC; }
+    /// Get the device context handler
+    virtual HDC getDC() const { return m_hDC; }
 
-        /// Get the mask
-        virtual HRGN getMask() const { return m_mask; }
+    /// Get the mask
+    virtual HRGN getMask() const { return m_mask; }
 
-    private:
-        /// Size of the image
-        int m_width, m_height;
+private:
+    /// Size of the image
+    int m_width, m_height;
 
-        /// Device context
-        HDC m_hDC;
+    /// Device context
+    HDC m_hDC;
 
-        /// Transparency mask
-        HRGN m_mask;
+    /// Transparency mask
+    HRGN m_mask;
 
-        /// Add a segment in a region
-        void addSegmentInRegion( HRGN &rMask, int start, int end, int line );
+    /// Add a segment in a region
+    void addSegmentInRegion( HRGN &rMask, int start, int end, int line );
 };
 
 
index e26439f9525d150addd8498414775c04a6aa0cce..0775e1aa90465ae8efdf79fa08620fa49d4405bd 100644 (file)
@@ -17,9 +17,9 @@
  * 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 this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
  *****************************************************************************/
 
 #ifndef WIN32_LOOP_HPP
@@ -35,30 +35,30 @@ class GenericWindow;
 /// Main event loop for Win32
 class Win32Loop: public OSLoop
 {
-    public:
-        /// Get the instance of Win32Loop
-        static OSLoop *instance( intf_thread_t *pIntf );
+public:
+    /// Get the instance of Win32Loop
+    static OSLoop *instance( intf_thread_t *pIntf );
 
-        /// Destroy the instance of Win32Loop
-        static void destroy( intf_thread_t *pIntf );
+    /// Destroy the instance of Win32Loop
+    static void destroy( intf_thread_t *pIntf );
 
-        /// Enter the event loop
-        virtual void run();
+    /// Enter the event loop
+    virtual void run();
 
-        /// Exit the main loop
-        virtual void exit();
+    /// Exit the main loop
+    virtual void exit();
 
-    private:
-        // Private because it is a singleton
-        Win32Loop( intf_thread_t *pIntf );
-        virtual ~Win32Loop();
+private:
+    // Private because it is a singleton
+    Win32Loop( intf_thread_t *pIntf );
+    virtual ~Win32Loop();
 
-        /// Map associating special (i.e. non ascii) virtual key codes with
-        /// internal vlc key codes
-        map<int, int> virtKeyToVlcKey;
+    /// Map associating special (i.e. non ascii) virtual key codes with
+    /// internal vlc key codes
+    map<int, int> virtKeyToVlcKey;
 
-        /// Helper function to find the modifier in a Windows message
-        int getMod( WPARAM wParam ) const;
+    /// Helper function to find the modifier in a Windows message
+    int getMod( WPARAM wParam ) const;
 };
 
 #endif
index 3ffb1178543c38feb15ce80886d29e2ad0f28365..6aefd08df7c71d18b20f21e4dde5230685d1a403 100644 (file)
@@ -16,9 +16,9 @@
  * 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 this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
  *****************************************************************************/
 
 #ifndef WIN32_POPUP_HPP
 /// Win32 implementation of OSPopup
 class Win32Popup: public OSPopup
 {
-    public:
-        Win32Popup( intf_thread_t *pIntf, HWND hAssociatedWindow );
+public:
+    Win32Popup( intf_thread_t *pIntf, HWND hAssociatedWindow );
 
-        virtual ~Win32Popup();
+    virtual ~Win32Popup();
 
-        /// Show the popup menu at the given (absolute) corrdinates
-        virtual void show( int xPos, int yPos );
+    /// Show the popup menu at the given (absolute) corrdinates
+    virtual void show( int xPos, int yPos );
 
-        /// Hide the popup menu
-        virtual void hide();
+    /// Hide the popup menu
+    virtual void hide();
 
-        /// Append a new menu item with the given label to the popup menu
-        virtual void addItem( const string &rLabel, int pos );
+    /// Append a new menu item with the given label to the popup menu
+    virtual void addItem( const string &rLabel, int pos );
 
-        /// Create a dummy menu item to separate sections
-        virtual void addSeparator( int pos );
+    /// Create a dummy menu item to separate sections
+    virtual void addSeparator( int pos );
 
-        /// Return the position of the item identified by the given id
-        virtual int getPosFromId( int id ) const { return id; }
+    /// Return the position of the item identified by the given id
+    virtual int getPosFromId( int id ) const { return id; }
 
-    private:
-        /// Menu handle
-        HMENU m_hMenu;
-        /// Handle of the window which will receive the menu events
-        HWND m_hWnd;
+private:
+    /// Menu handle
+    HMENU m_hMenu;
+    /// Handle of the window which will receive the menu events
+    HWND m_hWnd;
 
-        /**
-         * Find the item before which to insert another item so that the
-         * newly added item is at the position pos _when the whole menu has
-         * been built_ (no assumption is made for the order of insertion of the
-         * items)
-         */
-        unsigned int findInsertionPoint( unsigned int pos ) const;
+    /**
+     * Find the item before which to insert another item so that the
+     * newly added item is at the position pos _when the whole menu has
+     * been built_ (no assumption is made for the order of insertion of
+     * the items)
+     */
+    unsigned int findInsertionPoint( unsigned int pos ) const;
 };
 
 
index f75e2fdab42a586d6e553605af0228c9cf1a0496..9ee1161d2e6c970b8471fcc5f22064c7ff2097c8 100644 (file)
@@ -17,9 +17,9 @@
  * 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 this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
  *****************************************************************************/
 
 #ifndef WIN32_TIMER_HPP
@@ -32,33 +32,33 @@ class CmdGeneric;
 // Win32 specific timer
 class Win32Timer: public OSTimer
 {
-    public:
-        Win32Timer( intf_thread_t *pIntf, CmdGeneric &rCmd, HWND hWnd );
-        virtual ~Win32Timer();
+public:
+    Win32Timer( intf_thread_t *pIntf, CmdGeneric &rCmd, HWND hWnd );
+    virtual ~Win32Timer();
 
-        /// (Re)start the timer with the given delay (in ms). If oneShot is
-        /// true, stop it after the first execution of the callback.
-        virtual void start( int delay, bool oneShot );
+    /// (Re)start the timer with the given delay (in ms). If oneShot is
+    /// true, stop it after the first execution of the callback.
+    virtual void start( int delay, bool oneShot );
 
-        /// Stop the timer
-        virtual void stop();
+    /// Stop the timer
+    virtual void stop();
 
-        /// Execute the callback
-        void execute();
+    /// Execute the callback
+    void execute();
 
-    private:
-        /// Command to execute
-        CmdGeneric &m_rCommand;
+private:
+    /// Command to execute
+    CmdGeneric &m_rCommand;
 
-        /// Delay between two execute
-        mtime_t m_interval;
+    /// Delay between two execute
+    mtime_t m_interval;
 
-        /// Flag to tell whether the timer must be stopped after the
-        /// first execution
-        bool m_oneShot;
+    /// Flag to tell whether the timer must be stopped after the
+    /// first execution
+    bool m_oneShot;
 
-        /// Handle of the window to which the timer will be attached
-        HWND m_hWnd;
+    /// Handle of the window to which the timer will be attached
+    HWND m_hWnd;
 };
 
 
index dfb9a425ef303fd56e1278df25e50b0ddcf73ee5..f26dfa43db51ef2f6352c0836686592943dd7e2b 100644 (file)
@@ -17,9 +17,9 @@
  * 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 this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
  *****************************************************************************/
 
 #ifndef WIN32_TOOLTIP_HPP
 /// Win32 implementation of OSTooltip
 class Win32Tooltip: public OSTooltip
 {
-    public:
-        Win32Tooltip( intf_thread_t *pIntf, HINSTANCE hInst,
-                            HWND hParentWindow );
+public:
+    Win32Tooltip( intf_thread_t *pIntf, HINSTANCE hInst, HWND hParentWindow );
 
-        virtual ~Win32Tooltip();
+    virtual ~Win32Tooltip();
 
-        /// Show the tooltip
-        virtual void show( int left, int top, OSGraphics &rText );
+    /// Show the tooltip
+    virtual void show( int left, int top, OSGraphics &rText );
 
-        /// Hide the tooltip
-        virtual void hide();
+    /// Hide the tooltip
+    virtual void hide();
 
-    private:
-        /// Window ID
-        HWND m_hWnd;
+private:
+    /// Window ID
+    HWND m_hWnd;
 };
 
 
index 3b430ee96cfe280d3508fd5ac93159ca34d3d69e..0cad495a5c8254eeafa1c53a93928d5bf2760f38 100644 (file)
@@ -17,9 +17,9 @@
  * 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 this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
  *****************************************************************************/
 
 #ifndef WIN32_WINDOW_HPP
 /// Win32 implementation of OSWindow
 class Win32Window: public OSWindow
 {
-    public:
-        Win32Window( intf_thread_t *pIntf, GenericWindow &rWindow,
-                     HINSTANCE hInst, HWND hParentWindow,
-                     bool dragDrop, bool playOnDrop,
-                     Win32Window *pParentWindow );
-        virtual ~Win32Window();
-
-        // Show the window
-        virtual void show() const;
-
-        // Hide the window
-        virtual void hide() const;
-
-        /// Move and resize the window
-        virtual void moveResize( int left, int top,
-                                 int width, int height ) const;
-
-        /// Bring the window on top
-        virtual void raise() const;
-
-        /// Set the opacity of the window (0 = transparent, 255 = opaque)
-        virtual void setOpacity( uint8_t value ) const;
-
-        /// Toggle the window on top
-        virtual void toggleOnTop( bool onTop ) const;
-
-        /// Getter for the window handle
-        HWND getHandle() const { return m_hWnd; }
-
-        /// Getter for the window handle
-        void* getOSHandle() const { return (void*) m_hWnd; }
-
-        /// reparent the window
-        void reparent( void* OSHandle, int x, int y, int w, int h );
-
-    private:
-        /// Window handle
-        HWND m_hWnd;
-        /// Window parent's handle
-        HWND m_hWnd_parent;
-        /// Indicates whether the window handles drag&drop events
-        bool m_dragDrop;
-        /// Drop target
-        LPDROPTARGET m_pDropTarget;
-        /// Indicates whether the window is layered
-        mutable bool m_isLayered;
-        /// Parent window
-        Win32Window *m_pParent;
+public:
+    Win32Window( intf_thread_t *pIntf, GenericWindow &rWindow,
+                 HINSTANCE hInst, HWND hParentWindow,
+                 bool dragDrop, bool playOnDrop,
+                 Win32Window *pParentWindow );
+    virtual ~Win32Window();
+
+    // Show the window
+    virtual void show() const;
+
+    // Hide the window
+    virtual void hide() const;
+
+    /// Move and resize the window
+    virtual void moveResize( int left, int top, int width, int height ) const;
+
+    /// Bring the window on top
+    virtual void raise() const;
+
+    /// Set the opacity of the window (0 = transparent, 255 = opaque)
+    virtual void setOpacity( uint8_t value ) const;
+
+    /// Toggle the window on top
+    virtual void toggleOnTop( bool onTop ) const;
+
+    /// Getter for the window handle
+    HWND getHandle() const { return m_hWnd; }
+
+    /// Getter for the window handle
+    void* getOSHandle() const { return (void*) m_hWnd; }
+
+    /// reparent the window
+    void reparent( void* OSHandle, int x, int y, int w, int h );
+
+private:
+    /// Window handle
+    HWND m_hWnd;
+    /// Window parent's handle
+    HWND m_hWnd_parent;
+    /// Indicates whether the window handles drag&drop events
+    bool m_dragDrop;
+    /// Drop target
+    LPDROPTARGET m_pDropTarget;
+    /// Indicates whether the window is layered
+    mutable bool m_isLayered;
+    /// Parent window
+    Win32Window *m_pParent;
 };
 
 
index bda1bc6e585cf9922155151aa64e10abf5d8cc18..d20f56b5068ce9e2c7db777b38e83c16ed0bef33 100644 (file)
@@ -17,9 +17,9 @@
  * 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 this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
  *****************************************************************************/
 
 #ifndef X11_DISPLAY_HPP
 /// Class for encapsulation of a X11 Display
 class X11Display: public SkinObject
 {
-    public:
-        X11Display( intf_thread_t *pIntf );
-        virtual ~X11Display();
-
-        /// Get the display
-        Display *getDisplay() const { return m_pDisplay; }
-
-        /// Get the visual
-        Visual *getVisual() const { return m_pVisual; }
-
-        /// Get the pixel size
-        int getPixelSize() const { return m_pixelSize; }
-
-        /// Get the graphics context
-        GC getGC() const { return m_gc; }
-
-        /// Get the colormap
-        Colormap getColormap() const { return m_colormap; }
-
-        /// Type of function to put RGBA values into a pixel
-        typedef void (X11Display::*MakePixelFunc_t)( uint8_t *pPixel,
-            uint8_t r, uint8_t g, uint8_t b, uint8_t a ) const;
-
-        /// Get a pointer on the right blendPixel implementation
-        MakePixelFunc_t getBlendPixel() const { return blendPixelImpl; }
-
-        /// Get a pointer on the right putPixel implementation
-        MakePixelFunc_t getPutPixel() const { return putPixelImpl; }
-
-        /// Get the pixel value corresponding to the given colors
-        unsigned long getPixelValue( uint8_t r, uint8_t g, uint8_t b ) const;
-
-        /// Get the main window ID
-        Window getMainWindow() const { return m_mainWindow; }
-
-        //XXX
-        Window m_voutWindow;
-
-    private:
-        /// Dummy parent window for the task bar
-        Window m_mainWindow;
-        /// Display parameters
-        Display *m_pDisplay;
-        Visual *m_pVisual;
-        int m_pixelSize;
-        GC m_gc;
-        Colormap m_colormap;
-        int m_redLeftShift, m_redRightShift;
-        int m_greenLeftShift, m_greenRightShift;
-        int m_blueLeftShift, m_blueRightShift;
-        /// Pointer on the right implementation of blendPixel
-        MakePixelFunc_t blendPixelImpl;
-        /// Pointer on the right implementation of putPixel
-        MakePixelFunc_t putPixelImpl;
-
-        /// Calculate shifts from a color mask
-        void getShifts( uint32_t mask, int &rLeftShift,
-                        int &rRightShift ) const;
-
-        /// 8 bpp version of blendPixel
-        void blendPixel8( uint8_t *pPixel, uint8_t r, uint8_t g, uint8_t b,
+public:
+    X11Display( intf_thread_t *pIntf );
+    virtual ~X11Display();
+
+    /// Get the display
+    Display *getDisplay() const { return m_pDisplay; }
+
+    /// Get the visual
+    Visual *getVisual() const { return m_pVisual; }
+
+    /// Get the pixel size
+    int getPixelSize() const { return m_pixelSize; }
+
+    /// Get the graphics context
+    GC getGC() const { return m_gc; }
+
+    /// Get the colormap
+    Colormap getColormap() const { return m_colormap; }
+
+    /// Type of function to put RGBA values into a pixel
+    typedef void (X11Display::*MakePixelFunc_t)( uint8_t *pPixel,
+        uint8_t r, uint8_t g, uint8_t b, uint8_t a ) const;
+
+    /// Get a pointer on the right blendPixel implementation
+    MakePixelFunc_t getBlendPixel() const { return blendPixelImpl; }
+
+    /// Get a pointer on the right putPixel implementation
+    MakePixelFunc_t getPutPixel() const { return putPixelImpl; }
+
+    /// Get the pixel value corresponding to the given colors
+    unsigned long getPixelValue( uint8_t r, uint8_t g, uint8_t b ) const;
+
+    /// Get the main window ID
+    Window getMainWindow() const { return m_mainWindow; }
+
+    //XXX
+    Window m_voutWindow;
+
+private:
+    /// Dummy parent window for the task bar
+    Window m_mainWindow;
+    /// Display parameters
+    Display *m_pDisplay;
+    Visual *m_pVisual;
+    int m_pixelSize;
+    GC m_gc;
+    Colormap m_colormap;
+    int m_redLeftShift, m_redRightShift;
+    int m_greenLeftShift, m_greenRightShift;
+    int m_blueLeftShift, m_blueRightShift;
+    /// Pointer on the right implementation of blendPixel
+    MakePixelFunc_t blendPixelImpl;
+    /// Pointer on the right implementation of putPixel
+    MakePixelFunc_t putPixelImpl;
+
+    /// Calculate shifts from a color mask
+    void getShifts( uint32_t mask, int &rLeftShift,
+                    int &rRightShift ) const;
+
+    /// 8 bpp version of blendPixel
+    void blendPixel8( uint8_t *pPixel, uint8_t r, uint8_t g, uint8_t b,
+                      uint8_t a ) const;
+
+    /// 16 bpp MSB first version of blendPixel
+    void blendPixel16MSB( uint8_t *pPixel, uint8_t r, uint8_t g, uint8_t b,
                           uint8_t a ) const;
 
-        /// 16 bpp MSB first version of blendPixel
-        void blendPixel16MSB( uint8_t *pPixel, uint8_t r, uint8_t g, uint8_t b,
-                              uint8_t a ) const;
+    /// 16 bpp LSB first version of blendPixel
+    void blendPixel16LSB( uint8_t *pPixel, uint8_t r, uint8_t g, uint8_t b,
+                          uint8_t a ) const;
 
-        /// 16 bpp LSB first version of blendPixel
-        void blendPixel16LSB( uint8_t *pPixel, uint8_t r, uint8_t g, uint8_t b,
-                              uint8_t a ) const;
+    /// 24/32 bpp MSB first version of blendPixel
+    void blendPixel32MSB( uint8_t *pPixel, uint8_t r, uint8_t g, uint8_t b,
+                          uint8_t a ) const;
 
-        /// 24/32 bpp MSB first version of blendPixel
-        void blendPixel32MSB( uint8_t *pPixel, uint8_t r, uint8_t g, uint8_t b,
-                              uint8_t a ) const;
+    /// 24/32 bpp LSB first version of blendPixel
+    void blendPixel32LSB( uint8_t *pPixel, uint8_t r, uint8_t g, uint8_t b,
+                          uint8_t a ) const;
 
-        /// 24/32 bpp LSB first version of blendPixel
-        void blendPixel32LSB( uint8_t *pPixel, uint8_t r, uint8_t g, uint8_t b,
-                              uint8_t a ) const;
+    /// 8 bpp version of putPixel
+    void putPixel8( uint8_t *pPixel, uint8_t r, uint8_t g, uint8_t b,
+                    uint8_t a ) const;
 
-        /// 8 bpp version of putPixel
-        void putPixel8( uint8_t *pPixel, uint8_t r, uint8_t g, uint8_t b,
+    /// 16 bpp MSB first version of putPixel
+    void putPixel16MSB( uint8_t *pPixel, uint8_t r, uint8_t g, uint8_t b,
                         uint8_t a ) const;
 
-        /// 16 bpp MSB first version of putPixel
-        void putPixel16MSB( uint8_t *pPixel, uint8_t r, uint8_t g, uint8_t b,
-                            uint8_t a ) const;
-
-        /// 16 bpp LSB first version of putPixel
-        void putPixel16LSB( uint8_t *pPixel, uint8_t r, uint8_t g, uint8_t b,
-                            uint8_t a ) const;
+    /// 16 bpp LSB first version of putPixel
+    void putPixel16LSB( uint8_t *pPixel, uint8_t r, uint8_t g, uint8_t b,
+                        uint8_t a ) const;
 
-        /// 24/32 bpp MSB first version of putPixel
-        void putPixel32MSB( uint8_t *pPixel, uint8_t r, uint8_t g, uint8_t b,
-                            uint8_t a ) const;
+    /// 24/32 bpp MSB first version of putPixel
+    void putPixel32MSB( uint8_t *pPixel, uint8_t r, uint8_t g, uint8_t b,
+                        uint8_t a ) const;
 
-        /// 24/32 bpp LSB first version of putPixel
-        void putPixel32LSB( uint8_t *pPixel, uint8_t r, uint8_t g, uint8_t b,
-                            uint8_t a ) const;
+    /// 24/32 bpp LSB first version of putPixel
+    void putPixel32LSB( uint8_t *pPixel, uint8_t r, uint8_t g, uint8_t b,
+                        uint8_t a ) const;
 };
 
 #endif
index 440a8c527a8bcd5c08b74b0f71317a90761ff25b..ea245e03b4b5531f9ca956649bdadf31184ab3c1 100644 (file)
@@ -17,9 +17,9 @@
  * 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 this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
  *****************************************************************************/
 
 #ifndef X11_DRAGDROP_HPP
@@ -33,27 +33,27 @@ class X11Display;
 
 class X11DragDrop: public SkinObject
 {
-    public:
-        typedef long ldata_t[5];
-
-        X11DragDrop( intf_thread_t *pIntf, X11Display &rDisplay, Window win,
-                     bool playOnDrop );
-        virtual ~X11DragDrop() {}
-
-        void dndEnter( ldata_t data );
-        void dndPosition( ldata_t data );
-        void dndLeave( ldata_t data );
-        void dndDrop( ldata_t data );
-
-    private:
-        /// X11 display
-        X11Display &m_rDisplay;
-        /// Window ID
-        Window m_wnd;
-        /// Indicates whether the file(s) must be played immediately
-        bool m_playOnDrop;
-        /// Target type
-        Atom m_target;
+public:
+    typedef long ldata_t[5];
+
+    X11DragDrop( intf_thread_t *pIntf, X11Display &rDisplay, Window win,
+                 bool playOnDrop );
+    virtual ~X11DragDrop() { }
+
+    void dndEnter( ldata_t data );
+    void dndPosition( ldata_t data );
+    void dndLeave( ldata_t data );
+    void dndDrop( ldata_t data );
+
+private:
+    /// X11 display
+    X11Display &m_rDisplay;
+    /// Window ID
+    Window m_wnd;
+    /// Indicates whether the file(s) must be played immediately
+    bool m_playOnDrop;
+    /// Target type
+    Atom m_target;
 };
 
 
index 1825f3ca9c31a81208a4f538c70cef72e977adc3..be1c0f94cb4e305cc27e6a7ac3a702c87b7b69b0 100644 (file)
@@ -17,9 +17,9 @@
  * 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 this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
  *****************************************************************************/
 
 #ifndef X11_FACTORY_HPP
@@ -38,94 +38,94 @@ class X11TimerLoop;
 /// Class used to instanciate X11 specific objects
 class X11Factory: public OSFactory
 {
-    public:
-        /// Map to find the GenericWindow associated to a X11Window
-        map<Window, GenericWindow*> m_windowMap;
-        /// Map to find the Dnd object associated to a X11Window
-        map<Window, X11DragDrop*> m_dndMap;
+public:
+    /// Map to find the GenericWindow associated to a X11Window
+    map<Window, GenericWindow*> m_windowMap;
+    /// Map to find the Dnd object associated to a X11Window
+    map<Window, X11DragDrop*> m_dndMap;
 
-        X11Factory( intf_thread_t *pIntf );
-        virtual ~X11Factory();
+    X11Factory( intf_thread_t *pIntf );
+    virtual ~X11Factory();
 
-        /// Initialization method
-        virtual bool init();
+    /// Initialization method
+    virtual bool init();
 
-        /// Instantiate an object OSGraphics
-        virtual OSGraphics *createOSGraphics( int width, int height );
+    /// Instantiate an object OSGraphics
+    virtual OSGraphics *createOSGraphics( int width, int height );
 
-        /// Get the instance of the singleton OSLoop
-        virtual OSLoop *getOSLoop();
+    /// Get the instance of the singleton OSLoop
+    virtual OSLoop *getOSLoop();
 
-        /// Destroy the instance of OSLoop
-        virtual void destroyOSLoop();
+    /// Destroy the instance of OSLoop
+    virtual void destroyOSLoop();
 
-        /// Instantiate an OSTimer with the given command
-        virtual OSTimer *createOSTimer( CmdGeneric &rCmd );
+    /// Instantiate an OSTimer with the given command
+    virtual OSTimer *createOSTimer( CmdGeneric &rCmd );
 
-        /// Minimize all the windows
-        virtual void minimize();
+    /// Minimize all the windows
+    virtual void minimize();
 
-        /// Restore the minimized windows
-        virtual void restore();
+    /// Restore the minimized windows
+    virtual void restore();
 
-        /// Add an icon in the system tray
-        virtual void addInTray();
+    /// Add an icon in the system tray
+    virtual void addInTray();
 
-        /// Remove the icon from the system tray
-        virtual void removeFromTray();
+    /// Remove the icon from the system tray
+    virtual void removeFromTray();
 
-        /// Show the task in the task bar
-        virtual void addInTaskBar();
+    /// Show the task in the task bar
+    virtual void addInTaskBar();
 
-        /// Remove the task from the task bar
-        virtual void removeFromTaskBar();
+    /// Remove the task from the task bar
+    virtual void removeFromTaskBar();
 
-        /// Instantiate an OSWindow object
-        virtual OSWindow *createOSWindow( GenericWindow &rWindow,
-                                          bool dragDrop, bool playOnDrop,
-                                          OSWindow *pParent );
+    /// Instantiate an OSWindow object
+    virtual OSWindow *createOSWindow( GenericWindow &rWindow,
+                                      bool dragDrop, bool playOnDrop,
+                                      OSWindow *pParent );
 
-        /// Instantiate an object OSTooltip
-        virtual OSTooltip *createOSTooltip();
+    /// Instantiate an object OSTooltip
+    virtual OSTooltip *createOSTooltip();
 
-        /// Instantiate an object OSPopup
-        virtual OSPopup *createOSPopup();
+    /// Instantiate an object OSPopup
+    virtual OSPopup *createOSPopup();
 
-        /// Get the directory separator
-        virtual const string &getDirSeparator() const { return m_dirSep; }
+    /// Get the directory separator
+    virtual const string &getDirSeparator() const { return m_dirSep; }
 
-        /// Get the resource path
-        virtual const list<string> &getResourcePath() const
-            { return m_resourcePath; }
+    /// Get the resource path
+    virtual const list<string> &getResourcePath() const
+        { return m_resourcePath; }
 
-        /// Get the screen size
-        virtual int getScreenWidth() const;
-        virtual int getScreenHeight() const;
+    /// Get the screen size
+    virtual int getScreenWidth() const;
+    virtual int getScreenHeight() const;
 
-        /// Get the work area (screen area without taskbars)
-        virtual SkinsRect getWorkArea() const;
+    /// Get the work area (screen area without taskbars)
+    virtual SkinsRect getWorkArea() const;
 
-        /// Get the position of the mouse
-        virtual void getMousePos( int &rXPos, int &rYPos ) const;
+    /// Get the position of the mouse
+    virtual void getMousePos( int &rXPos, int &rYPos ) const;
 
-        /// Change the cursor
-        virtual void changeCursor( CursorType_t type ) const { /*TODO*/ }
+    /// Change the cursor
+    virtual void changeCursor( CursorType_t type ) const { /*TODO*/ }
 
-        /// Delete a directory recursively
-        virtual void rmDir( const string &rPath );
+    /// Delete a directory recursively
+    virtual void rmDir( const string &rPath );
 
-        /// Get the timer loop
-        X11TimerLoop *getTimerLoop() const { return m_pTimerLoop; }
+    /// Get the timer loop
+    X11TimerLoop *getTimerLoop() const { return m_pTimerLoop; }
 
-    private:
-        /// X11 display
-        X11Display *m_pDisplay;
-        /// Timer loop
-        X11TimerLoop *m_pTimerLoop;
-        /// Directory separator
-        const string m_dirSep;
-        /// Resource path
-        list<string> m_resourcePath;
+private:
+    /// X11 display
+    X11Display *m_pDisplay;
+    /// Timer loop
+    X11TimerLoop *m_pTimerLoop;
+    /// Directory separator
+    const string m_dirSep;
+    /// Resource path
+    list<string> m_resourcePath;
 };
 
 #endif
index 203bb7f68e22b373686627cdaa13ea2ec175ea1e..5e75dcfbae1b70b8f2f69d69539b9da436ac4538 100644 (file)
@@ -17,9 +17,9 @@
  * 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 this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
  *****************************************************************************/
 
 #ifndef X11_GRAPHICS_HPP
@@ -37,72 +37,70 @@ class GenericBitmap;
 /// X11 implementation of OSGraphics
 class X11Graphics: public OSGraphics
 {
-    public:
-        X11Graphics( intf_thread_t *pIntf, X11Display &rDisplay, int width,
-                     int height);
-
-        virtual ~X11Graphics();
-
-        /// Clear the graphics
-        virtual void clear();
-
-        /// Draw another graphics on this one
-        virtual void drawGraphics( const OSGraphics &rGraphics, int xSrc = 0,
-                                   int ySrc = 0, int xDest = 0, int yDest = 0,
-                                   int width = -1, int height = -1 );
-
-        /// Render a bitmap on this graphics
-        virtual void drawBitmap( const GenericBitmap &rBitmap, int xSrc = 0,
-                                 int ySrc = 0, int xDest = 0, int yDest = 0,
-                                 int width = -1, int height = -1,
-                                 bool blend = false );
-
-        /// Draw a filled rectangle on the grahics (color is #RRGGBB)
-        virtual void fillRect( int left, int top, int width, int height,
-                               uint32_t color );
-
-        /// Draw an empty rectangle on the grahics (color is #RRGGBB)
-        virtual void drawRect( int left, int top, int width, int height,
-                               uint32_t color );
-
-        /// Set the shape of a window with the mask of this graphics.
-        virtual void applyMaskToWindow( OSWindow &rWindow );
-
-        /// Copy the graphics on a window
-        virtual void copyToWindow( OSWindow &rWindow, int xSrc,
-                                   int ySrc, int width, int height,
-                                   int xDest, int yDest );
-
-        /// Tell whether the pixel at the given position is visible
-        virtual bool hit( int x, int y ) const;
-
-        /// Getters
-        virtual int getWidth() const { return m_width; }
-        virtual int getHeight() const { return m_height; }
-
-        /// Get the pixmap ID
-        Pixmap getDrawable() const { return m_pixmap; }
-        /// Get the transparency mask
-        Region getMask() const { return m_mask; }
-
-    private:
-        /// X11 display
-        X11Display &m_rDisplay;
-        /// Size of the image
-        int m_width, m_height;
-        /// Pixmap
-        Pixmap m_pixmap;
-        /// Transparency mask
-        Region m_mask;
-        /// Graphics context
-        GC m_gc;
-
-        /// Add an horizontal segment in a region
-        void addHSegmentInRegion( Region &rMask, int xStart,
-                                               int xEnd, int y );
-        /// Add a vertical segment in a region
-        void addVSegmentInRegion( Region &rMask, int yStart,
-                                               int yEnd, int x );
+public:
+    X11Graphics( intf_thread_t *pIntf, X11Display &rDisplay, int width,
+                 int height);
+
+    virtual ~X11Graphics();
+
+    /// Clear the graphics
+    virtual void clear();
+
+    /// Draw another graphics on this one
+    virtual void drawGraphics( const OSGraphics &rGraphics, int xSrc = 0,
+                               int ySrc = 0, int xDest = 0, int yDest = 0,
+                               int width = -1, int height = -1 );
+
+    /// Render a bitmap on this graphics
+    virtual void drawBitmap( const GenericBitmap &rBitmap, int xSrc = 0,
+                             int ySrc = 0, int xDest = 0, int yDest = 0,
+                             int width = -1, int height = -1,
+                             bool blend = false );
+
+    /// Draw a filled rectangle on the grahics (color is #RRGGBB)
+    virtual void fillRect( int left, int top, int width, int height,
+                           uint32_t color );
+
+    /// Draw an empty rectangle on the grahics (color is #RRGGBB)
+    virtual void drawRect( int left, int top, int width, int height,
+                           uint32_t color );
+
+    /// Set the shape of a window with the mask of this graphics.
+    virtual void applyMaskToWindow( OSWindow &rWindow );
+
+    /// Copy the graphics on a window
+    virtual void copyToWindow( OSWindow &rWindow, int xSrc,
+                               int ySrc, int width, int height,
+                               int xDest, int yDest );
+
+    /// Tell whether the pixel at the given position is visible
+    virtual bool hit( int x, int y ) const;
+
+    /// Getters
+    virtual int getWidth() const { return m_width; }
+    virtual int getHeight() const { return m_height; }
+
+    /// Get the pixmap ID
+    Pixmap getDrawable() const { return m_pixmap; }
+    /// Get the transparency mask
+    Region getMask() const { return m_mask; }
+
+private:
+    /// X11 display
+    X11Display &m_rDisplay;
+    /// Size of the image
+    int m_width, m_height;
+    /// Pixmap
+    Pixmap m_pixmap;
+    /// Transparency mask
+    Region m_mask;
+    /// Graphics context
+    GC m_gc;
+
+    /// Add an horizontal segment in a region
+    void addHSegmentInRegion( Region &rMask, int xStart, int xEnd, int y );
+    /// Add a vertical segment in a region
+    void addVSegmentInRegion( Region &rMask, int yStart, int yEnd, int x );
 };
 
 
index 6cc79e53df2b423c85784d2f2332a6873cf842d3..ff0f367ee62ec358b0e9238318eafaf1b2b7d400 100644 (file)
@@ -17,9 +17,9 @@
  * 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 this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
  *****************************************************************************/
 
 #ifndef X11_LOOP_HPP
@@ -36,39 +36,39 @@ class GenericWindow;
 /// Main event loop for X11 (singleton)
 class X11Loop: public OSLoop
 {
-    public:
-        /// Get the instance of X11Loop
-        static OSLoop *instance( intf_thread_t *pIntf, X11Display &rDisplay );
+public:
+    /// Get the instance of X11Loop
+    static OSLoop *instance( intf_thread_t *pIntf, X11Display &rDisplay );
 
-        /// Destroy the instance of X11Loop
-        static void destroy( intf_thread_t *pIntf );
+    /// Destroy the instance of X11Loop
+    static void destroy( intf_thread_t *pIntf );
 
-        /// Enter the event loop
-        virtual void run();
+    /// Enter the event loop
+    virtual void run();
 
-        /// Exit the main loop
-        virtual void exit();
+    /// Exit the main loop
+    virtual void exit();
 
-    private:
-        /// X11 Display
-        X11Display &m_rDisplay;
-        /// Flag set on exit
-        bool m_exit;
-        /// Date and position of the last left-click
-        mtime_t m_lastClickTime;
-        int m_lastClickPosX, m_lastClickPosY;
-        /// Maximum interval between clicks for a double-click (in microsec)
-        static int m_dblClickDelay;
-        /// Map associating special (i.e. non ascii) virtual key codes with
-        /// internal vlc key codes
-        map<KeySym, int> keysymToVlcKey;
+private:
+    /// X11 Display
+    X11Display &m_rDisplay;
+    /// Flag set on exit
+    bool m_exit;
+    /// Date and position of the last left-click
+    mtime_t m_lastClickTime;
+    int m_lastClickPosX, m_lastClickPosY;
+    /// Maximum interval between clicks for a double-click (in microsec)
+    static int m_dblClickDelay;
+    /// Map associating special (i.e. non ascii) virtual key codes with
+    /// internal vlc key codes
+    map<KeySym, int> keysymToVlcKey;
 
-        // Private because it's a singleton
-        X11Loop( intf_thread_t *pIntf, X11Display &rDisplay );
-        virtual ~X11Loop();
+    // Private because it's a singleton
+    X11Loop( intf_thread_t *pIntf, X11Display &rDisplay );
+    virtual ~X11Loop();
 
-        /// Handle the next X11 event
-        void handleX11Event();
+    /// Handle the next X11 event
+    void handleX11Event();
 };
 
 #endif
index 350d253061c85a53871a7bfedbb06882a378d2af..31a78fa6354e7d30a9bf4ef3c57aa8612ebc44c3 100644 (file)
@@ -16,9 +16,9 @@
  * 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 this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
  *****************************************************************************/
 
 #ifndef X11_POPUP_HPP
@@ -31,25 +31,25 @@ class X11Display;
 /// X11 implementation of OSPopup
 class X11Popup: public OSPopup
 {
-    public:
-        X11Popup( intf_thread_t *pIntf, X11Display & );
+public:
+    X11Popup( intf_thread_t *pIntf, X11Display & );
 
-        virtual ~X11Popup();
+    virtual ~X11Popup();
 
-        /// Show the popup menu at the given (absolute) corrdinates
-        virtual void show( int xPos, int yPos );
+    /// Show the popup menu at the given (absolute) corrdinates
+    virtual void show( int xPos, int yPos );
 
-        /// Hide the popup menu
-        virtual void hide();
+    /// Hide the popup menu
+    virtual void hide();
 
-        /// Append a new menu item with the given label to the popup menu
-        virtual void addItem( const string &rLabel, int pos );
+    /// Append a new menu item with the given label to the popup menu
+    virtual void addItem( const string &rLabel, int pos );
 
-        /// Create a dummy menu item to separate sections
-        virtual void addSeparator( int pos );
+    /// Create a dummy menu item to separate sections
+    virtual void addSeparator( int pos );
 
-        /// Return the position of the item identified by the given id
-        virtual int getPosFromId( int id ) const;
+    /// Return the position of the item identified by the given id
+    virtual int getPosFromId( int id ) const;
 };
 
 
index 039f1b1bab6b499a3f1bb7d189406e17d69cf222..8e3164e0abedfd1f3f5e10020233380e69e8d428 100644 (file)
@@ -17,9 +17,9 @@
  * 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 this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
  *****************************************************************************/
 
 #ifndef X11_TIMER_HPP
@@ -37,64 +37,64 @@ class CmdGeneric;
 // X11 specific timer
 class X11Timer: public OSTimer
 {
-    public:
-        X11Timer( intf_thread_t *pIntf, CmdGeneric &rCmd );
-        virtual ~X11Timer();
-
-        /// (Re)start the timer with the given delay (in ms). If oneShot is
-        /// true, stop it after the first execution of the callback.
-        virtual void start( int delay, bool oneShot );
-
-        /// Stop the timer
-        virtual void stop();
-
-        mtime_t getNextDate() const;
-
-        /// Execute the callback.
-        /// Returns false if the timer must be removed after
-        bool execute();
-
-    private:
-        /// Command to execute
-        CmdGeneric &m_rCommand;
-        /// Timer loop
-        X11TimerLoop *m_pTimerLoop;
-        /// Delay between two execute
-        mtime_t m_interval;
-        /// Next date at which the timer must be executed
-        mtime_t m_nextDate;
-        /// Flag to tell if the timer must be stopped after the first execution
-        bool m_oneShot;
+public:
+    X11Timer( intf_thread_t *pIntf, CmdGeneric &rCmd );
+    virtual ~X11Timer();
+
+    /// (Re)start the timer with the given delay (in ms). If oneShot is
+    /// true, stop it after the first execution of the callback.
+    virtual void start( int delay, bool oneShot );
+
+    /// Stop the timer
+    virtual void stop();
+
+    mtime_t getNextDate() const;
+
+    /// Execute the callback.
+    /// Returns false if the timer must be removed after
+    bool execute();
+
+private:
+    /// Command to execute
+    CmdGeneric &m_rCommand;
+    /// Timer loop
+    X11TimerLoop *m_pTimerLoop;
+    /// Delay between two execute
+    mtime_t m_interval;
+    /// Next date at which the timer must be executed
+    mtime_t m_nextDate;
+    /// Flag to tell if the timer must be stopped after the first execution
+    bool m_oneShot;
 };
 
 
 /// Class to manage a set of timers
 class X11TimerLoop: public SkinObject
 {
-    public:
-        /// Create the timer loop with the communication number of the X11
-        /// display
-        X11TimerLoop( intf_thread_t *pIntf, int connectionNumber );
-        virtual ~X11TimerLoop();
-
-        /// Add a timer in the manager
-        void addTimer( X11Timer &rTimer );
-
-        /// Remove a timer from the manager
-        void removeTimer( X11Timer &rTimer );
-
-        /// Wait for the next timer and execute it
-        void waitNextTimer();
-
-    private:
-        /// Connection number of the X11 display
-        int m_connectionNumber;
-        /// List of timers
-        list<X11Timer*> m_timers;
-
-        /// Sleep for delay milliseconds, unless an X11 event is received
-        /// Returns true if the sleep has been interupted.
-        bool sleep( int delay );
+public:
+    /// Create the timer loop with the communication number of the X11
+    /// display
+    X11TimerLoop( intf_thread_t *pIntf, int connectionNumber );
+    virtual ~X11TimerLoop();
+
+    /// Add a timer in the manager
+    void addTimer( X11Timer &rTimer );
+
+    /// Remove a timer from the manager
+    void removeTimer( X11Timer &rTimer );
+
+    /// Wait for the next timer and execute it
+    void waitNextTimer();
+
+private:
+    /// Connection number of the X11 display
+    int m_connectionNumber;
+    /// List of timers
+    list<X11Timer*> m_timers;
+
+    /// Sleep for delay milliseconds, unless an X11 event is received.
+    /// Returns true if the sleep has been interupted.
+    bool sleep( int delay );
 };
 
 
index 3a48c43be50499c3dc2c736b72a0b3e5e609c0d8..b7a4bb8f63ffd0c10fbea486f3e9ca4b983a9885 100644 (file)
@@ -17,9 +17,9 @@
  * 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 this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
  *****************************************************************************/
 
 #ifndef X11_TOOLTIP_HPP
@@ -35,22 +35,22 @@ class X11Display;
 /// X11 implementation of OSTooltip
 class X11Tooltip: public OSTooltip
 {
-    public:
-        X11Tooltip( intf_thread_t *pIntf, X11Display &rDisplay );
+public:
+    X11Tooltip( intf_thread_t *pIntf, X11Display &rDisplay );
 
-        virtual ~X11Tooltip();
+    virtual ~X11Tooltip();
 
-        /// Show the tooltip
-        virtual void show( int left, int top, OSGraphics &rText );
+    /// Show the tooltip
+    virtual void show( int left, int top, OSGraphics &rText );
 
-        /// Hide the tooltip
-        virtual void hide();
+    /// Hide the tooltip
+    virtual void hide();
 
-    private:
-        /// X11 display
-        X11Display &m_rDisplay;
-        /// Window ID
-        Window m_wnd;
+private:
+    /// X11 display
+    X11Display &m_rDisplay;
+    /// Window ID
+    Window m_wnd;
 };
 
 
index a4b5a92020a5ec0737876baee6efa724284b00b7..dcd1b7bd43122058b5f88e064d5073904090197b 100644 (file)
@@ -17,9 +17,9 @@
  * 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 this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
  *****************************************************************************/
 
 #ifndef X11_WINDOW_HPP
@@ -36,57 +36,57 @@ class X11DragDrop;
 /// X11 implementation of OSWindow
 class X11Window: public OSWindow
 {
-    public:
-        X11Window( intf_thread_t *pIntf, GenericWindow &rWindow,
-                   X11Display &rDisplay, bool dragDrop, bool playOnDrop,
-                   X11Window *pParentWindow );
+public:
+    X11Window( intf_thread_t *pIntf, GenericWindow &rWindow,
+               X11Display &rDisplay, bool dragDrop, bool playOnDrop,
+               X11Window *pParentWindow );
 
-        virtual ~X11Window();
+    virtual ~X11Window();
 
-        // Show the window
-        virtual void show() const;
+    // Show the window
+    virtual void show() const;
 
-        // Hide the window
-        virtual void hide() const;
+    // Hide the window
+    virtual void hide() const;
 
-        /// Move the window
-        virtual void moveResize( int left, int top,
-                                 int width, int height ) const;
+    /// Move the window
+    virtual void moveResize( int left, int top,
+                             int width, int height ) const;
 
-        /// Bring the window on top
-        virtual void raise() const;
+    /// Bring the window on top
+    virtual void raise() const;
 
-        /// Set the opacity of the window (0 = transparent, 255 = opaque)
-        virtual void setOpacity( uint8_t value ) const;
+    /// Set the opacity of the window (0 = transparent, 255 = opaque)
+    virtual void setOpacity( uint8_t value ) const;
 
-        /// Toggle the window on top
-        virtual void toggleOnTop( bool onTop ) const;
+    /// Toggle the window on top
+    virtual void toggleOnTop( bool onTop ) const;
 
-        /// Get the window ID
-        Window getDrawable() const { return m_wnd; }
+    /// Get the window ID
+    Window getDrawable() const { return m_wnd; }
 
-        /// Getter for the handler
-        void* getOSHandle() const { return (void*) m_wnd; }
+    /// Getter for the handler
+    void* getOSHandle() const { return (void*) m_wnd; }
 
-        /// Getter for the handler
-        void* getParentOSHandle() const { return (void*) m_wnd_parent; }
+    /// Getter for the handler
+    void* getParentOSHandle() const { return (void*) m_wnd_parent; }
 
-        /// reparent the window
-        void reparent( void* OSHandle, int x, int y, int w, int h );
+    /// reparent the window
+    void reparent( void* OSHandle, int x, int y, int w, int h );
 
-    private:
-        /// X11 display
-        X11Display &m_rDisplay;
-        /// Window ID
-        Window m_wnd;
-        /// Window ID
-        Window m_wnd_parent;
-        /// Parent window
-        X11Window *m_pParent;
-        /// Indicates whether the window handles drag&drop events
-        bool m_dragDrop;
-        /// Drop target
-        X11DragDrop *m_pDropTarget;
+private:
+    /// X11 display
+    X11Display &m_rDisplay;
+    /// Window ID
+    Window m_wnd;
+    /// Window ID
+    Window m_wnd_parent;
+    /// Parent window
+    X11Window *m_pParent;
+    /// Indicates whether the window handles drag&drop events
+    bool m_dragDrop;
+    /// Drop target
+    X11DragDrop *m_pDropTarget;
 };