]> git.saurik.com Git - wxWidgets.git/blob - interface/wx/propgrid/propgridiface.h
add command line options for displaying the test name and time taken by them (closes...
[wxWidgets.git] / interface / wx / propgrid / propgridiface.h
1 /////////////////////////////////////////////////////////////////////////////
2 // Name: property.h
3 // Purpose: interface of wxPGProperty
4 // Author: wxWidgets team
5 // RCS-ID: $Id$
6 // Licence: wxWindows license
7 /////////////////////////////////////////////////////////////////////////////
8
9 // -----------------------------------------------------------------------
10
11 /**
12 @class wxPropertyGridInterface
13
14 Most of the shared property manipulation interface shared by wxPropertyGrid,
15 wxPropertyGridPage, and wxPropertyGridManager is defined in this class.
16
17 @remarks
18 - In separate wxPropertyGrid component this class was known as
19 wxPropertyContainerMethods.
20
21 - wxPropertyGridInterface's property operation member functions all accept
22 a special wxPGPropArg id argument, using which you can refer to properties
23 either by their pointer (for performance) or by their name (for conveniency).
24
25 @library{wxpropgrid}
26 @category{propgrid}
27 */
28 class WXDLLIMPEXP_PROPGRID wxPropertyGridInterface
29 {
30 public:
31
32 /** Destructor */
33 virtual ~wxPropertyGridInterface() { }
34
35 /**
36 Appends property to the list. wxPropertyGrid assumes ownership of the
37 object. Becomes child of most recently added category.
38
39 @remarks
40 - wxPropertyGrid takes the ownership of the property pointer.
41 - If appending a category with name identical to a category already in
42 the wxPropertyGrid, then newly created category is deleted, and most
43 recently added category (under which properties are appended) is set
44 to the one with same name. This allows easier adding of items to same
45 categories in multiple passes.
46 - Does not automatically redraw the control, so you may need to call
47 Refresh() when calling this function after control has been shown for
48 the first time.
49 */
50 wxPGProperty* Append( wxPGProperty* property );
51
52 /**
53 Same as Append(), but appends under given parent property.
54
55 @param id
56 Name or pointer to parent property.
57
58 @param newProperty
59 Property to be added.
60 */
61 wxPGProperty* AppendIn( wxPGPropArg id, wxPGProperty* newProperty );
62
63 /**
64 In order to add new items into a property with private children (for
65 instance, wxFlagsProperty), you need to call this method.
66 After populating has been finished, you need to call EndAddChildren().
67
68 @see EndAddChildren()
69 */
70 void BeginAddChildren( wxPGPropArg id );
71
72 /**
73 Deletes all properties.
74 */
75 virtual void Clear() = 0;
76
77 /**
78 Deselect current selection, if any.
79
80 @return Returns @true if success (ie. validator did not intercept).
81 */
82 bool ClearSelection();
83
84 /**
85 Resets modified status of all properties.
86 */
87 void ClearModifiedStatus();
88
89 /**
90 Collapses given category or property with children.
91
92 @return Returns @true if actually collapsed.
93 */
94 bool Collapse( wxPGPropArg id );
95
96 /**
97 Collapses all items that can be collapsed.
98
99 @return Returns @false if failed (may fail if value in active
100 editor cannot be validated).
101 */
102 bool CollapseAll();
103
104 /**
105 Changes value of a property, as if by user. Use this instead of
106 SetPropertyValue() if you need the value to run through validation
107 process, and also send the property change event.
108
109 @return Returns @true if value was successfully changed.
110 */
111 bool ChangePropertyValue( wxPGPropArg id, wxVariant newValue );
112
113 /**
114 Deletes a property.
115 */
116 void DeleteProperty( wxPGPropArg id );
117
118 /**
119 Disables a property.
120 */
121 bool DisableProperty( wxPGPropArg id );
122
123 /**
124 Returns @true if all property grid data changes have been committed. Usually
125 only returns @false if value in active editor has been invalidated by a
126 wxValidator.
127 */
128 bool EditorValidate();
129
130 /**
131 Enables or disables property.
132
133 @param id
134 Name or pointer to a property.
135 @param enable
136 If @false, property is disabled instead.
137 */
138 bool EnableProperty( wxPGPropArg id, bool enable = true );
139
140 /**
141 Called after population of property with fixed children has finished.
142
143 @see BeginAddChildren()
144 */
145 void EndAddChildren( wxPGPropArg id );
146
147 /**
148 Expands given category or property with children.
149
150 @return Returns @true if actually expanded.
151 */
152 bool Expand( wxPGPropArg id );
153
154 /**
155 Expands all items that can be expanded.
156 */
157 bool ExpandAll( bool expand = true );
158
159 /**
160 Returns id of first child of given property.
161
162 @remarks Does not return private children!
163 */
164 wxPGProperty* GetFirstChild( wxPGPropArg id );
165
166 //@{
167 /**
168 Returns iterator class instance.
169
170 @param flags
171 See @ref propgrid_iterator_flags. Value wxPG_ITERATE_DEFAULT causes
172 iteration over everything except private child properties.
173 @param firstProp
174 Property to start iteration from. If @NULL, then first child of root
175 is used.
176
177 @beginWxPythonOnly
178 <b>wxPython Note:</b> Instead of ++ operator, use Next() method, and
179 instead of * operator, use GetProperty() method.
180 @endWxPythonOnly
181 */
182 wxPropertyGridIterator GetIterator( int flags = wxPG_ITERATE_DEFAULT,
183 wxPGProperty* firstProp = NULL );
184 wxPropertyGridConstIterator GetIterator( int flags = wxPG_ITERATE_DEFAULT,
185 wxPGProperty* firstProp = NULL ) const;
186 //@}
187
188 //@{
189 /**
190 Returns iterator class instance.
191
192 @param flags
193 See @ref propgrid_iterator_flags. Value wxPG_ITERATE_DEFAULT causes
194 iteration over everything except private child properties.
195 @param startPos
196 Either wxTOP or wxBOTTOM. wxTOP will indicate that iterations start
197 from the first property from the top, and wxBOTTOM means that the
198 iteration will instead begin from bottommost valid item.
199
200 @beginWxPythonOnly
201 <b>wxPython Note:</b> Instead of ++ operator, use Next() method, and
202 instead of * operator, use GetProperty() method.
203 @endWxPythonOnly
204 */
205 wxPropertyGridIterator GetIterator( int flags, int startPos );
206 wxPropertyGridConstIterator GetIterator( int flags, int startPos ) const;
207 //@}
208
209 /**
210 Returns id of first item that matches given criteria.
211
212 @param flags
213 See @ref propgrid_iterator_flags.
214 */
215 wxPGProperty* GetFirst( int flags = wxPG_ITERATE_ALL );
216
217 /**
218 Returns id of property with given name (case-sensitive).
219 */
220 wxPGProperty* GetProperty( const wxString& name ) const;
221
222 /**
223 Adds to 'targetArr' pointers to properties that have given flags 'flags' set.
224 However, if @a 'inverse' is set to @true, then only properties without
225 given flags are stored.
226
227 @param targetArr
228 @todo docme
229 @param flags
230 Property flags to use.
231 @param inverse
232 @todo docme
233 @param iterFlags
234 Iterator flags to use. Default is everything expect private children.
235 See @ref propgrid_iterator_flags.
236 */
237 void GetPropertiesWithFlag( wxArrayPGProperty* targetArr,
238 wxPGProperty::FlagType flags,
239 bool inverse = false,
240 int iterFlags = (wxPG_ITERATE_PROPERTIES|wxPG_ITERATE_HIDDEN|wxPG_ITERATE_CATEGORIES) ) const;
241
242 /**
243 Returns value of given attribute. If none found, returns wxNullVariant.
244 */
245 wxVariant GetPropertyAttribute( wxPGPropArg id, const wxString& attrName ) const;
246
247 /**
248 Returns background colour of first cell of a property.
249 */
250 wxColour GetPropertyBackgroundColour( wxPGPropArg id ) const;
251
252 /**
253 Returns pointer of property's nearest parent category. If no category
254 found, returns @NULL.
255 */
256 wxPropertyCategory* GetPropertyCategory( wxPGPropArg id ) const;
257
258 /** Returns client data (void*) of a property. */
259 void* GetPropertyClientData( wxPGPropArg id ) const;
260
261 /**
262 Returns first property which label matches given string. @NULL if none
263 found. Note that this operation is very slow when compared to
264 GetPropertyByName().
265 */
266 wxPGProperty* GetPropertyByLabel( const wxString& label ) const;
267
268 /**
269 Returns property with given name. @NULL if none found.
270 */
271 wxPGProperty* GetPropertyByName( const wxString& name ) const;
272
273 /**
274 Returns child property 'subname' of property 'name'. Same as
275 calling GetPropertyByName("name.subname"), albeit slightly faster.
276 */
277 wxPGProperty* GetPropertyByName( const wxString& name,
278 const wxString& subname ) const;
279
280 /**
281 Returns property's editor.
282 */
283 const wxPGEditor* GetPropertyEditor( wxPGPropArg id ) const;
284
285 /**
286 Returns help string associated with a property.
287 */
288 wxString GetPropertyHelpString( wxPGPropArg id ) const;
289
290 /**
291 Returns property's custom value image (@NULL of none).
292 */
293 wxBitmap* GetPropertyImage( wxPGPropArg id ) const;
294
295 /** Returns label of a property. */
296 const wxString& GetPropertyLabel( wxPGPropArg id );
297
298 /** Returns property's name, by which it is globally accessible. */
299 wxString GetPropertyName( wxPGProperty* property );
300
301 /**
302 Returns text colour of first cell of a property.
303 */
304 wxColour GetPropertyTextColour( wxPGPropArg id ) const;
305
306 /**
307 Returns validator of a property as a reference, which you
308 can pass to any number of SetPropertyValidator.
309 */
310 wxValidator* GetPropertyValidator( wxPGPropArg id );
311
312 /**
313 Returns property's value as wxVariant.
314
315 If property value is unspecified, Null variant is returned.
316 */
317 wxVariant GetPropertyValue( wxPGPropArg id );
318
319 /** Return's property's value as wxArrayInt. */
320 wxArrayInt GetPropertyValueAsArrayInt( wxPGPropArg id ) const;
321
322 /** Returns property's value as wxArrayString. */
323 wxArrayString GetPropertyValueAsArrayString( wxPGPropArg id ) const;
324
325 /** Returns property's value as bool */
326 bool GetPropertyValueAsBool( wxPGPropArg id ) const;
327
328 /** Return's property's value as wxDateTime. */
329 wxDateTime GetPropertyValueAsDateTime( wxPGPropArg id ) const;
330
331 /** Returns property's value as double-precision floating point number. */
332 double GetPropertyValueAsDouble( wxPGPropArg id ) const;
333
334 /** Returns property's value as integer */
335 int GetPropertyValueAsInt( wxPGPropArg id ) const;
336
337 /** Returns property's value as integer */
338 long GetPropertyValueAsLong( wxPGPropArg id ) const;
339
340 /** Returns property's value as native signed 64-bit integer. */
341 wxLongLong_t GetPropertyValueAsLongLong( wxPGPropArg id ) const;
342
343 /**
344 Returns property's value as wxString. If property does not
345 use string value type, then its value is converted using
346 wxPGProperty::GetValueAsString().
347 */
348 wxString GetPropertyValueAsString( wxPGPropArg id ) const;
349
350 /** Returns property's value as unsigned integer */
351 unsigned long GetPropertyValueAsULong( wxPGPropArg id ) const;
352
353 /** Returns property's value as native unsigned 64-bit integer. */
354 wxULongLong_t GetPropertyValueAsULongLong( wxPGPropArg id ) const;
355
356 /**
357 Returns a wxVariant list containing wxVariant versions of all
358 property values. Order is not guaranteed.
359
360 @param listname
361 @todo docme
362 @param baseparent
363 @todo docme
364 @param flags
365 Use wxPG_KEEP_STRUCTURE to retain category structure; each sub
366 category will be its own wxVariantList of wxVariant.
367
368 Use wxPG_INC_ATTRIBUTES to include property attributes as well.
369 Each attribute will be stored as list variant named
370 "@@<propname>@@attr."
371 */
372 wxVariant GetPropertyValues( const wxString& listname = wxEmptyString,
373 wxPGProperty* baseparent = NULL, long flags = 0 ) const;
374
375 /** Returns currently selected property. */
376 wxPGProperty* GetSelection() const;
377
378 /**
379 Similar to GetIterator(), but instead returns wxPGVIterator instance,
380 which can be useful for forward-iterating through arbitrary property
381 containers.
382
383 @param flags
384 See @ref propgrid_iterator_flags.
385
386 <b>wxPython Note:</b> Instead of ++ operator, use Next() method, and
387 instead of * operator, use GetProperty() method.
388 */
389 virtual wxPGVIterator GetVIterator( int flags ) const;
390
391 /**
392 Hides or reveals a property.
393
394 @param id
395 @todo docme
396 @param hide
397 If @true, hides property, otherwise reveals it.
398 @param flags
399 By default changes are applied recursively. Set this parameter
400 wxPG_DONT_RECURSE to prevent this.
401 */
402 bool HideProperty( wxPGPropArg id, bool hide = true, int flags = wxPG_RECURSE );
403
404 /**
405 Initializes *all* property types. Causes references to most object
406 files in the library, so calling this may cause significant increase
407 in executable size when linking with static library.
408 */
409 static void InitAllTypeHandlers();
410
411 /**
412 Inserts property to the property container.
413
414 @param priorThis
415 New property is inserted just prior to this. Available only
416 in the first variant. There are two versions of this function
417 to allow this parameter to be either an id or name to
418 a property.
419 @param newProperty
420 Pointer to the inserted property. wxPropertyGrid will take
421 ownership of this object.
422
423 @return Returns newProperty.
424
425 @remarks
426
427 - wxPropertyGrid takes the ownership of the property pointer.
428
429 - While Append may be faster way to add items, make note that when
430 both types of data storage (categoric and
431 non-categoric) are active, Insert becomes even more slow. This is
432 especially true if current mode is non-categoric.
433
434 Example of use:
435
436 @code
437
438 // append category
439 wxPGProperty* my_cat_id = propertygrid->Append( new wxPropertyCategory("My Category") );
440
441 ...
442
443 // insert into category - using second variant
444 wxPGProperty* my_item_id_1 = propertygrid->Insert( my_cat_id, 0, new wxStringProperty("My String 1") );
445
446 // insert before to first item - using first variant
447 wxPGProperty* my_item_id_2 = propertygrid->Insert( my_item_id, new wxStringProperty("My String 2") );
448
449 @endcode
450 */
451 wxPGProperty* Insert( wxPGPropArg priorThis, wxPGProperty* newProperty );
452
453 /**
454 Inserts property to the property container.
455 See the other overload for more details.
456
457 @param parent
458 New property is inserted under this category. Available only
459 in the second variant. There are two versions of this function
460 to allow this parameter to be either an id or name to
461 a property.
462 @param index
463 Index under category. Available only in the second variant.
464 If index is < 0, property is appended in category.
465 @param newProperty
466 Pointer to the inserted property. wxPropertyGrid will take
467 ownership of this object.
468
469 @return Returns newProperty.
470 */
471 wxPGProperty* Insert( wxPGPropArg parent, int index, wxPGProperty* newProperty );
472
473 /** Returns @true if property is a category. */
474 bool IsPropertyCategory( wxPGPropArg id ) const;
475
476 /** Returns @true if property is enabled. */
477 bool IsPropertyEnabled( wxPGPropArg id ) const;
478
479 /**
480 Returns @true if given property is expanded. Naturally, always returns
481 @false for properties that cannot be expanded.
482 */
483 bool IsPropertyExpanded( wxPGPropArg id ) const;
484
485 /**
486 Returns @true if property has been modified after value set or modify
487 flag clear by software.
488 */
489 bool IsPropertyModified( wxPGPropArg id ) const;
490
491 /**
492 Returns @true if property is shown (ie. HideProperty() with @true not
493 called for it).
494 */
495 bool IsPropertyShown( wxPGPropArg id ) const;
496
497 /**
498 Returns @true if property value is set to unspecified.
499 */
500 bool IsPropertyValueUnspecified( wxPGPropArg id ) const;
501
502 /**
503 Disables (limit = @true) or enables (limit = @false) wxTextCtrl editor
504 of a property, if it is not the sole mean to edit the value.
505 */
506 void LimitPropertyEditing( wxPGPropArg id, bool limit = true );
507
508 /**
509 Initializes additional property editors (SpinCtrl etc.). Causes
510 references to most object files in the library, so calling this may
511 cause significant increase in executable size when linking with static
512 library.
513 */
514 static void RegisterAdditionalEditors();
515
516 /**
517 Replaces property with id with newly created one. For example,
518 this code replaces existing property named "Flags" with one that
519 will have different set of items:
520
521 @code
522 pg->ReplaceProperty("Flags",
523 wxFlagsProperty("Flags", wxPG_LABEL, newItems))
524 @endcode
525
526 @see Insert()
527 */
528 wxPGProperty* ReplaceProperty( wxPGPropArg id, wxPGProperty* property );
529
530 /**
531 @anchor propgridinterface_editablestate_flags
532
533 Flags for wxPropertyGridInterface::SaveEditableState() and
534 wxPropertyGridInterface::RestoreEditableState().
535 */
536 enum EditableStateFlags
537 {
538 /** Include selected property. */
539 SelectionState = 0x01,
540 /** Include expanded/collapsed property information. */
541 ExpandedState = 0x02,
542 /** Include scrolled position. */
543 ScrollPosState = 0x04,
544 /** Include selected page information. Only applies to
545 wxPropertyGridManager. */
546 PageState = 0x08,
547 /** Include splitter position. Stored for each page. */
548 SplitterPosState = 0x10,
549 /** Include description box size.
550 Only applies to wxPropertyGridManager. */
551 DescBoxState = 0x20,
552
553 /**
554 Include all supported user editable state information.
555 This is usually the default value. */
556 AllStates = SelectionState |
557 ExpandedState |
558 ScrollPosState |
559 PageState |
560 SplitterPosState |
561 DescBoxState
562 };
563
564 /**
565 Restores user-editable state. See also wxPropertyGridInterface::SaveEditableState().
566
567 @param src
568 String generated by SaveEditableState.
569
570 @param restoreStates
571 Which parts to restore from source string. See @ref propgridinterface_editablestate_flags
572 "list of editable state flags".
573
574 @return Returns @false if there was problem reading the string.
575
576 @remarks If some parts of state (such as scrolled or splitter position)
577 fail to restore correctly, please make sure that you call this
578 function after wxPropertyGrid size has been set (this may
579 sometimes be tricky when sizers are used).
580 */
581 bool RestoreEditableState( const wxString& src,
582 int restoreStates = AllStates );
583
584 /**
585 Used to acquire user-editable state (selected property, expanded
586 properties, scrolled position, splitter positions).
587
588 @param includedStates
589 Which parts of state to include. See @ref propgridinterface_editablestate_flags
590 "list of editable state flags".
591 */
592 wxString SaveEditableState( int includedStates = AllStates ) const;
593
594 /**
595 Sets strings listed in the choice dropdown of a wxBoolProperty.
596
597 Defaults are "True" and "False", so changing them to, say, "Yes" and
598 "No" may be useful in some less technical applications.
599 */
600 static void SetBoolChoices( const wxString& trueChoice,
601 const wxString& falseChoice );
602
603 /**
604 Sets an attribute for this property.
605
606 @param id
607 @todo docme
608 @param attrName
609 Text identifier of attribute. See @ref propgrid_property_attributes.
610 @param value
611 Value of attribute.
612 @param argFlags
613 Optional.
614 Use wxPG_RECURSE to set the attribute to child properties recursively.
615
616 @remarks Setting attribute's value to Null variant will simply remove it
617 from property's set of attributes.
618 */
619 void SetPropertyAttribute( wxPGPropArg id, const wxString& attrName,
620 wxVariant value, long argFlags = 0 );
621
622 /**
623 Sets property attribute for all applicapple properties.
624 Be sure to use this method only after all properties have been
625 added to the grid.
626 */
627 void SetPropertyAttributeAll( const wxString& attrName, wxVariant value );
628
629 /**
630 Sets background colour of a property.
631
632 @param id
633 Property name or pointer.
634
635 @param colour
636 New background colour.
637
638 @param recursively
639 If True, child properties are affected recursively. Property
640 categories are skipped if this flag is used.
641 */
642 void SetPropertyBackgroundColour( wxPGPropArg id,
643 const wxColour& colour,
644 bool recursively = true );
645
646 /**
647 Sets text, bitmap, and colours for given column's cell.
648
649 @remarks
650 - You can set label cell by using column 0.
651 - You can use wxPG_LABEL as text to use default text for column.
652 */
653 void SetPropertyCell( wxPGPropArg id,
654 int column,
655 const wxString& text = wxEmptyString,
656 const wxBitmap& bitmap = wxNullBitmap,
657 const wxColour& fgCol = wxNullColour,
658 const wxColour& bgCol = wxNullColour );
659
660 /**
661 Sets client data (void*) of a property.
662
663 @remarks
664 This untyped client data has to be deleted manually.
665 */
666 void SetPropertyClientData( wxPGPropArg id, void* clientData );
667
668 /**
669 Resets text and background colours of given property.
670 */
671 void SetPropertyColoursToDefault( wxPGPropArg id );
672
673 /**
674 Sets editor for a property.
675
676 @param id
677 @todo docme
678 @param editor
679 For builtin editors, use wxPGEditor_X, where X is builtin editor's
680 name (TextCtrl, Choice, etc. see wxPGEditor documentation for full
681 list).
682
683 For custom editors, use pointer you received from wxPropertyGrid::RegisterEditorClass().
684 */
685 void SetPropertyEditor( wxPGPropArg id, const wxPGEditor* editor );
686
687 /**
688 Sets editor control of a property. As editor argument, use
689 editor name string, such as "TextCtrl" or "Choice".
690 */
691 void SetPropertyEditor( wxPGPropArg id, const wxString& editorName );
692
693 /**
694 Sets label of a property.
695
696 @remarks
697 - Properties under same parent may have same labels. However,
698 property names must still remain unique.
699 */
700 void SetPropertyLabel( wxPGPropArg id, const wxString& newproplabel );
701
702 /**
703 Sets name of a property.
704
705 @param id
706 Name or pointer of property which name to change.
707
708 @param newName
709 New name for property.
710 */
711 void SetPropertyName( wxPGPropArg id, const wxString& newName );
712
713 /**
714 Sets property (and, recursively, its children) to have read-only value.
715 In other words, user cannot change the value in the editor, but they can
716 still copy it.
717
718 @remarks This is mainly for use with textctrl editor. Only some other
719 editors fully support it.
720
721 @param id
722 Property name or pointer.
723
724 @param set
725 Use @true to enable read-only, @false to disable it.
726
727 @param flags
728 By default changes are applied recursively. Set this parameter
729 wxPG_DONT_RECURSE to prevent this.
730 */
731 void SetPropertyReadOnly( wxPGPropArg id, bool set = true,
732 int flags = wxPG_RECURSE );
733
734 /**
735 Sets property's value to unspecified. If it has children (it may be
736 category), then the same thing is done to them.
737 */
738 void SetPropertyValueUnspecified( wxPGPropArg id );
739
740 /**
741 Sets various property values from a list of wxVariants. If property with
742 name is missing from the grid, new property is created under given
743 default category (or root if omitted).
744 */
745 void SetPropertyValues( const wxVariantList& list,
746 wxPGPropArg defaultCategory = wxNullProperty );
747
748 void SetPropertyValues( const wxVariant& list,
749 wxPGPropArg defaultCategory = wxNullProperty );
750
751 /**
752 Associates the help string with property.
753
754 @remarks By default, text is shown either in the manager's "description"
755 text box or in the status bar. If extra window style
756 wxPG_EX_HELP_AS_TOOLTIPS is used, then the text will appear as
757 a tooltip.
758 */
759 void SetPropertyHelpString( wxPGPropArg id, const wxString& helpString );
760
761 /**
762 Set wxBitmap in front of the value.
763
764 @remarks Bitmap will be scaled to a size returned by
765 wxPropertyGrid::GetImageSize();
766 */
767 void SetPropertyImage( wxPGPropArg id, wxBitmap& bmp );
768
769 /**
770 Sets max length of property's text.
771 */
772 bool SetPropertyMaxLength( wxPGPropArg id, int maxLen );
773
774
775 /**
776 Sets text colour of a property.
777
778 @param id
779 Property name or pointer.
780
781 @param colour
782 New background colour.
783
784 @param recursively
785 If True, child properties are affected recursively. Property
786 categories are skipped if this flag is used.
787 */
788 void SetPropertyTextColour( wxPGPropArg id,
789 const wxColour& col,
790 bool recursively = true );
791
792 /**
793 Sets validator of a property.
794 */
795 void SetPropertyValidator( wxPGPropArg id, const wxValidator& validator );
796
797 /** Sets value (integer) of a property. */
798 void SetPropertyValue( wxPGPropArg id, long value );
799
800 /** Sets value (integer) of a property. */
801 void SetPropertyValue( wxPGPropArg id, int value );
802
803 /** Sets value (floating point) of a property. */
804 void SetPropertyValue( wxPGPropArg id, double value );
805
806 /** Sets value (bool) of a property. */
807 void SetPropertyValue( wxPGPropArg id, bool value );
808
809 /** Sets value (string) of a property. */
810 void SetPropertyValue( wxPGPropArg id, const wxString& value );
811
812 /** Sets value (wxArrayString) of a property. */
813 void SetPropertyValue( wxPGPropArg id, const wxArrayString& value );
814
815 /** Sets value (wxDateTime) of a property. */
816 void SetPropertyValue( wxPGPropArg id, const wxDateTime& value );
817
818 /** Sets value (wxObject*) of a property. */
819 void SetPropertyValue( wxPGPropArg id, wxObject* value );
820
821 /** Sets value (wxObject&) of a property. */
822 void SetPropertyValue( wxPGPropArg id, wxObject& value );
823
824 /** Sets value (native 64-bit int) of a property. */
825 void SetPropertyValue( wxPGPropArg id, wxLongLong_t value );
826
827 /** Sets value (native 64-bit unsigned int) of a property. */
828 void SetPropertyValue( wxPGPropArg id, wxULongLong_t value );
829
830 /** Sets value (wxArrayInt&) of a property. */
831 void SetPropertyValue( wxPGPropArg id, const wxArrayInt& value );
832
833 /**
834 Sets value (wxString) of a property.
835
836 @remarks This method uses wxPGProperty::SetValueFromString(), which all
837 properties should implement. This means that there should not be
838 a type error, and instead the string is converted to property's
839 actual value type.
840 */
841 void SetPropertyValueString( wxPGPropArg id, const wxString& value );
842
843 /**
844 Sets value (wxVariant&) of a property.
845
846 @remarks Use wxPropertyGrid::ChangePropertyValue() instead if you need to
847 run through validation process and send property change event.
848 */
849 void SetPropertyValue( wxPGPropArg id, wxVariant value );
850
851 /**
852 Adjusts how wxPropertyGrid behaves when invalid value is entered
853 in a property.
854
855 @param vfbFlags
856 See @ref propgrid_vfbflags for possible values.
857 */
858 void SetValidationFailureBehavior( int vfbFlags );
859
860 /**
861 Returns editor pointer of editor with given name;
862 */
863 static wxPGEditor* GetEditorByName( const wxString& editorName );
864 };
865