~damien-moore/+junk/codeblocks

« back to all changes in this revision

Viewing changes to src/plugins/contrib/wxSmith/wxseditor.h

  • Committer: Damien Moore
  • Date: 2013-10-11 14:25:27 UTC
  • Revision ID: damienlmoore@gmail.com-20131011142527-w13ki0x8yjd7973d
copy of Code::Blocks repo based on SVN rev 9395

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
* This file is part of wxSmith plugin for Code::Blocks Studio
 
3
* Copyright (C) 2006-2007  Bartlomiej Swiecki
 
4
*
 
5
* wxSmith is free software; you can redistribute it and/or modify
 
6
* it under the terms of the GNU General Public License as published by
 
7
* the Free Software Foundation; either version 3 of the License, or
 
8
* (at your option) any later version.
 
9
*
 
10
* wxSmith is distributed in the hope that it will be useful,
 
11
* but WITHOUT ANY WARRANTY; without even the implied warranty of
 
12
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
 
13
* GNU General Public License for more details.
 
14
*
 
15
* You should have received a copy of the GNU General Public License
 
16
* along with wxSmith. If not, see <http://www.gnu.org/licenses/>.
 
17
*
 
18
* $Revision: 8251 $
 
19
* $Id: wxseditor.h 8251 2012-08-28 02:31:00Z ollydbg $
 
20
* $HeadURL: svn://svn.code.sf.net/p/codeblocks/code/trunk/src/plugins/contrib/wxSmith/wxseditor.h $
 
21
*/
 
22
 
 
23
#ifndef WXSEDITOR_H
 
24
#define WXSEDITOR_H
 
25
 
 
26
#include <editorbase.h>
 
27
 
 
28
class wxsResource;
 
29
 
 
30
/** \brief Base class for editors used inside wxSmith
 
31
 *
 
32
 * This class is responsible for proper binding / unbinding editor
 
33
 * from resource.
 
34
 *
 
35
 * Resource is only an information that given resource should exist.
 
36
 * Editor does load this resource and allow user to edit it.
 
37
 *
 
38
 * When editing resource it should always be done in such form:
 
39
 *  - Call BeginChange() to put resource into unstable state
 
40
 *  - Change data of resource (without updating information on screen)
 
41
 *  - Call EndChange() which should update data on screen
 
42
 *
 
43
 */
 
44
class wxsEditor: public EditorBase
 
45
{
 
46
    public:
 
47
 
 
48
        /** \brief Ctor */
 
49
        wxsEditor(wxWindow* parent,const wxString& title,wxsResource* Resource);
 
50
 
 
51
        /** \brief Dctor */
 
52
        virtual ~wxsEditor();
 
53
 
 
54
        /** \brief Getting current resource */
 
55
        inline wxsResource* GetResource() { return m_Resource; }
 
56
 
 
57
    private:
 
58
 
 
59
        /** \brief Currently associated resource */
 
60
        wxsResource* m_Resource;
 
61
};
 
62
 
 
63
#endif