84
84
// for "configure" scripts under unix, use them.
85
85
#define wxPROPGRID_MAJOR 1
86
86
#define wxPROPGRID_MINOR 4
87
- #define wxPROPGRID_RELEASE 12
87
+ #define wxPROPGRID_RELEASE 14
88
88
89
89
// For non-Unix systems (i.e. when building without a configure script),
90
90
// users of this component can use the following macro to check if the
@@ -454,6 +454,7 @@ class wxPGVariantAndBool
454
454
// -----------------------------------------------------------------------
455
455
456
456
#ifndef SWIG
457
+
457
458
class WXDLLIMPEXP_PG wxPGEditor;
458
459
class WXDLLIMPEXP_PG wxPGProperty;
459
460
class WXDLLIMPEXP_PG wxPropertyCategory;
@@ -469,9 +470,11 @@ class WXDLLIMPEXP_PG wxPGOwnerDrawnComboBox;
469
470
class WXDLLIMPEXP_PG wxPGCustomComboControl;
470
471
class WXDLLIMPEXP_PG wxPGEditorDialogAdapter;
471
472
473
+ class WXDLLIMPEXP_FWD_CORE wxStatusBar;
474
+
472
475
extern WXDLLIMPEXP_PG const wxChar *wxPropertyGridNameStr;
473
476
474
- struct wxPGValidationInfo ;
477
+ struct WXDLLIMPEXP_PG wxPGValidationInfo;
475
478
476
479
#endif // #ifndef SWIG
477
480
@@ -2251,8 +2254,22 @@ class WXDLLIMPEXP_PG wxPGProperty : public wxObject
2251
2254
virtual wxPGVariantAndBool PyValidateValue ( const wxVariant& value, wxPGValidationInfo& validationInfo ) const ;
2252
2255
virtual wxPGVariantAndBool PyStringToValue ( const wxString& text, int argFlags = 0 ) const ;
2253
2256
virtual wxPGVariantAndBool PyIntToValue ( int number, int argFlags = 0 ) const ;
2257
+ virtual wxVariant PyChildChanged ( wxVariant& thisValue, int childIndex, wxVariant& childValue ) const ;
2254
2258
#endif
2255
2259
2260
+ void ActualChildChanged ( wxVariant& thisValue, int childIndex, wxVariant& childValue ) const
2261
+ {
2262
+ #ifdef __WXPYTHON__
2263
+ if ( m_scriptObject )
2264
+ {
2265
+ thisValue = PyChildChanged (thisValue, childIndex, childValue);
2266
+ return ;
2267
+ }
2268
+ #endif
2269
+
2270
+ ChildChanged (thisValue, childIndex, childValue);
2271
+ }
2272
+
2256
2273
bool ActualValidateValue ( wxVariant& value, wxPGValidationInfo& validationInfo ) const
2257
2274
{
2258
2275
#ifdef __WXPYTHON__
@@ -2852,7 +2869,7 @@ class WXDLLIMPEXP_PG wxPGProperty : public wxObject
2852
2869
@param flags
2853
2870
By default changes are applied recursively. Set this paramter wxPG_DONT_RECURSE to prevent this.
2854
2871
*/
2855
- inline bool Hide ( bool hide, int flags = wxPG_RECURSE );
2872
+ bool Hide ( bool hide, int flags = wxPG_RECURSE );
2856
2873
2857
2874
bool IsExpanded () const { return (!(m_flags & wxPG_PROP_COLLAPSED) && GetChildCount ()); }
2858
2875
@@ -4303,10 +4320,26 @@ wxPG_VFB_BEEP = 0x02,
4303
4320
*/
4304
4321
wxPG_VFB_MARK_CELL = 0x04 ,
4305
4322
4306
- /* * Display customizable text message explaining the situation.
4323
+ /* * Display a customizable text message explaining the situation.
4324
+
4325
+ To customize the way the message is displayed, you need to
4326
+ reimplement wxPropertyGrid::DoShowPropertyError() in a
4327
+ derived class. Default behavior is to display the text on
4328
+ the top-level frame's status bar, if present, and otherwise
4329
+ using wxMessageBox.
4307
4330
*/
4308
4331
wxPG_VFB_SHOW_MESSAGE = 0x08 ,
4309
4332
4333
+ /* * Similar to wxPG_VFB_SHOW_MESSAGE, except always display the
4334
+ message using wxMessageBox.
4335
+ */
4336
+ wxPG_VFB_SHOW_MESSAGEBOX = 0x10 ,
4337
+
4338
+ /* * Similar to wxPG_VFB_SHOW_MESSAGE, except always display the
4339
+ message on the status bar.
4340
+ */
4341
+ wxPG_VFB_SHOW_MESSAGE_ON_STATUSBAR = 0x20 ,
4342
+
4310
4343
/* * Defaults. */
4311
4344
wxPG_VFB_DEFAULT = wxPG_VFB_STAY_IN_PROPERTY|wxPG_VFB_BEEP,
4312
4345
@@ -4327,7 +4360,7 @@ wxPG_VFB_UNDEFINED = 0x80
4327
4360
Used to convey validation information to and from functions that
4328
4361
actually perform validation.
4329
4362
*/
4330
- struct wxPGValidationInfo
4363
+ struct WXDLLIMPEXP_PG wxPGValidationInfo
4331
4364
{
4332
4365
/* * Value to be validated.
4333
4366
*/
@@ -4341,6 +4374,19 @@ struct wxPGValidationInfo
4341
4374
*/
4342
4375
wxPGVFBFlags m_failureBehavior;
4343
4376
4377
+ /* * @true when validation is failing. */
4378
+ bool m_isFailing;
4379
+
4380
+ wxPGValidationInfo ()
4381
+ {
4382
+ m_failureBehavior = 0 ;
4383
+ m_isFailing = false ;
4384
+ }
4385
+
4386
+ ~wxPGValidationInfo ()
4387
+ {
4388
+ }
4389
+
4344
4390
wxPGVFBFlags GetFailureBehavior () const { return m_failureBehavior; }
4345
4391
4346
4392
void SetFailureBehavior (wxPGVFBFlags failureBehavior) { m_failureBehavior = failureBehavior; }
@@ -7576,6 +7622,38 @@ class WXDLLIMPEXP_PG wxPropertyGrid : public wxScrolledWindow, public wxProperty
7576
7622
void SetInternalFlag ( long flag ) { m_iFlags |= flag; }
7577
7623
void ClearInternalFlag ( long flag ) { m_iFlags &= ~(flag); }
7578
7624
7625
+ /* *
7626
+ Override in derived class to display error messages in custom manner
7627
+ (these message usually only result from validation failure).
7628
+
7629
+ @remarks If you implement this, then you also need to implement
7630
+ DoHidePropertyError() - possibly to do nothing, if error
7631
+ does not need hiding (e.g. it was logged or shown in a
7632
+ message box).
7633
+
7634
+ @see DoHidePropertyError()
7635
+ */
7636
+ virtual void DoShowPropertyError ( wxPGProperty* property,
7637
+ const wxString& msg );
7638
+
7639
+ /* *
7640
+ Override in derived class to hide an error displayed by
7641
+ DoShowPropertyError().
7642
+
7643
+ @see DoShowPropertyError()
7644
+ */
7645
+ virtual void DoHidePropertyError ( wxPGProperty* property );
7646
+
7647
+ #if wxUSE_STATUSBAR
7648
+ /* *
7649
+ Return wxStatusBar that is used by this wxPropertyGrid. You can
7650
+ reimplement this member function in derived class to override
7651
+ the default behavior of using the top-level wxFrame's status
7652
+ bar, if any.
7653
+ */
7654
+ virtual wxStatusBar* GetStatusBar ();
7655
+ #endif
7656
+
7579
7657
#ifndef SWIG
7580
7658
7581
7659
/* * Generates contents for string dst based on the convetents of wxArrayString
@@ -7674,11 +7752,6 @@ class WXDLLIMPEXP_PG wxPropertyGrid : public wxScrolledWindow, public wxProperty
7674
7752
m_validationInfo.m_failureMessage .clear ();
7675
7753
}
7676
7754
7677
- /* * Override in derived class to display error messages in custom manner
7678
- (these message usually only result from validation failure).
7679
- */
7680
- virtual void DoShowPropertyError ( wxPGProperty* property, const wxString& msg );
7681
-
7682
7755
/* * Override to customize property validation failure behavior.
7683
7756
@param invalidValue
7684
7757
Value which failed in validation.
@@ -7905,6 +7978,9 @@ class WXDLLIMPEXP_PG wxPropertyGrid : public wxScrolledWindow, public wxProperty
7905
7978
/* * 1 if in DoSelectProperty() */
7906
7979
bool m_inDoSelectProperty;
7907
7980
7981
+ /* * @true if in OnValidationFailure() */
7982
+ bool m_inOnValidationFailure;
7983
+
7908
7984
wxPGVFBFlags m_permanentValidationFailureBehavior; // Set by app
7909
7985
7910
7986
/* * Internal flags - see wxPG_FL_XXX constants. */
0 commit comments