~ubuntu-branches/ubuntu/hardy/codeblocks/hardy-backports

« back to all changes in this revision

Viewing changes to src/include/misctreeitemdata.h

  • Committer: Bazaar Package Importer
  • Author(s): Michael Casadevall
  • Date: 2008-07-17 04:39:23 UTC
  • Revision ID: james.westby@ubuntu.com-20080717043923-gmsy5cwkdjswghkm
Tags: upstream-8.02
ImportĀ upstreamĀ versionĀ 8.02

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
 * This file is part of the Code::Blocks IDE and licensed under the GNU Lesser General Public License, version 3
 
3
 * http://www.gnu.org/licenses/lgpl-3.0.html
 
4
 */
 
5
 
 
6
#ifndef MISCTREEITEMDATA_H
 
7
#define MISCTREEITEMDATA_H
 
8
 
 
9
#include <wx/treectrl.h>
 
10
 
 
11
/* New class: MiscTreeItemData.
 
12
 * This class allows a TreeData to be created specifying
 
13
 * which Event Handler should process its related events.
 
14
 */
 
15
 
 
16
class DLLIMPORT MiscTreeItemData : public wxTreeItemData
 
17
{
 
18
    public:
 
19
        MiscTreeItemData():m_owner(0L) {}
 
20
        wxEvtHandler *GetOwner() { if(!this) return 0L;return m_owner; }
 
21
        static bool OwnerCheck(wxTreeEvent& event,wxTreeCtrl *tree,wxEvtHandler *handler,bool strict=false);
 
22
        virtual ~MiscTreeItemData() { m_owner=0L; }
 
23
    protected:
 
24
        void SetOwner(wxEvtHandler *owner) { if(!this) return; m_owner=owner; }
 
25
    private:
 
26
        wxEvtHandler *m_owner;
 
27
};
 
28
 
 
29
#endif // MISCTREEITEMDATA_H