/*
 ============================================================================
 xoblite -> an alternative shell based on Blackbox for Windows
 Copyright © 2002-2005 Karl-Henrik Henriksson [qwilk]
 Copyright © 2001-2004 The Blackbox for Windows Development Team
 http://xoblite.net/ - #bb4win on irc.freenode.net
 ============================================================================

  Blackbox for Windows is free software, released under the
  GNU General Public License (GPL version 2 or later), with an extension
  that allows linking of proprietary modules under a controlled interface.
  What this means is that plugins etc. are allowed to be released
  under any license the author wishes. Please note, however, that the
  original Blackbox gradient math code used in Blackbox for Windows
  is available under the BSD license.

  http://www.fsf.org/licenses/gpl.html
  http://www.fsf.org/licenses/gpl-faq.html#LinkingOverControlledInterface
  http://www.xfree86.org/3.3.6/COPYRIGHT2.html#5

  This program is distributed in the hope that it will be useful,
  but WITHOUT ANY WARRANTY; without even the implied warranty of
  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  GNU General Public License for more details.

  For additional license information, please read the included license.html

 ============================================================================
*/

#ifndef __SPECIALFOLDER_H 
#define __SPECIALFOLDER_H 

#include "FolderItem.h" 

class MenuMaker;

//===========================================================================

// Extension to the FolderItem, this class implements the dynamic popup folder.
// it is dynamic in the sense that it reloads the entire file structure when
// it is invoked
class SpecialFolder : public FolderItem  
{
public:
        // Constructs a SpecialFolder object
        // @param pszPath path to the folder to be loaded
        // @param pMenuMaker pointer to the configuration
        // @param pszTitle user friendly name of the folder
        SpecialFolder(LPSTR pszPath, MenuMaker* pMenuMaker, LPSTR pszTitle, int menuType);

        // Destroys the SpecialFolder object
        virtual ~SpecialFolder();

        // Open up the folder that is associated with the SpecialFolder item
        void Invoke(int button);

        // (De)activate this folder object
        // @param bActicate
        bool Active(bool bActivate);

        // Attaches this menu item to a Menu
        // @param pMenu the menu that this item is connected to
        void Attached(Menu* pMenu);

protected:
        void UpdateFolder(Menu* pMenu);
        Menu* LoadFolder();

        LPSTR m_pszPath;
        MenuMaker* m_pMenuMaker;
        LPSTR m_pszFilter;
        int m_MenuType;
};

//===========================================================================

#endif /* __SPECIALFOLDER_H */ 





syntax highlighting by

w e b c p p
web c plus plus