File: propgriddefs.h

package info (click to toggle)
wxpython4.0 4.2.3%2Bdfsg-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 221,752 kB
  • sloc: cpp: 962,555; python: 230,573; ansic: 170,731; makefile: 51,756; sh: 9,342; perl: 1,564; javascript: 584; php: 326; xml: 200
file content (199 lines) | stat: -rw-r--r-- 6,096 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
/////////////////////////////////////////////////////////////////////////////
// Name:        propgriddefs.h
// Purpose:     various constants, etc. used in documented propgrid API
// Author:      wxWidgets team
// Licence:     wxWindows licence
/////////////////////////////////////////////////////////////////////////////


// -----------------------------------------------------------------------

/** Used to tell wxPGProperty to use label as name as well
*/
#define wxPG_LABEL              (*wxPGProperty::sm_wxPG_LABEL)

/** This is the value placed in wxPGProperty::sm_wxPG_LABEL
*/
#define wxPG_LABEL_STRING       wxS("@!")
#define wxPG_NULL_BITMAP        wxNullBitmap
#define wxPG_COLOUR_BLACK       (*wxBLACK)

/** Convert Red, Green and Blue to a single 32-bit value.
*/
#define wxPG_COLOUR(R,G,B) ((wxUint32)(R+(G<<8)+(B<<16)))


/** If property is supposed to have custom-painted image, then returning
    this in wxPGProperty::OnMeasureImage() will usually be enough.
*/
#define wxPG_DEFAULT_IMAGE_SIZE             wxDefaultSize


/** This callback function is used for sorting properties.

    Call wxPropertyGrid::SetSortFunction() to set it.

    Sort function should return a value greater than 0 if position of @a p1 is
    after @a p2. So, for instance, when comparing property names, you can use
    following implementation:

        @code
            int MyPropertySortFunction(wxPropertyGrid* propGrid,
                                       wxPGProperty* p1,
                                       wxPGProperty* p2)
            {
                return p1->GetBaseName().compare( p2->GetBaseName() );
            }
        @endcode
*/
typedef int (*wxPGSortCallback)(wxPropertyGrid* propGrid,
                                wxPGProperty* p1,
                                wxPGProperty* p2);

// -----------------------------------------------------------------------

/** Used to indicate wxPGChoices::Add() etc that the value is actually not given
    by the caller.
*/
#define wxPG_INVALID_VALUE      INT_MAX

// -----------------------------------------------------------------------

enum wxPG_GETPROPERTYVALUES_FLAGS
{
/** Flag for wxPropertyGridInterface::SetProperty* functions,
    wxPropertyGridInterface::HideProperty(), etc.
    Apply changes only for the property in question.
    @hideinitializer
*/
wxPG_DONT_RECURSE                 = 0x00000000,

/** Flag for wxPropertyGridInterface::GetPropertyValues().
    Use this flag to retain category structure; each sub-category
    will be its own wxVariantList of wxVariant.
    @hideinitializer
*/
wxPG_KEEP_STRUCTURE               = 0x00000010,

/** Flag for wxPropertyGridInterface::SetProperty* functions,
    wxPropertyGridInterface::HideProperty(), etc.
    Apply changes recursively for the property and all its children.
    @hideinitializer
*/
wxPG_RECURSE                      = 0x00000020,

/** Flag for wxPropertyGridInterface::GetPropertyValues().
    Use this flag to include property attributes as well.
    @hideinitializer
*/
wxPG_INC_ATTRIBUTES               = 0x00000040,

/** Used when first starting recursion.
    @hideinitializer
*/
wxPG_RECURSE_STARTS               = 0x00000080,

/** Force value change.
    @hideinitializer
*/
wxPG_FORCE                        = 0x00000100,

/** Only sort categories and their immediate children.
    Sorting done by ::wxPG_AUTO_SORT option uses this.
    @hideinitializer
*/
wxPG_SORT_TOP_LEVEL_ONLY          = 0x00000200
};

// -----------------------------------------------------------------------

/** Misc argument flags.
*/
enum wxPG_MISC_ARG_FLAGS
{
    /** Get/Store full value instead of displayed value.
        @hideinitializer
    */
    wxPG_FULL_VALUE                     = 0x00000001,

    /** Perform special action in case of unsuccessful conversion.
        @hideinitializer
    */
    wxPG_REPORT_ERROR                   = 0x00000002,

    /**
        @hideinitializer
    */
    wxPG_PROPERTY_SPECIFIC              = 0x00000004,

    /** Get/Store editable value instead of displayed one (should only be
        different in the case of common values).
        @hideinitializer
    */
    wxPG_EDITABLE_VALUE                 = 0x00000008,

    /** Used when dealing with fragments of composite string value
        @hideinitializer
    */
    wxPG_COMPOSITE_FRAGMENT             = 0x00000010,

    /** Means property for which final string value is for cannot really be
        edited.
        @hideinitializer
    */
    wxPG_UNEDITABLE_COMPOSITE_FRAGMENT  = 0x00000020,

    /** wxPGProperty::ValueToString() called from wxPGProperty::GetValueAsString()
        (guarantees that input wxVariant value is current own value)
        @hideinitializer
    */
    wxPG_VALUE_IS_CURRENT               = 0x00000040,

    /** Value is being set programmatically (i.e. not by user)
        @hideinitializer
    */
    wxPG_PROGRAMMATIC_VALUE             = 0x00000080
};

// -----------------------------------------------------------------------

/** wxPGProperty::SetValue() flags
*/
enum wxPG_SETVALUE_FLAGS
{
    /**
        @hideinitializer
    */
    wxPG_SETVAL_REFRESH_EDITOR      = 0x0001,
    /**
        @hideinitializer
    */
    wxPG_SETVAL_AGGREGATED          = 0x0002,
    /**
        @hideinitializer
    */
    wxPG_SETVAL_FROM_PARENT         = 0x0004,
    /** Set if value changed by user
        @hideinitializer
    */
    wxPG_SETVAL_BY_USER             = 0x0008
};

// -----------------------------------------------------------------------

//
/** Valid constants for ::wxPG_UINT_BASE attribute
    (@c long because of wxVariant constructor)
*/
#define wxPG_BASE_OCT                       8L
#define wxPG_BASE_DEC                       10L
#define wxPG_BASE_HEX                       16L
#define wxPG_BASE_HEXL                      32L

/** Valid constants for ::wxPG_UINT_PREFIX attribute
*/
#define wxPG_PREFIX_NONE                    0L
#define wxPG_PREFIX_0x                      1L
#define wxPG_PREFIX_DOLLAR_SIGN             2L

// -----------------------------------------------------------------------