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

« back to all changes in this revision

Viewing changes to src/plugins/contrib/wxSmith/properties/wxscustomeditorproperty.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
#ifndef CUSTOMEDITORPROPERTY_H
 
2
#define CUSTOMEDITORPROPERTY_H
 
3
 
 
4
#include <wx/intl.h>
 
5
#include "wxsproperty.h"
 
6
 
 
7
/** \brief Class which may be used to create properties with custom editor */
 
8
class wxsCustomEditorProperty : public wxsProperty
 
9
{
 
10
    public:
 
11
 
 
12
        /** \brief Ctor with different names */
 
13
        wxsCustomEditorProperty(const wxString& PGName,const wxString& DataName,int Priority=100):
 
14
            wxsProperty(PGName,DataName,Priority) {}
 
15
 
 
16
        /** \brief Function opening property editor
 
17
         *
 
18
         * This function should open editor (in modal) for this property
 
19
         *
 
20
         * \return true  - property value has changed,
 
21
         *         false - property has not changed
 
22
         */
 
23
        virtual bool ShowEditor(wxsPropertyContainer* Object) =0;
 
24
 
 
25
    protected:
 
26
 
 
27
        /** \brief Function giving string representation of property */
 
28
        virtual wxString GetStr(wxsPropertyContainer* Object) { return _("Click to edit"); }
 
29
 
 
30
        /** \brief Function parsing string representation of property
 
31
         *
 
32
         * After parsing, data should be stored in Object
 
33
         * \return true - parsing done, false - parsing error
 
34
         */
 
35
        virtual bool ParseStr(wxsPropertyContainer* Object,wxString Value) { return false; }
 
36
 
 
37
        /** \brief Checkig if this property is able to parse string */
 
38
        virtual bool CanParseStr() { return false; }
 
39
 
 
40
    private:
 
41
 
 
42
        virtual void PGCreate(wxsPropertyContainer* Object,wxPropertyGridManager* Grid,wxPGId Parent);
 
43
        virtual bool PGRead(wxsPropertyContainer* Object,wxPropertyGridManager* Grid, wxPGId Id,long Index);
 
44
        virtual bool PGWrite(wxsPropertyContainer* Object,wxPropertyGridManager* Grid, wxPGId Id,long Index);
 
45
};
 
46
 
 
47
#endif