~efargaspro/+junk/codeblocks-16.01-release

« back to all changes in this revision

Viewing changes to src/plugins/contrib/wxSmithContribItems/wxSmithKWIC/wxslinearmeter.h

  • Committer: damienlmoore at gmail
  • Date: 2016-02-02 02:43:22 UTC
  • Revision ID: damienlmoore@gmail.com-20160202024322-yql5qmtbwdyamdwd
Code::BlocksĀ 16.01

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/**************************************************************************//**
 
2
 * \file                        wxslinearmeter.h
 
3
 * \author      Gary Harris
 
4
 * \date                19/4/2010.
 
5
 *
 
6
 * This file is part of wxSmithKWIC.
 
7
 *
 
8
 * wxSmithKWIC - an add-on for wxSmith, Code::Blocks' GUI editor.                                       \n
 
9
 * Copyright (C) 2010 Gary Harris.
 
10
 *
 
11
 * wxSmithKWIC is free software: you can redistribute it and/or modify
 
12
 * it under the terms of the KWIC License
 
13
 * the Free Software Foundation, either version 3 of the License, or
 
14
 * (at your option) any later version.
 
15
 *
 
16
 * This program is distributed in the hope that it will be useful,
 
17
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 
18
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
19
 * KWIC License for more details.
 
20
 *
 
21
 * You should have received a copy of the KWIC License along with this
 
22
 * program.  If not, see <http://www.koansoftware.com/kwic/kwic-license.htm>.
 
23
 *
 
24
 *****************************************************************************/
 
25
#ifndef WXSLINEARMETER_H
 
26
#define WXSLINEARMETER_H
 
27
 
 
28
#include "wxwidgets/wxswidget.h"
 
29
 
 
30
 
 
31
class wxsLinearMeter : public wxsWidget
 
32
{
 
33
        public:
 
34
                wxsLinearMeter(wxsItemResData* Data);
 
35
                virtual ~wxsLinearMeter();
 
36
        protected:
 
37
        private:
 
38
        virtual void OnBuildCreatingCode();
 
39
        virtual wxObject* OnBuildPreview(wxWindow* Parent,long Flags);
 
40
        virtual void OnEnumWidgetProperties(long Flags);
 
41
 
 
42
                long                                            m_iValue;                                                               //!< The meter's initial value.
 
43
                long                                            m_iRangeMin;                                            //!< The meter's minimum range value.
 
44
                long                                            m_iRangeMax;                                    //!< The meter's maximum range value.
 
45
                bool                                            m_bHorizontal;                                  //!< The meter's orientation, horizontal or vertical.
 
46
                bool                                            m_bShowVal;                                             //!< Whether to show the current value.
 
47
                bool                                            m_bShowLimits;                                  //!< Whether to show the limit values.
 
48
                wxsColourData   m_cdActiveBarColour;            //!< The meter's bar colour.
 
49
                wxsColourData   m_cdPassiveBarColour;   //!< The meter's background colour.
 
50
                wxsColourData   m_cdBorderColour;                       //!< The meter's border colour.
 
51
                wxsColourData   m_cdLimitTextColour;            //!< The colour that the limit value have.
 
52
                wxsColourData   m_cdValueTextColour;            //!< The meter's text colour.
 
53
                wxsColourData   m_cdTagColour;                                  //!< The meter's tag colour.
 
54
                wxsFontData             m_fnt;                                                                  //!< The meter's display font.
 
55
 
 
56
        // Dynamic properties.
 
57
        /*! \brief Tag value enum.
 
58
         */
 
59
        struct TagDesc{
 
60
            wxPGId      id;                                                                                                             //!< Tag property ID.
 
61
            int                 val;                                                                                                            //!< Tag value.
 
62
        };
 
63
        WX_DEFINE_ARRAY(TagDesc*, TagArray);
 
64
 
 
65
        TagArray m_arrTags;                                                                                     //!< Array of tag description structs.
 
66
        wxPGId m_TagCountId;                                                                            //!< The ID of the tag count property.
 
67
 
 
68
        void OnAddExtraProperties(wxsPropertyGridManager* Grid);
 
69
        void OnExtraPropertyChanged(wxsPropertyGridManager* Grid,wxPGId id);
 
70
        bool OnXmlRead(TiXmlElement* Element,bool IsXRC,bool IsExtra);
 
71
        bool OnXmlWrite(TiXmlElement* Element,bool IsXRC,bool IsExtra);
 
72
                void InsertPropertyForTag(wxsPropertyGridManager* Grid,int Position);
 
73
                bool HandleChangeInTag(wxsPropertyGridManager* Grid,wxPGId id,int Position);
 
74
};
 
75
 
 
76
#endif // WXSLINEARMETER_H