]> git.saurik.com Git - wxWidgets.git/blob - include/wx/propgrid/props.h
b323220dca76280a0ed4e3bfa8dd09cecfea4381
[wxWidgets.git] / include / wx / propgrid / props.h
1 /////////////////////////////////////////////////////////////////////////////
2 // Name: wx/propgrid/props.h
3 // Purpose: wxPropertyGrid Property Classes
4 // Author: Jaakko Salli
5 // Modified by:
6 // Created: 2007-03-28
7 // RCS-ID: $Id:
8 // Copyright: (c) Jaakko Salli
9 // Licence: wxWindows license
10 /////////////////////////////////////////////////////////////////////////////
11
12 #ifndef _WX_PROPGRID_PROPS_H_
13 #define _WX_PROPGRID_PROPS_H_
14
15 #if wxUSE_PROPGRID
16
17 // -----------------------------------------------------------------------
18
19 class wxArrayEditorDialog;
20
21 #include "wx/propgrid/editors.h"
22
23 // -----------------------------------------------------------------------
24
25 //
26 // Property class implementation helper macros.
27 //
28
29 // Adds constructor function as well.
30 #define WX_PG_IMPLEMENT_PROPERTY_CLASS2(NAME,CLASSNAME,\
31 UPCLASS,T,T_AS_ARG,EDITOR) \
32 IMPLEMENT_DYNAMIC_CLASS(NAME, UPCLASS) \
33 WX_PG_IMPLEMENT_PROPERTY_CLASS_PLAIN(NAME,T,EDITOR)
34
35 // A regular property
36 #define WX_PG_IMPLEMENT_PROPERTY_CLASS(NAME,UPNAME,T,T_AS_ARG,EDITOR) \
37 WX_PG_IMPLEMENT_PROPERTY_CLASS2(NAME,NAME,UPNAME,T,T_AS_ARG,EDITOR)
38
39 // -----------------------------------------------------------------------
40
41 #define wxPG_NO_ESCAPE wxPG_PROP_NO_ESCAPE // No escape sequences
42 #define wxPG_ESCAPE 0 // Escape sequences
43
44 #define WX_PG_DECLARE_STRING_PROPERTY_WITH_DECL(NAME, DECL) \
45 DECL NAME : public wxLongStringProperty \
46 { \
47 DECLARE_DYNAMIC_CLASS(NAME) \
48 public: \
49 NAME( const wxString& name = wxPG_LABEL, \
50 const wxString& label = wxPG_LABEL, \
51 const wxString& value = wxEmptyString); \
52 virtual ~NAME(); \
53 virtual bool OnButtonClick( wxPropertyGrid* propgrid, wxString& value ); \
54 virtual wxValidator* DoGetValidator() const; \
55 };
56
57 #define WX_PG_DECLARE_STRING_PROPERTY(NAME) \
58 WX_PG_DECLARE_STRING_PROPERTY_WITH_DECL(NAME, class) \
59
60 #define WX_PG_IMPLEMENT_STRING_PROPERTY_WITH_VALIDATOR(NAME, FLAGS) \
61 IMPLEMENT_DYNAMIC_CLASS(NAME,wxLongStringProperty) \
62 NAME::NAME( const wxString& name, \
63 const wxString& label, \
64 const wxString& value ) \
65 : wxLongStringProperty(name,label,value) \
66 { \
67 m_flags |= FLAGS; \
68 } \
69 NAME::~NAME() { }
70
71 #define WX_PG_IMPLEMENT_STRING_PROPERTY(NAME, FLAGS) \
72 WX_PG_IMPLEMENT_STRING_PROPERTY_WITH_VALIDATOR(NAME,FLAGS) \
73 wxValidator* NAME::DoGetValidator () const \
74 { return (wxValidator*) NULL; }
75
76 // -----------------------------------------------------------------------
77
78 #define WX_PG_DECLARE_CUSTOM_FLAGS_PROPERTY_WITH_DECL(CLASSNAME,DECL) \
79 DECL CLASSNAME : public wxFlagsProperty \
80 { \
81 WX_PG_DECLARE_PROPERTY_CLASS(CLASSNAME) \
82 public: \
83 CLASSNAME( const wxString& label = wxPG_LABEL, \
84 const wxString& name = wxPG_LABEL, \
85 long value = -1 ); \
86 virtual ~CLASSNAME(); \
87 };
88
89 #define WX_PG_DECLARE_CUSTOM_FLAGS_PROPERTY(CLASSNAME) \
90 WX_PG_DECLARE_CUSTOM_FLAGS_PROPERTY_WITH_DECL(CLASSNAME, class)
91
92 // This will create interface for wxFlagsProperty derived class
93 // named CLASSNAME.
94 #define WX_PG_IMPLEMENT_CUSTOM_FLAGS_PROPERTY(CLASSNAME,LABELS,VALUES,DEFVAL) \
95 WX_PG_IMPLEMENT_PROPERTY_CLASS(CLASSNAME,wxFlagsProperty,long_##CLASSNAME,\
96 long,TextCtrl) \
97 CLASSNAME::CLASSNAME( const wxString& label, \
98 const wxString& name, \
99 long value ) \
100 : wxFlagsProperty(label,name,LABELS,VALUES,value!=-1?value:DEFVAL) \
101 { \
102 m_flags |= wxPG_PROP_STATIC_CHOICES; \
103 } \
104 CLASSNAME::~CLASSNAME() { }
105
106
107 // -----------------------------------------------------------------------
108
109 #define WX_PG_DECLARE_CUSTOM_ENUM_PROPERTY_WITH_DECL(CLASSNAME, DECL) \
110 class CLASSNAME : public wxEnumProperty \
111 { \
112 WX_PG_DECLARE_PROPERTY_CLASS(CLASSNAME) \
113 public: \
114 CLASSNAME( const wxString& label = wxPG_LABEL, \
115 const wxString& name = wxPG_LABEL, \
116 int value = -1 ); \
117 virtual ~CLASSNAME(); \
118 };
119
120 #define WX_PG_DECLARE_CUSTOM_ENUM_PROPERTY(CLASSNAME) \
121 WX_PG_DECLARE_CUSTOM_ENUM_PROPERTY_WITH_DECL(CLASSNAME, class)
122
123 #define WX_PG_IMPLEMENT_CUSTOM_ENUM_PROPERTY(CLASSNAME,LABELS,VALUES,DEFVAL) \
124 WX_PG_IMPLEMENT_PROPERTY_CLASS(CLASSNAME, wxEnumProperty, long_##CLASSNAME, \
125 int, Choice) \
126 CLASSNAME::CLASSNAME( const wxString& label, const wxString& name, int value ) \
127 : wxEnumProperty(label,name,LABELS,VALUES,value!=-1?value:DEFVAL) \
128 { \
129 m_flags |= wxPG_PROP_STATIC_CHOICES; \
130 } \
131 CLASSNAME::~CLASSNAME() { }
132
133
134 // -----------------------------------------------------------------------
135
136 #define WX_PG_DECLARE_CUSTOM_COLOUR_PROPERTY_WITH_DECL(CLASSNAME, DECL) \
137 DECL CLASSNAME : public wxSystemColourProperty \
138 { \
139 DECLARE_DYNAMIC_CLASS(CLASSNAME) \
140 public: \
141 CLASSNAME( const wxString& label = wxPG_LABEL, \
142 const wxString& name = wxPG_LABEL, \
143 const wxColourPropertyValue& value = wxColourPropertyValue() ); \
144 virtual ~CLASSNAME(); \
145 virtual wxColour GetColour( int index ) const; \
146 };
147
148 #define WX_PG_DECLARE_CUSTOM_COLOUR_PROPERTY(CLASSNAME) \
149 WX_PG_DECLARE_CUSTOM_COLOUR_PROPERTY_WITH_DECL(CLASSNAME, class)
150
151 #define WX_PG_IMPLEMENT_CUSTOM_COLOUR_PROPERTY(CLASSNAME,\
152 LABELS,VALUES,COLOURS) \
153 static wxPGChoices gs_##CLASSNAME##_choicesCache; \
154 IMPLEMENT_DYNAMIC_CLASS(CLASSNAME, wxSystemColourProperty) \
155 CLASSNAME::CLASSNAME( const wxString& label, const wxString& name, \
156 const wxColourPropertyValue& value ) \
157 : wxSystemColourProperty(label, name, LABELS, VALUES, \
158 &gs_##CLASSNAME##_choicesCache, value ) \
159 { \
160 m_flags |= wxPG_PROP_TRANSLATE_CUSTOM; \
161 } \
162 CLASSNAME::~CLASSNAME () { } \
163 wxColour CLASSNAME::GetColour ( int index ) const \
164 { \
165 if ( !m_choices.HasValue(index) ) \
166 { \
167 wxASSERT( index < (int)m_choices.GetCount() ); \
168 return COLOURS[index]; \
169 } \
170 return COLOURS[m_choices.GetValue(index)]; \
171 }
172
173 // -----------------------------------------------------------------------
174
175 #define WX_PG_DECLARE_CUSTOM_COLOUR_PROPERTY_USES_WXCOLOUR_WITH_DECL(CLASSNAME,\
176 DECL) \
177 DECL CLASSNAME : public wxSystemColourProperty \
178 { \
179 WX_PG_DECLARE_PROPERTY_CLASS(CLASSNAME) \
180 public: \
181 CLASSNAME( const wxString& label = wxPG_LABEL, \
182 const wxString& name = wxPG_LABEL, \
183 const wxColour& value = wxColour() ); \
184 virtual ~CLASSNAME(); \
185 virtual wxString GetValueAsString( int argFlags ) const; \
186 virtual wxColour GetColour( int index ) const; \
187 virtual wxVariant DoTranslateVal( wxColourPropertyValue& v ) const; \
188 void Init( wxColour colour ); \
189 };
190
191 #define WX_PG_DECLARE_CUSTOM_COLOUR_PROPERTY_USES_WXCOLOUR(CLASSNAME) \
192 WX_PG_DECLARE_CUSTOM_COLOUR_PROPERTY_USES_WXCOLOUR_WITH_DECL(CLASSNAME, class)
193
194 #define WX_PG_IMPLEMENT_CUSTOM_COLOUR_PROPERTY_USES_WXCOLOUR2(CLASSNAME, \
195 LABELS, \
196 VALUES, \
197 COLOURS, \
198 EDITOR) \
199 static wxPGChoices gs_##CLASSNAME##_choicesCache; \
200 WX_PG_IMPLEMENT_PROPERTY_CLASS(CLASSNAME, wxSystemColourProperty, \
201 wxColour, const wxColour&,EDITOR) \
202 CLASSNAME::CLASSNAME( const wxString& label, \
203 const wxString& name, \
204 const wxColour& value ) \
205 : wxSystemColourProperty(label, name, LABELS, VALUES, \
206 &gs_##CLASSNAME##_choicesCache, value ) \
207 { \
208 if ( &value ) \
209 Init( value ); \
210 else \
211 Init( *wxWHITE ); \
212 m_flags |= wxPG_PROP_TRANSLATE_CUSTOM; \
213 } \
214 CLASSNAME::~CLASSNAME() { } \
215 void CLASSNAME::Init( wxColour colour ) \
216 { \
217 if ( !colour.Ok() ) \
218 colour = *wxWHITE; \
219 wxVariant variant; \
220 variant << colour; \
221 m_value = variant; \
222 int ind = ColToInd(colour); \
223 if ( ind < 0 ) \
224 ind = m_choices.GetCount() - 1; \
225 SetIndex( ind ); \
226 } \
227 wxString CLASSNAME::GetValueAsString( int argFlags ) const \
228 { \
229 const wxPGEditor* editor = GetEditorClass(); \
230 if ( editor != wxPG_EDITOR(Choice) && \
231 editor != wxPG_EDITOR(ChoiceAndButton) && \
232 editor != wxPG_EDITOR(ComboBox) ) \
233 argFlags |= wxPG_PROPERTY_SPECIFIC; \
234 return wxSystemColourProperty::GetValueAsString(argFlags); \
235 } \
236 wxColour CLASSNAME::GetColour( int index ) const \
237 { \
238 if ( !m_choices.HasValue(index) ) \
239 { \
240 wxASSERT( index < (int)GetItemCount() ); \
241 return COLOURS[index]; \
242 } \
243 return COLOURS[m_choices.GetValue(index)]; \
244 } \
245 wxVariant CLASSNAME::DoTranslateVal( wxColourPropertyValue& v ) const \
246 { \
247 wxVariant variant; \
248 variant << v.m_colour; \
249 return variant; \
250 }
251
252
253 #define WX_PG_IMPLEMENT_CUSTOM_COLOUR_PROPERTY_USES_WXCOLOUR(CLASSNAME, \
254 LABELS, \
255 VALUES, \
256 COLOURS) \
257 WX_PG_IMPLEMENT_CUSTOM_COLOUR_PROPERTY_USES_WXCOLOUR2(CLASSNAME, \
258 LABELS, \
259 VALUES, \
260 COLOURS, \
261 Choice)
262
263 // -----------------------------------------------------------------------
264
265 //
266 // These macros help creating DoGetValidator
267 #define WX_PG_DOGETVALIDATOR_ENTRY() \
268 static wxValidator* s_ptr = (wxValidator*) NULL; \
269 if ( s_ptr ) return s_ptr;
270
271 // Common function exit
272 #define WX_PG_DOGETVALIDATOR_EXIT(VALIDATOR) \
273 s_ptr = VALIDATOR; \
274 wxPGGlobalVars->m_arrValidators.Add( (void*) VALIDATOR ); \
275 return VALIDATOR;
276
277 // -----------------------------------------------------------------------
278
279 #ifndef SWIG
280
281 /** @class wxPGInDialogValidator
282 @ingroup classes
283 Creates and manages a temporary wxTextCtrl for validation purposes.
284 Uses wxPropertyGrid's current editor, if available.
285 */
286 class WXDLLIMPEXP_PROPGRID wxPGInDialogValidator
287 {
288 public:
289 wxPGInDialogValidator()
290 {
291 m_textCtrl = NULL;
292 }
293
294 ~wxPGInDialogValidator()
295 {
296 if ( m_textCtrl )
297 m_textCtrl->Destroy();
298 }
299
300 bool DoValidate( wxPropertyGrid* propGrid,
301 wxValidator* validator,
302 const wxString& value );
303
304 private:
305 wxTextCtrl* m_textCtrl;
306 };
307
308 #endif // SWIG
309
310
311 // -----------------------------------------------------------------------
312 // Property classes
313 // -----------------------------------------------------------------------
314
315 #define wxPG_PROP_PASSWORD wxPG_PROP_CLASS_SPECIFIC_2
316
317 /** @class wxStringProperty
318 @ingroup classes
319 Basic property with string value.
320
321 <b>Supported special attributes:</b>
322 - "Password": set to 1 inorder to enable wxTE_PASSWORD on the editor.
323
324 @remarks
325 - If value "<composed>" is set, then actual value is formed (or composed)
326 from values of child properties.
327 */
328 class WXDLLIMPEXP_PROPGRID wxStringProperty : public wxPGProperty
329 {
330 WX_PG_DECLARE_PROPERTY_CLASS(wxStringProperty)
331 public:
332 wxStringProperty( const wxString& label = wxPG_LABEL,
333 const wxString& name = wxPG_LABEL,
334 const wxString& value = wxEmptyString );
335 virtual ~wxStringProperty();
336
337 virtual wxString GetValueAsString( int argFlags = 0 ) const;
338 virtual bool StringToValue( wxVariant& variant,
339 const wxString& text,
340 int argFlags = 0 ) const;
341
342 virtual bool DoSetAttribute( const wxString& name, wxVariant& value );
343
344 /** This is updated so "<composed>" special value can be handled.
345 */
346 virtual void OnSetValue();
347
348 protected:
349 };
350
351 // -----------------------------------------------------------------------
352
353 #ifndef SWIG
354 /** Constants used with DoValidation() methods.
355 */
356 enum
357 {
358 /** Instead of modifying the value, show an error message.
359 */
360 wxPG_PROPERTY_VALIDATION_ERROR_MESSAGE = 0,
361
362 /** Modify value, but stick with the limitations.
363 */
364 wxPG_PROPERTY_VALIDATION_SATURATE = 1,
365
366 /** Modify value, wrap around on overflow.
367 */
368 wxPG_PROPERTY_VALIDATION_WRAP = 2
369 };
370 #endif
371
372 // -----------------------------------------------------------------------
373
374 /** @class wxIntProperty
375 @ingroup classes
376 Basic property with integer value.
377
378 Seamlessly supports 64-bit integer (wxLongLong) on overflow.
379
380 <b>Example how to use seamless 64-bit integer support</b>
381
382 Getting value:
383
384 @code
385 wxLongLong_t value = pg->GetPropertyValueAsLongLong();
386 @endcode
387
388 or
389
390 @code
391 wxLongLong_t value;
392 wxVariant variant = property->GetValue();
393 if ( variant.GetType() == "wxLongLong" )
394 value = wxLongLongFromVariant(variant);
395 else
396 value = variant.GetLong();
397 @endcode
398
399 Setting value:
400
401 @code
402 pg->SetPropertyValue(longLongVal);
403 @endcode
404
405 or
406
407 @code
408 property->SetValue(WXVARIANT(longLongVal));
409 @endcode
410
411
412 <b>Supported special attributes:</b>
413 - "Min", "Max": Specify acceptable value range.
414 */
415 class WXDLLIMPEXP_PROPGRID wxIntProperty : public wxPGProperty
416 {
417 WX_PG_DECLARE_PROPERTY_CLASS(wxIntProperty)
418 public:
419 wxIntProperty( const wxString& label = wxPG_LABEL,
420 const wxString& name = wxPG_LABEL,
421 long value = 0 );
422 virtual ~wxIntProperty();
423
424 wxIntProperty( const wxString& label,
425 const wxString& name,
426 const wxLongLong& value );
427 virtual wxString GetValueAsString( int argFlags = 0 ) const;
428 virtual bool StringToValue( wxVariant& variant,
429 const wxString& text,
430 int argFlags = 0 ) const;
431 virtual bool ValidateValue( wxVariant& value,
432 wxPGValidationInfo& validationInfo ) const;
433 virtual bool IntToValue( wxVariant& variant,
434 int number,
435 int argFlags = 0 ) const;
436 static wxValidator* GetClassValidator();
437 virtual wxValidator* DoGetValidator() const;
438
439 /** Validation helper.
440 */
441 static bool DoValidation( const wxPGProperty* property,
442 wxLongLong_t& value,
443 wxPGValidationInfo* pValidationInfo,
444 int mode =
445 wxPG_PROPERTY_VALIDATION_ERROR_MESSAGE );
446
447 protected:
448 };
449
450 // -----------------------------------------------------------------------
451
452 /** @class wxUIntProperty
453 @ingroup classes
454 Basic property with unsigned integer value.
455 Seamlessly supports 64-bit integer (wxULongLong) on overflow.
456
457 <b>Supported special attributes:</b>
458 - "Min", "Max": Specify acceptable value range.
459 - "Base": Define base. Valid constants are wxPG_BASE_OCT, wxPG_BASE_DEC,
460 wxPG_BASE_HEX and wxPG_BASE_HEXL (lowercase characters). Arbitrary bases
461 are <b>not</b> supported.
462 - "Prefix": Possible values are wxPG_PREFIX_NONE, wxPG_PREFIX_0x, and
463 wxPG_PREFIX_DOLLAR_SIGN. Only wxPG_PREFIX_NONE works with Decimal and Octal
464 numbers.
465
466 @remarks
467 - For example how to use seamless 64-bit integer support, see wxIntProperty
468 documentation (just use wxULongLong instead of wxLongLong).
469 */
470 class WXDLLIMPEXP_PROPGRID wxUIntProperty : public wxPGProperty
471 {
472 WX_PG_DECLARE_PROPERTY_CLASS(wxUIntProperty)
473 public:
474 wxUIntProperty( const wxString& label = wxPG_LABEL,
475 const wxString& name = wxPG_LABEL,
476 unsigned long value = 0 );
477 virtual ~wxUIntProperty();
478 wxUIntProperty( const wxString& label,
479 const wxString& name,
480 const wxULongLong& value );
481 virtual wxString GetValueAsString( int argFlags = 0 ) const;
482 virtual bool StringToValue( wxVariant& variant,
483 const wxString& text,
484 int argFlags = 0 ) const;
485 virtual bool DoSetAttribute( const wxString& name, wxVariant& value );
486 virtual bool ValidateValue( wxVariant& value,
487 wxPGValidationInfo& validationInfo ) const;
488 virtual bool IntToValue( wxVariant& variant,
489 int number,
490 int argFlags = 0 ) const;
491 protected:
492 wxByte m_base;
493 wxByte m_realBase; // translated to 8,16,etc.
494 wxByte m_prefix;
495 private:
496 void Init();
497 };
498
499 // -----------------------------------------------------------------------
500
501 /** @class wxFloatProperty
502 @ingroup classes
503 Basic property with double-precision floating point value.
504
505 <b>Supported special attributes:</b>
506 - "Precision": Sets the (max) precision used when floating point value is
507 rendered as text. The default -1 means infinite precision.
508 */
509 class WXDLLIMPEXP_PROPGRID wxFloatProperty : public wxPGProperty
510 {
511 WX_PG_DECLARE_PROPERTY_CLASS(wxFloatProperty)
512 public:
513 wxFloatProperty( const wxString& label = wxPG_LABEL,
514 const wxString& name = wxPG_LABEL,
515 double value = 0.0 );
516 virtual ~wxFloatProperty();
517
518 virtual wxString GetValueAsString( int argFlags = 0 ) const;
519 virtual bool StringToValue( wxVariant& variant,
520 const wxString& text,
521 int argFlags = 0 ) const;
522 virtual bool DoSetAttribute( const wxString& name, wxVariant& value );
523 virtual bool ValidateValue( wxVariant& value,
524 wxPGValidationInfo& validationInfo ) const;
525
526 /** Validation helper.
527 */
528 static bool DoValidation( const wxPGProperty* property,
529 double& value,
530 wxPGValidationInfo* pValidationInfo,
531 int mode =
532 wxPG_PROPERTY_VALIDATION_ERROR_MESSAGE );
533
534 protected:
535 int m_precision;
536 virtual wxValidator* DoGetValidator () const;
537 };
538
539 // -----------------------------------------------------------------------
540
541 // Exclude class from wxPython bindings
542 #ifndef SWIG
543
544 /** @class wxBoolProperty
545 @ingroup classes
546 Basic property with boolean value.
547
548 <b>Supported special attributes:</b>
549 - "UseCheckbox": Set to 1 to use check box editor instead of combo box.
550 - "UseDClickCycling": Set to 1 to cycle combo box instead showing the list.
551 */
552 class WXDLLIMPEXP_PROPGRID wxBoolProperty : public wxPGProperty
553 {
554 WX_PG_DECLARE_PROPERTY_CLASS(wxBoolProperty)
555 public:
556 wxBoolProperty( const wxString& label = wxPG_LABEL,
557 const wxString& name = wxPG_LABEL,
558 bool value = false );
559 virtual ~wxBoolProperty();
560
561 virtual wxString GetValueAsString( int argFlags = 0 ) const;
562 virtual bool StringToValue( wxVariant& variant,
563 const wxString& text,
564 int argFlags = 0 ) const;
565 virtual bool IntToValue( wxVariant& variant,
566 int number, int argFlags = 0 ) const;
567 virtual bool DoSetAttribute( const wxString& name, wxVariant& value );
568 };
569
570 #endif // !SWIG
571
572 // -----------------------------------------------------------------------
573
574 /** @class wxBaseEnumProperty
575 @ingroup classes
576 Derive dynamic custom properties with choices from this class.
577
578 @remarks
579 - Updating private index is important. You can do this either by calling
580 SetIndex() in IntToValue, and then letting wxBaseEnumProperty::OnSetValue
581 be called (by not implementing it, or by calling super class function in
582 it) -OR- you can just call SetIndex in OnSetValue.
583 */
584 class WXDLLIMPEXP_PROPGRID wxBaseEnumProperty : public wxPGProperty
585 {
586 public:
587 wxBaseEnumProperty( const wxString& label = wxPG_LABEL,
588 const wxString& name = wxPG_LABEL );
589
590 virtual void OnSetValue();
591 virtual wxString GetValueAsString( int argFlags ) const;
592 virtual bool StringToValue( wxVariant& variant,
593 const wxString& text,
594 int argFlags = 0 ) const;
595 virtual bool ValidateValue( wxVariant& value,
596 wxPGValidationInfo& validationInfo ) const;
597
598 // If wxPG_FULL_VALUE is not set in flags, then the value is interpreted
599 // as index to choices list. Otherwise, it is actual value.
600 virtual bool IntToValue( wxVariant& variant,
601 int number,
602 int argFlags = 0 ) const;
603
604 //
605 // Additional virtuals
606
607 // This must be overridden to have non-index based value
608 virtual int GetIndexForValue( int value ) const;
609
610 // This returns string and value for index
611 // Returns NULL if beyond last item
612 // pvalue is never NULL - always set it.
613 virtual const wxString* GetEntry( size_t index, int* pvalue ) const = 0;
614
615 // GetChoiceSelection needs to overridden since m_index is
616 // the true index, and various property classes derived from
617 // this take advantage of it.
618 virtual int GetChoiceSelection() const { return m_index; }
619
620 int GetValueForIndex( size_t index ) const
621 {
622 int v;
623 GetEntry( index, &v );
624 return v;
625 }
626
627 protected:
628
629 int GetIndex() const;
630 void SetIndex( int index );
631
632 bool ValueFromString_( wxVariant& value,
633 const wxString& text,
634 int argFlags ) const;
635 bool ValueFromInt_( wxVariant& value, int intVal, int argFlags ) const;
636
637 static void ResetNextIndex() { ms_nextIndex = -2; }
638
639 private:
640 // This is private so that classes are guaranteed to use GetIndex
641 // for up-to-date index value.
642 int m_index;
643
644 // Relies on ValidateValue being called always before OnSetValue
645 static int ms_nextIndex;
646 };
647
648 // -----------------------------------------------------------------------
649
650 // If set, then selection of choices is static and should not be
651 // changed (i.e. returns NULL in GetPropertyChoices).
652 #define wxPG_PROP_STATIC_CHOICES wxPG_PROP_CLASS_SPECIFIC_1
653
654 /** @class wxEnumProperty
655 @ingroup classes
656 You can derive custom properties with choices from this class. See
657 wxBaseEnumProperty for remarks.
658 */
659 class WXDLLIMPEXP_PROPGRID wxEnumProperty : public wxBaseEnumProperty
660 {
661 WX_PG_DECLARE_PROPERTY_CLASS(wxEnumProperty)
662 public:
663
664 #ifndef SWIG
665 wxEnumProperty( const wxString& label = wxPG_LABEL,
666 const wxString& name = wxPG_LABEL,
667 const wxChar** labels = NULL,
668 const long* values = NULL,
669 int value = 0 );
670 wxEnumProperty( const wxString& label,
671 const wxString& name,
672 wxPGChoices& choices,
673 int value = 0 );
674
675 // Special constructor for caching choices (used by derived class)
676 wxEnumProperty( const wxString& label,
677 const wxString& name,
678 const wxChar** labels,
679 const long* values,
680 wxPGChoices* choicesCache,
681 int value = 0 );
682
683 wxEnumProperty( const wxString& label,
684 const wxString& name,
685 const wxArrayString& labels,
686 const wxArrayInt& values = wxArrayInt(),
687 int value = 0 );
688 #else
689 wxEnumProperty( const wxString& label = wxPG_LABEL,
690 const wxString& name = wxPG_LABEL,
691 const wxArrayString& labels = wxArrayString(),
692 const wxArrayInt& values = wxArrayInt(),
693 int value = 0 );
694 #endif
695
696 virtual ~wxEnumProperty();
697
698 virtual int GetIndexForValue( int value ) const;
699 virtual const wxString* GetEntry( size_t index, int* pvalue ) const;
700
701 size_t GetItemCount() const { return m_choices.GetCount(); }
702 const wxPGChoices& GetChoices() const { return m_choices; }
703 };
704
705 // -----------------------------------------------------------------------
706
707 /** @class wxEditEnumProperty
708 @ingroup classes
709 wxEnumProperty with wxString value and writable combo box editor.
710
711 @remarks
712 Uses int value, similar to wxEnumProperty, unless text entered by user is
713 is not in choices (in which case string value is used).
714 */
715 class WXDLLIMPEXP_PROPGRID wxEditEnumProperty : public wxEnumProperty
716 {
717 WX_PG_DECLARE_PROPERTY_CLASS(wxEditEnumProperty)
718 public:
719
720 wxEditEnumProperty( const wxString& label,
721 const wxString& name,
722 const wxChar** labels,
723 const long* values,
724 const wxString& value );
725 wxEditEnumProperty( const wxString& label = wxPG_LABEL,
726 const wxString& name = wxPG_LABEL,
727 const wxArrayString& labels = wxArrayString(),
728 const wxArrayInt& values = wxArrayInt(),
729 const wxString& value = wxEmptyString );
730 wxEditEnumProperty( const wxString& label,
731 const wxString& name,
732 wxPGChoices& choices,
733 const wxString& value = wxEmptyString );
734
735 // Special constructor for caching choices (used by derived class)
736 wxEditEnumProperty( const wxString& label,
737 const wxString& name,
738 const wxChar** labels,
739 const long* values,
740 wxPGChoices* choicesCache,
741 const wxString& value );
742
743 virtual ~wxEditEnumProperty();
744
745 protected:
746 };
747
748 // -----------------------------------------------------------------------
749
750 /** @class wxFlagsProperty
751 @ingroup classes
752 Represents a bit set that fits in a long integer. wxBoolProperty
753 sub-properties are created for editing individual bits. Textctrl is created
754 to manually edit the flags as a text; a continous sequence of spaces,
755 commas and semicolons is considered as a flag id separator.
756 <b>Note:</b> When changing "choices" (ie. flag labels) of wxFlagsProperty,
757 you will need to use SetPropertyChoices - otherwise they will not get
758 updated properly.
759 */
760 class WXDLLIMPEXP_PROPGRID wxFlagsProperty : public wxPGProperty
761 {
762 WX_PG_DECLARE_PROPERTY_CLASS(wxFlagsProperty)
763 public:
764
765 #ifndef SWIG
766 wxFlagsProperty( const wxString& label,
767 const wxString& name,
768 const wxChar** labels,
769 const long* values = NULL,
770 long value = 0 );
771 wxFlagsProperty( const wxString& label,
772 const wxString& name,
773 wxPGChoices& choices,
774 long value = 0 );
775 #endif
776 wxFlagsProperty( const wxString& label = wxPG_LABEL,
777 const wxString& name = wxPG_LABEL,
778 const wxArrayString& labels = wxArrayString(),
779 const wxArrayInt& values = wxArrayInt(),
780 int value = 0 );
781 virtual ~wxFlagsProperty ();
782
783 virtual void OnSetValue();
784 virtual wxString GetValueAsString( int argFlags ) const;
785 virtual bool StringToValue( wxVariant& variant,
786 const wxString& text,
787 int flags ) const;
788 virtual void ChildChanged( wxVariant& thisValue,
789 int childIndex,
790 wxVariant& childValue ) const;
791 virtual void RefreshChildren();
792
793 // GetChoiceSelection needs to overridden since m_choices is
794 // used and value is integer, but it is not index.
795 virtual int GetChoiceSelection() const { return wxNOT_FOUND; }
796
797 // helpers
798 size_t GetItemCount() const { return m_choices.GetCount(); }
799 const wxString& GetLabel( size_t ind ) const
800 { return m_choices.GetLabel(ind); }
801
802 protected:
803 // Used to detect if choices have been changed
804 wxPGChoicesData* m_oldChoicesData;
805
806 // Needed to properly mark changed sub-properties
807 long m_oldValue;
808
809 // Converts string id to a relevant bit.
810 long IdToBit( const wxString& id ) const;
811
812 // Creates children and sets value.
813 void Init();
814 };
815
816 // -----------------------------------------------------------------------
817
818 /** @class wxPGFileDialogAdapter
819 @ingroup classes
820 */
821 class WXDLLIMPEXP_PROPGRID
822 wxPGFileDialogAdapter : public wxPGEditorDialogAdapter
823 {
824 public:
825 virtual bool DoShowDialog( wxPropertyGrid* propGrid,
826 wxPGProperty* property );
827 };
828
829 // -----------------------------------------------------------------------
830
831 #include "wx/filename.h"
832
833 // Indicates first bit useable by derived properties.
834 #define wxPG_PROP_SHOW_FULL_FILENAME wxPG_PROP_CLASS_SPECIFIC_1
835
836 /** @class wxFileProperty
837 @ingroup classes
838 Like wxLongStringProperty, but the button triggers file selector instead.
839
840 <b>Supported special attributes:</b>
841 - "Wildcard": Sets wildcard (see wxFileDialog for format details), "All
842 files..." is default.
843 - "ShowFullPath": Default 1. When 0, only the file name is shown (i.e. drive
844 and directory are hidden).
845 - "ShowRelativePath": If set, then the filename is shown relative to the
846 given path string.
847 - "InitialPath": Sets the initial path of where to look for files.
848 - "DialogTitle": Sets a specific title for the dir dialog.
849 */
850 class WXDLLIMPEXP_PROPGRID wxFileProperty : public wxPGProperty
851 {
852 friend class wxPGFileDialogAdapter;
853 WX_PG_DECLARE_PROPERTY_CLASS(wxFileProperty)
854 public:
855
856 wxFileProperty( const wxString& label = wxPG_LABEL,
857 const wxString& name = wxPG_LABEL,
858 const wxString& value = wxEmptyString );
859 virtual ~wxFileProperty ();
860
861 virtual void OnSetValue();
862 virtual wxString GetValueAsString( int argFlags ) const;
863 virtual bool StringToValue( wxVariant& variant,
864 const wxString& text,
865 int argFlags = 0 ) const;
866 virtual wxPGEditorDialogAdapter* GetEditorDialog() const;
867 virtual bool DoSetAttribute( const wxString& name, wxVariant& value );
868
869 static wxValidator* GetClassValidator();
870 virtual wxValidator* DoGetValidator() const;
871
872 protected:
873 wxString m_wildcard;
874 wxString m_basePath; // If set, then show path relative to it
875 wxString m_initialPath; // If set, start the file dialog here
876 wxString m_dlgTitle; // If set, used as title for file dialog
877 wxFileName m_filename; // used as primary storage
878 int m_indFilter; // index to the selected filter
879 };
880
881 // -----------------------------------------------------------------------
882
883 #define wxPG_PROP_NO_ESCAPE wxPG_PROP_CLASS_SPECIFIC_1
884
885
886 /** @class wxPGLongStringDialogAdapter
887 @ingroup classes
888 */
889 class WXDLLIMPEXP_PROPGRID
890 wxPGLongStringDialogAdapter : public wxPGEditorDialogAdapter
891 {
892 public:
893 virtual bool DoShowDialog( wxPropertyGrid* propGrid,
894 wxPGProperty* property );
895 };
896
897
898 /** @class wxLongStringProperty
899 @ingroup classes
900 Like wxStringProperty, but has a button that triggers a small text
901 editor dialog.
902 */
903 class WXDLLIMPEXP_PROPGRID wxLongStringProperty : public wxPGProperty
904 {
905 WX_PG_DECLARE_PROPERTY_CLASS(wxLongStringProperty)
906 public:
907
908 wxLongStringProperty( const wxString& label = wxPG_LABEL,
909 const wxString& name = wxPG_LABEL,
910 const wxString& value = wxEmptyString );
911 virtual ~wxLongStringProperty();
912
913 virtual wxString GetValueAsString( int argFlags = 0 ) const;
914 virtual bool StringToValue( wxVariant& variant,
915 const wxString& text,
916 int argFlags = 0 ) const;
917 virtual bool OnEvent( wxPropertyGrid* propgrid,
918 wxWindow* primary, wxEvent& event );
919
920 // Shows string editor dialog. Value to be edited should be read from
921 // value, and if dialog is not cancelled, it should be stored back and true
922 // should be returned if that was the case.
923 virtual bool OnButtonClick( wxPropertyGrid* propgrid, wxString& value );
924
925 static bool DisplayEditorDialog( wxPGProperty* prop,
926 wxPropertyGrid* propGrid,
927 wxString& value );
928
929 protected:
930 };
931
932 // -----------------------------------------------------------------------
933
934
935 // Exclude class from wxPython bindings
936 #ifndef SWIG
937
938 /** @class wxDirProperty
939 @ingroup classes
940 Like wxLongStringProperty, but the button triggers dir selector instead.
941
942 <b>Supported special attributes:</b>
943 - "DialogMessage": Sets specific message in the dir selector.
944 */
945 class WXDLLIMPEXP_PROPGRID wxDirProperty : public wxLongStringProperty
946 {
947 #ifndef SWIG
948 DECLARE_DYNAMIC_CLASS(wxDirProperty)
949 #endif
950 public:
951 wxDirProperty( const wxString& name = wxPG_LABEL,
952 const wxString& label = wxPG_LABEL,
953 const wxString& value = wxEmptyString );
954 virtual ~wxDirProperty();
955
956 virtual bool DoSetAttribute( const wxString& name, wxVariant& value );
957 virtual wxValidator* DoGetValidator() const;
958
959 virtual bool OnButtonClick ( wxPropertyGrid* propGrid, wxString& value );
960
961 protected:
962 wxString m_dlgMessage;
963 };
964
965 #endif // !SWIG
966
967 // -----------------------------------------------------------------------
968
969 // wxBoolProperty specific flags
970 #define wxPG_PROP_USE_CHECKBOX wxPG_PROP_CLASS_SPECIFIC_1
971 // DCC = Double Click Cycles
972 #define wxPG_PROP_USE_DCC wxPG_PROP_CLASS_SPECIFIC_2
973
974
975 // -----------------------------------------------------------------------
976
977 /** @class wxArrayStringProperty
978 @ingroup classes
979 Property that manages a list of strings.
980 */
981 class WXDLLIMPEXP_PROPGRID wxArrayStringProperty : public wxPGProperty
982 {
983 WX_PG_DECLARE_PROPERTY_CLASS(wxArrayStringProperty)
984 public:
985
986 wxArrayStringProperty( const wxString& label = wxPG_LABEL,
987 const wxString& name = wxPG_LABEL,
988 const wxArrayString& value = wxArrayString() );
989 virtual ~wxArrayStringProperty();
990
991 virtual void OnSetValue();
992 virtual wxString GetValueAsString( int argFlags = 0 ) const;
993 virtual bool StringToValue( wxVariant& variant,
994 const wxString& text,
995 int argFlags = 0 ) const;
996 virtual bool OnEvent( wxPropertyGrid* propgrid,
997 wxWindow* primary, wxEvent& event );
998
999 virtual void GenerateValueAsString();
1000
1001 // Shows string editor dialog. Value to be edited should be read from
1002 // value, and if dialog is not cancelled, it should be stored back and true
1003 // should be returned if that was the case.
1004 virtual bool OnCustomStringEdit( wxWindow* parent, wxString& value );
1005
1006 // Helper.
1007 virtual bool OnButtonClick( wxPropertyGrid* propgrid,
1008 wxWindow* primary,
1009 const wxChar* cbt );
1010
1011 #ifndef SWIG
1012 // Creates wxArrayEditorDialog for string editing. Called in OnButtonClick.
1013 virtual wxArrayEditorDialog* CreateEditorDialog();
1014 #endif
1015
1016 protected:
1017 wxString m_display; // Cache for displayed text.
1018 };
1019
1020 // -----------------------------------------------------------------------
1021
1022 #define WX_PG_DECLARE_ARRAYSTRING_PROPERTY_WITH_VALIDATOR_WITH_DECL(PROPNAME, \
1023 DECL) \
1024 DECL PROPNAME : public wxArrayStringProperty \
1025 { \
1026 WX_PG_DECLARE_PROPERTY_CLASS(PROPNAME) \
1027 public: \
1028 PROPNAME( const wxString& label = wxPG_LABEL, \
1029 const wxString& name = wxPG_LABEL, \
1030 const wxArrayString& value = wxArrayString() ); \
1031 ~PROPNAME(); \
1032 virtual void GenerateValueAsString(); \
1033 virtual bool StringToValue( wxVariant& value, \
1034 const wxString& text, int = 0 ) const; \
1035 virtual bool OnEvent( wxPropertyGrid* propgrid, \
1036 wxWindow* primary, wxEvent& event ); \
1037 virtual bool OnCustomStringEdit( wxWindow* parent, wxString& value ); \
1038 virtual wxValidator* DoGetValidator() const; \
1039 };
1040
1041 #define WX_PG_DECLARE_ARRAYSTRING_PROPERTY_WITH_VALIDATOR(PROPNAM) \
1042 WX_PG_DECLARE_ARRAYSTRING_PROPERTY_WITH_VALIDATOR(PROPNAM, class)
1043
1044 #define WX_PG_IMPLEMENT_ARRAYSTRING_PROPERTY_WITH_VALIDATOR(PROPNAME, \
1045 DELIMCHAR, \
1046 CUSTBUTTXT) \
1047 WX_PG_IMPLEMENT_PROPERTY_CLASS(PROPNAME, wxArrayStringProperty, \
1048 wxArrayString, const wxArrayString&, \
1049 TextCtrlAndButton) \
1050 PROPNAME::PROPNAME( const wxString& label, \
1051 const wxString& name, \
1052 const wxArrayString& value ) \
1053 : wxArrayStringProperty(label,name,value) \
1054 { \
1055 PROPNAME::GenerateValueAsString(); \
1056 } \
1057 PROPNAME::~PROPNAME() { } \
1058 void PROPNAME::GenerateValueAsString() \
1059 { \
1060 wxChar delimChar = DELIMCHAR; \
1061 if ( delimChar == wxS('"') ) \
1062 wxArrayStringProperty::GenerateValueAsString(); \
1063 else \
1064 wxPropertyGrid::ArrayStringToString(m_display, \
1065 m_value.GetArrayString(), \
1066 0,DELIMCHAR,0); \
1067 } \
1068 bool PROPNAME::StringToValue( wxVariant& variant, \
1069 const wxString& text, int ) const \
1070 { \
1071 wxChar delimChar = DELIMCHAR; \
1072 if ( delimChar == wxS('"') ) \
1073 return wxArrayStringProperty::StringToValue(variant, text, 0); \
1074 \
1075 wxArrayString arr; \
1076 WX_PG_TOKENIZER1_BEGIN(text,DELIMCHAR) \
1077 arr.Add( token ); \
1078 WX_PG_TOKENIZER1_END() \
1079 variant = arr; \
1080 return true; \
1081 } \
1082 bool PROPNAME::OnEvent( wxPropertyGrid* propgrid, \
1083 wxWindow* primary, wxEvent& event ) \
1084 { \
1085 if ( event.GetEventType() == wxEVT_COMMAND_BUTTON_CLICKED ) \
1086 return OnButtonClick(propgrid,primary,(const wxChar*) CUSTBUTTXT); \
1087 return false; \
1088 }
1089
1090 #define WX_PG_DECLARE_ARRAYSTRING_PROPERTY(PROPNAME) \
1091 WX_PG_DECLARE_ARRAYSTRING_PROPERTY_WITH_VALIDATOR(PROPNAME)
1092
1093 #define WX_PG_DECLARE_ARRAYSTRING_PROPERTY_WITH_DECL(PROPNAME, DECL) \
1094 WX_PG_DECLARE_ARRAYSTRING_PROPERTY_WITH_VALIDATOR_WITH_DECL(PROPNAME, DECL)
1095
1096 #define WX_PG_IMPLEMENT_ARRAYSTRING_PROPERTY(PROPNAME,DELIMCHAR,CUSTBUTTXT) \
1097 WX_PG_IMPLEMENT_ARRAYSTRING_PROPERTY_WITH_VALIDATOR(PROPNAME, \
1098 DELIMCHAR, \
1099 CUSTBUTTXT) \
1100 wxValidator* PROPNAME::DoGetValidator () const \
1101 { return (wxValidator*) NULL; }
1102
1103
1104 // -----------------------------------------------------------------------
1105 // wxArrayEditorDialog
1106 // -----------------------------------------------------------------------
1107
1108 #include "wx/textctrl.h"
1109 #include "wx/button.h"
1110 #include "wx/listbox.h"
1111
1112 #define wxAEDIALOG_STYLE \
1113 (wxDEFAULT_DIALOG_STYLE | wxRESIZE_BORDER | wxOK | wxCANCEL | wxCENTRE)
1114
1115 class WXDLLIMPEXP_PROPGRID wxArrayEditorDialog : public wxDialog
1116 {
1117 public:
1118 wxArrayEditorDialog();
1119 virtual ~wxArrayEditorDialog() { }
1120
1121 void Init();
1122
1123 wxArrayEditorDialog( wxWindow *parent,
1124 const wxString& message,
1125 const wxString& caption,
1126 long style = wxAEDIALOG_STYLE,
1127 const wxPoint& pos = wxDefaultPosition,
1128 const wxSize& sz = wxDefaultSize );
1129
1130 bool Create( wxWindow *parent,
1131 const wxString& message,
1132 const wxString& caption,
1133 long style = wxAEDIALOG_STYLE,
1134 const wxPoint& pos = wxDefaultPosition,
1135 const wxSize& sz = wxDefaultSize );
1136
1137 /** Set value modified by dialog.
1138 */
1139 virtual void SetDialogValue( const wxVariant& WXUNUSED(value) )
1140 {
1141 wxFAIL_MSG(wxT("re-implement this member function in derived class"));
1142 }
1143
1144 /** Return value modified by dialog.
1145 */
1146 virtual wxVariant GetDialogValue() const
1147 {
1148 wxFAIL_MSG(wxT("re-implement this member function in derived class"));
1149 return wxVariant();
1150 }
1151
1152 /** Override to return wxValidator to be used with the wxTextCtrl
1153 in dialog. Note that the validator is used in the standard
1154 wx way, ie. it immediately prevents user from entering invalid
1155 input.
1156
1157 @remarks
1158 Dialog frees the validator.
1159 */
1160 virtual wxValidator* GetTextCtrlValidator() const
1161 {
1162 return (wxValidator*) NULL;
1163 }
1164
1165 // Returns true if array was actually modified
1166 bool IsModified() const { return m_modified; }
1167
1168 //const wxArrayString& GetStrings() const { return m_array; }
1169
1170 // implementation from now on
1171 void OnUpdateClick(wxCommandEvent& event);
1172 void OnAddClick(wxCommandEvent& event);
1173 void OnDeleteClick(wxCommandEvent& event);
1174 void OnListBoxClick(wxCommandEvent& event);
1175 void OnUpClick(wxCommandEvent& event);
1176 void OnDownClick(wxCommandEvent& event);
1177 //void OnCustomEditClick(wxCommandEvent& event);
1178 void OnIdle(wxIdleEvent& event);
1179
1180 protected:
1181 wxTextCtrl* m_edValue;
1182 wxListBox* m_lbStrings;
1183
1184 wxButton* m_butAdd; // Button pointers
1185 wxButton* m_butCustom; // required for disabling/enabling changing.
1186 wxButton* m_butUpdate;
1187 wxButton* m_butRemove;
1188 wxButton* m_butUp;
1189 wxButton* m_butDown;
1190
1191 //wxArrayString m_array;
1192
1193 const wxChar* m_custBtText;
1194 //wxArrayStringPropertyClass* m_pCallingClass;
1195
1196 bool m_modified;
1197
1198 unsigned char m_curFocus;
1199
1200 // These must be overridden - must return true on success.
1201 virtual wxString ArrayGet( size_t index ) = 0;
1202 virtual size_t ArrayGetCount() = 0;
1203 virtual bool ArrayInsert( const wxString& str, int index ) = 0;
1204 virtual bool ArraySet( size_t index, const wxString& str ) = 0;
1205 virtual void ArrayRemoveAt( int index ) = 0;
1206 virtual void ArraySwap( size_t first, size_t second ) = 0;
1207
1208 private:
1209 #ifndef SWIG
1210 DECLARE_DYNAMIC_CLASS_NO_COPY(wxArrayEditorDialog)
1211 DECLARE_EVENT_TABLE()
1212 #endif
1213 };
1214
1215 // -----------------------------------------------------------------------
1216 // wxPGArrayStringEditorDialog
1217 // -----------------------------------------------------------------------
1218
1219 class WXDLLIMPEXP_PROPGRID
1220 wxPGArrayStringEditorDialog : public wxArrayEditorDialog
1221 {
1222 public:
1223 wxPGArrayStringEditorDialog();
1224 virtual ~wxPGArrayStringEditorDialog() { }
1225
1226 void Init();
1227
1228 virtual void SetDialogValue( const wxVariant& value )
1229 {
1230 m_array = value.GetArrayString();
1231 }
1232
1233 virtual wxVariant GetDialogValue() const
1234 {
1235 return m_array;
1236 }
1237
1238 void SetCustomButton( const wxChar* custBtText, wxArrayStringProperty* pcc )
1239 {
1240 m_custBtText = custBtText;
1241 m_pCallingClass = pcc;
1242 }
1243
1244 void OnCustomEditClick(wxCommandEvent& event);
1245
1246 protected:
1247 wxArrayString m_array;
1248
1249 wxArrayStringProperty* m_pCallingClass;
1250
1251 virtual wxString ArrayGet( size_t index );
1252 virtual size_t ArrayGetCount();
1253 virtual bool ArrayInsert( const wxString& str, int index );
1254 virtual bool ArraySet( size_t index, const wxString& str );
1255 virtual void ArrayRemoveAt( int index );
1256 virtual void ArraySwap( size_t first, size_t second );
1257
1258 private:
1259 #ifndef SWIG
1260 DECLARE_DYNAMIC_CLASS_NO_COPY(wxPGArrayStringEditorDialog)
1261 DECLARE_EVENT_TABLE()
1262 #endif
1263 };
1264
1265 // -----------------------------------------------------------------------
1266
1267 #endif // wxUSE_PROPGRID
1268
1269 #endif // _WX_PROPGRID_PROPS_H_