diff --git a/interface/wx/propgrid/editors.h b/interface/wx/propgrid/editors.h index 4af9d0c3e3..d31e794116 100644 --- a/interface/wx/propgrid/editors.h +++ b/interface/wx/propgrid/editors.h @@ -136,12 +136,21 @@ public: Default implementation sets foreground colour, background colour, font, plus text for wxTextCtrl and wxComboCtrl. + @param pg + Property grid to which the edited property belongs. + + @param property + Edited property to which the editor control belongs. + + @param ctrl + Editor control. + @param appearance New appearance to be applied. @param oldAppearance - Previously applied appearance. Used to detect which control - attributes need to be changed (e.g. so we onlychange background + Previously applied appearance. Used to detect which control + attributes need to be changed (e.g. so we only change background colour if really needed). @param unspecified diff --git a/interface/wx/propgrid/manager.h b/interface/wx/propgrid/manager.h index a51ff229e9..6f60573bd3 100644 --- a/interface/wx/propgrid/manager.h +++ b/interface/wx/propgrid/manager.h @@ -27,7 +27,7 @@ wxPropertyGridPage receives events emitted by its wxPropertyGridManager, but only those events that are specific to that page. If wxPropertyGridPage:: - IsHandlingAllEvents returns false, then unhandled events are sent to the + IsHandlingAllEvents returns @false, then unhandled events are sent to the manager's parent, as usual. See @ref propgrid_event_handling "wxPropertyGrid Event Handling" @@ -223,7 +223,7 @@ public: /** The default constructor. The styles to be used are styles valid for the wxWindow. - @see @link wndflags Additional Window Styles @endlink + @see @ref propgrid_window_styles */ wxPropertyGridManager( wxWindow *parent, wxWindowID id = wxID_ANY, const wxPoint& pos = wxDefaultPosition, @@ -249,7 +249,7 @@ public: @param pageObj wxPropertyGridPage instance. Manager will take ownership of this - object. NULL indicates that a default page instance should be created. + object. @NULL indicates that a default page instance should be created. @return Returns pointer to created property grid page. @@ -431,7 +431,7 @@ public: bool IsPageModified( size_t index ) const; /** - Returns true if property is selected. Since selection is page + Returns @true if property is selected. Since selection is page based, this function checks every page in the manager. */ virtual bool IsPropertySelected( wxPGPropArg id ) const; @@ -538,7 +538,7 @@ public: Show or hide the property grid header control. It is hidden by the default. - @remarks Grid may look better if you use wxPG_NO_INTERNAL_BORDER + @remarks Grid may look better if you use ::wxPG_NO_INTERNAL_BORDER window style when showing a header. */ void ShowHeader(bool show = true); diff --git a/interface/wx/propgrid/property.h b/interface/wx/propgrid/property.h index 430b9f047f..ec87e71071 100644 --- a/interface/wx/propgrid/property.h +++ b/interface/wx/propgrid/property.h @@ -923,9 +923,9 @@ public: Text to be translated into variant. @param argFlags - If wxPG_FULL_VALUE is set, returns complete, storable value instead + If ::wxPG_FULL_VALUE is set, returns complete, storable value instead of displayable one (they may be different). - If wxPG_COMPOSITE_FRAGMENT is set, text is interpreted as a part of + If ::wxPG_COMPOSITE_FRAGMENT is set, text is interpreted as a part of composite property string value (as generated by ValueToString() called with this same flag). @@ -950,7 +950,7 @@ public: @param number Integer to be translated into variant. @param argFlags - If wxPG_FULL_VALUE is set, returns complete, storable value instead + If ::wxPG_FULL_VALUE is set, returns complete, storable value instead of displayable one. @return Returns @true if resulting wxVariant value was different. @@ -975,10 +975,10 @@ public: Value to be converted. @param argFlags If 0 (default value), then displayed string is returned. - If wxPG_FULL_VALUE is set, returns complete, storable string value - instead of displayable. If wxPG_EDITABLE_VALUE is set, returns + If ::wxPG_FULL_VALUE is set, returns complete, storable string value + instead of displayable. If ::wxPG_EDITABLE_VALUE is set, returns string value that must be editable in textctrl. - If wxPG_COMPOSITE_FRAGMENT is set, returns text that is appropriate to + If ::wxPG_COMPOSITE_FRAGMENT is set, returns text that is appropriate to display as a part of string property's composite text representation. @remarks Default implementation calls GenerateComposedValue(). @@ -992,12 +992,12 @@ public: @param text String to get the value from. @param flags - If @c wxPG_FULL_VALUE is set, the function sets complete, storable + If ::wxPG_FULL_VALUE is set, the function sets complete, storable value instead of displayable one (they may be different). - @c wxPG_PROGRAMMATIC_VALUE flag is used to indicate that value is + ::wxPG_PROGRAMMATIC_VALUE flag is used to indicate that value is being set programmatically (i.e. operation is not caused by user input). - If @c wxPG_REPORT_ERROR is set, a special action should be + If ::wxPG_REPORT_ERROR is set, a special action should be performed if string couldn't have been successfully converted to the valid value (e.g. a special value can be set in this case). @@ -1012,7 +1012,7 @@ public: @param value Int to get the value from. @param flags - If has wxPG_FULL_VALUE, then the value given is a actual value and not an index. + If has ::wxPG_FULL_VALUE, then the value given is a actual value and not an index. @return @true if value was changed. */ @@ -1029,7 +1029,7 @@ public: @remarks - Default behaviour is to return wxSize(0,0), which means no image. - Default image width or height is indicated with dimension -1. - - You can also return wxPG_DEFAULT_IMAGE_SIZE which equals wxDefaultSize. + - You can also return ::wxPG_DEFAULT_IMAGE_SIZE which equals wxDefaultSize. */ virtual wxSize OnMeasureImage( int item = -1 ) const; @@ -1161,7 +1161,7 @@ public: than row height). NOTE: Following applies when OnMeasureImage() returns a "flexible" height ( - using wxPG_FLEXIBLE_SIZE(W,H) macro), which implies variable height items: + using @c wxPG_FLEXIBLE_SIZE(W,H) macro), which implies variable height items: If (rect.x+rect.width) is < 0, then this is a measure item call, which means that dc is invalid and only thing that should be done is to set paintdata.m_drawnHeight to the height of the image of item at index @@ -1295,7 +1295,7 @@ public: Adds a private child property. If you use this instead of wxPropertyGridInterface::Insert() or wxPropertyGridInterface::AppendIn(), then property's parental - type will automatically be set up to wxPG_PROP_AGGREGATE. In other + type will automatically be set up to ::wxPG_PROP_AGGREGATE. In other words, all properties of this property will become private. */ void AddPrivateChild( wxPGProperty* prop ); @@ -1340,7 +1340,8 @@ public: @remarks Setting a property flag never has any side-effect, and is intended almost exclusively for internal use. So, for example, if you want to disable a property, call - Enable(false) instead of setting wxPG_PROP_DISABLED flag. + @code Enable(false) @endcode instead of setting + ::wxPG_PROP_DISABLED flag. @see HasFlag(), GetFlags() */ @@ -1596,6 +1597,9 @@ public: /** Returns (direct) child property with given name (or @NULL if not found). + + @param name + Name of the child property to look for. */ wxPGProperty* GetPropertyByName( const wxString& name ) const; @@ -1617,10 +1621,10 @@ public: @param argFlags If 0 (default value), then displayed string is returned. - If wxPG_FULL_VALUE is set, returns complete, storable string value - instead of displayable. If wxPG_EDITABLE_VALUE is set, returns + If ::wxPG_FULL_VALUE is set, returns complete, storable string value + instead of displayable. If ::wxPG_EDITABLE_VALUE is set, returns string value that must be editable in textctrl. If - wxPG_COMPOSITE_FRAGMENT is set, returns text that is appropriate to + ::wxPG_COMPOSITE_FRAGMENT is set, returns text that is appropriate to display as a part of string property's composite text representation. @@ -1688,7 +1692,8 @@ public: @true for hide, @false for reveal. @param flags - By default changes are applied recursively. Set this parameter wxPG_DONT_RECURSE to prevent this. + By default changes are applied recursively. Set this parameter to + ::wxPG_DONT_RECURSE to prevent this. */ bool Hide( bool hide, int flags = wxPG_RECURSE ); @@ -1759,7 +1764,7 @@ public: bool IsSomeParent( wxPGProperty* candidateParent ) const; /** - Returns true if property has editable wxTextCtrl when selected. + Returns @true if property has editable wxTextCtrl when selected. @remarks Although disabled properties do not displayed editor, they still return @true here as being disabled is considered a temporary @@ -1774,12 +1779,12 @@ public: bool IsValueUnspecified() const; /** - Returns true if all parents expanded. + Returns @true if all parents expanded. */ bool IsVisible() const; /** - Returns child property at index i. + Returns child property at index @a i. */ wxPGProperty* Item( unsigned int i ) const; @@ -1790,7 +1795,7 @@ public: /** If property's editor is created this forces its recreation. - Useful in SetAttribute etc. Returns true if actually did anything. + Useful in SetAttribute etc. Returns @true if actually did anything. */ bool RecreateEditor(); @@ -1834,7 +1839,7 @@ public: Background colour to use. @param flags - Default is wxPG_RECURSE which causes colour to be set recursively. + Default is ::wxPG_RECURSE which causes colour to be set recursively. Omit this flag to only set colour for the property in question and not any of its children. @@ -1962,9 +1967,9 @@ public: Changes what sort of parent this property is for its children. @param flag - Use one of the following values: wxPG_PROP_MISC_PARENT (for generic - parents), wxPG_PROP_CATEGORY (for categories), or - wxPG_PROP_AGGREGATE (for derived property classes with private + Use one of the following values: ::wxPG_PROP_MISC_PARENT (for generic + parents), ::wxPG_PROP_CATEGORY (for categories), or + ::wxPG_PROP_AGGREGATE (for derived property classes with private children). @remarks You generally do not need to call this function. @@ -1978,7 +1983,7 @@ public: Text colour to use. @param flags - Default is wxPG_RECURSE which causes colour to be set recursively. + Default is ::wxPG_RECURSE which causes colour to be set recursively. Omit this flag to only set colour for the property in question and not any of its children. @@ -1993,7 +1998,7 @@ public: Sets property's default text and background colours. @param flags - Default is wxPG_RECURSE which causes colours to be set recursively. + Default is ::wxPG_RECURSE which causes colours to be set recursively. Omit this flag to only set colours for the property in question and not any of its children. @@ -2023,7 +2028,7 @@ public: Pointer to list variant that contains child values. Used to indicate which children should be marked as modified. Usually you just use @NULL. @param flags - wxPG_SETVAL_REFRESH_EDITOR is set by default, to refresh editor + ::wxPG_SETVAL_REFRESH_EDITOR is set by default, to refresh editor and redraw properties. */ void SetValue( wxVariant value, wxVariant* pList = NULL, @@ -2065,7 +2070,7 @@ public: wxPGProperty* UpdateParentValues(); /** - Returns @true if containing grid uses wxPG_EX_AUTO_UNSPECIFIED_VALUES. + Returns @true if containing grid uses ::wxPG_EX_AUTO_UNSPECIFIED_VALUES. */ bool UsesAutoUnspecified() const; @@ -2116,6 +2121,9 @@ protected: /** Clear cells associated with property. + @param ignoreWithFlags + Cells will not be cleared for properties having these flags set. + @param recursively If @true, apply this operation recursively in child properties. */ @@ -2129,11 +2137,14 @@ protected: /** Returns (direct) child property with given name (or @NULL if not found), with hint index. + @param name + Name of the child property to look for. + @param hintIndex - Start looking for the child at this index. + Start looking for the child at this index. @remarks - Does not support scope (i.e. Parent.Child notation). + Does not support scope (i.e. Parent.Child notation). */ wxPGProperty* GetPropertyByNameWH( const wxString& name, unsigned int hintIndex ) const; @@ -2147,7 +2158,7 @@ protected: void Empty(); /** - Returns true if child property is selected. + Returns @true if child property is selected. */ bool IsChildSelected( bool recursive = false ) const; }; @@ -2219,6 +2230,24 @@ public: Returns @true if rendered something in the foreground (text or bitmap). + @param dc + wxDC to paint on. + + @param rect + Box reserved for drawing. + + @param propertyGrid + Property grid in which property is displayed. + + @param property + Property to be rendered. + + @param column + Property cell column. + + @param item + Index of chosen item if combo popup is drawn, -1 otherwise. + @param flags See @ref pgcellrenderer_render_flags "list of render flags". */ @@ -2261,14 +2290,25 @@ public: wxPGProperty* property, const wxPGEditor* editor ) const; - /** Utility to render cell bitmap and set text colour plus bg brush + /** + Utility to render cell bitmap and set text colour plus bg brush colour. + @param dc + wxDC to paint on. + + @param rect + Box reserved for drawing. + + @param cell + Cell information. + @param flags See @ref pgcellrenderer_render_flags "list of render flags". - @return Returns image width, which, for instance, can be passed to - DrawText. + @return + Returns image width, which, for instance, can be passed to + DrawText(). */ int PreDrawCell( wxDC& dc, const wxRect& rect, @@ -2279,6 +2319,15 @@ public: Utility to be called after drawing is done, to revert whatever changes PreDrawCell() did. + @param dc + wxDC which was used to paint on. + + @param propGrid + Property grid to which the cell belongs. + + @param cell + Cell information. + @param flags Same as those passed to PreDrawCell(). See @ref pgcellrenderer_render_flags "list of render flags". @@ -2307,6 +2356,24 @@ public: Returns @true if rendered something in the foreground (text or bitmap. + @param dc + wxDC to paint on. + + @param rect + Box reserved for drawing. + + @param propertyGrid + Property grid in which property is displayed. + + @param property + Property to be rendered. + + @param column + Property cell column. + + @param item + Index of chosen item if combo popup is drawn, -1 otherwise. + @param flags See @ref pgcellrenderer_render_flags "list of render flags". */ @@ -2352,7 +2419,7 @@ protected: wxColour m_bgCol; wxFont m_font; - /** True if m_text is valid and specified. + /** @true if m_text is valid and specified. */ bool m_hasValidText; }; @@ -2696,7 +2763,7 @@ public: /** Returns array of values matching the given strings. Unmatching strings - result in wxPG_INVALID_VALUE entry in array. + result in ::wxPG_INVALID_VALUE entry in array. */ wxArrayInt GetValuesForStrings( const wxArrayString& strings ) const; diff --git a/interface/wx/propgrid/propgrid.h b/interface/wx/propgrid/propgrid.h index 0d64106b6b..a3650155af 100644 --- a/interface/wx/propgrid/propgrid.h +++ b/interface/wx/propgrid/propgrid.h @@ -582,7 +582,7 @@ public: void AddActionTrigger( int action, int keycode, int modifiers = 0 ); /** - Adds given property into selection. If wxPG_EX_MULTIPLE_SELECTION + Adds given property into selection. If ::wxPG_EX_MULTIPLE_SELECTION extra style is not used, then this has same effect as calling SelectProperty(). @@ -591,7 +591,7 @@ public: add category to selection, and also if you have category selected, you cannot add other properties to selection. This member function will fail silently in these cases, - even returning true. + even returning @true. */ bool AddToSelection( wxPGPropArg id ); @@ -600,7 +600,7 @@ public: wxGetTranslation() for following strings: wxEnumProperty list labels, wxFlagsProperty child property labels. - Default is false. + Default is @false. */ static void AutoGetTranslation( bool enable ); @@ -624,7 +624,7 @@ public: SetPropertyValue() if you need the value to run through validation process, and also send the property change event. - @return Returns true if value was successfully changed. + @return Returns @true if value was successfully changed. */ bool ChangePropertyValue( wxPGPropArg id, wxVariant newValue ); @@ -633,7 +633,7 @@ public: @param enableAutoResizing If @true, automatic column resizing is enabled (only applicable - if window style wxPG_SPLITTER_AUTO_CENTER is used). + if window style ::wxPG_SPLITTER_AUTO_CENTER is used). */ void CenterSplitter( bool enableAutoResizing = false ); @@ -687,7 +687,7 @@ public: enable. @remarks This functions deselects selected property, if any. Validation - failure option wxPG_VFB_STAY_IN_PROPERTY is not respected, i.e. + failure option ::wxPG_VFB_STAY_IN_PROPERTY is not respected, i.e. selection is cleared even if editor had invalid value. */ bool EnableCategories( bool enable ); @@ -716,7 +716,7 @@ public: @return Minimum size for the grid to still display everything. - @remarks Does not work well with wxPG_SPLITTER_AUTO_CENTER window style. + @remarks Does not work well with ::wxPG_SPLITTER_AUTO_CENTER window style. This function only works properly if grid size prior to call was already fairly large. @@ -918,7 +918,7 @@ public: wxPropertyGridHitTestResult HitTest( const wxPoint& pt ) const; /** - Returns true if any property has been modified by the user. + Returns @true if any property has been modified by the user. */ bool IsAnyModified() const; @@ -928,7 +928,7 @@ public: bool IsEditorFocused() const; /** - Returns true if updating is frozen (i.e. Freeze() called but not + Returns @true if updating is frozen (i.e. Freeze() called but not yet Thaw() ). */ bool IsFrozen() const; @@ -997,7 +997,7 @@ public: @param enableAutoResizing If @true, automatic column resizing is enabled (only applicable - if window style wxPG_SPLITTER_AUTO_CENTER is used). + if window style ::wxPG_SPLITTER_AUTO_CENTER is used). @see wxPropertyGridInterface::SetColumnProportion() */ @@ -1011,7 +1011,7 @@ public: /** Selects a property. Editor widget is automatically created, but - not focused unless focus is true. + not focused unless focus is @true. @param id Property to select (name or pointer). @@ -1231,10 +1231,15 @@ public: virtual wxStatusBar* GetStatusBar(); /** Override to customize property validation failure behaviour. + + @param + property Property with entered an invalid value + @param invalidValue Value which failed in validation. + @return - Return true if user is allowed to change to another property even + Return @true if user is allowed to change to another property even if current has invalid value. */ virtual bool DoOnValidationFailure( wxPGProperty* property, @@ -1242,7 +1247,7 @@ public: /** Override to customize resetting of property validation failure status. @remarks - Property is guaranteed to have flag wxPG_PROP_INVALID_VALUE set. + Property is guaranteed to have flag ::wxPG_PROP_INVALID_VALUE set. */ virtual void DoOnValidationFailureReset( wxPGProperty* property ); @@ -1283,7 +1288,7 @@ public: wxVariant GetUncommittedPropertyValue(); /** - Returns true if editor's value was marked modified. + Returns @true if editor's value was marked modified. */ bool IsEditorsValueModified() const; @@ -1294,7 +1299,7 @@ public: /** Call this from wxPGProperty::OnEvent() to cause property value to be - changed after the function returns (with true as return value). + changed after the function returns (with @true as return value). ValueChangeInEvent() must be used if you wish the application to be able to use wxEVT_PG_CHANGING to potentially veto the given value. */ @@ -1307,7 +1312,7 @@ public: if was value was changed using wxPGProperty::SetValueInEvent(), which is usually used when a 'picker' dialog is displayed. If value was written by "normal means" in wxPGProperty::StringToValue() or - IntToValue(), then this function will return false (on the other hand, + IntToValue(), then this function will return @false (on the other hand, wxPGProperty::OnEvent() is not even called in those cases). */ bool WasValueChangedInEvent() const; @@ -1339,7 +1344,7 @@ public: ~wxPropertyGridEvent(); /** - Returns true if you can veto the action that the event is signaling. + Returns @true if you can veto the action that the event is signaling. */ bool CanVeto() const; @@ -1419,14 +1424,14 @@ public: /** Sets custom failure message for this time only. Only applies if - wxPG_VFB_SHOW_MESSAGE is set in validation failure flags. + ::wxPG_VFB_SHOW_MESSAGE is set in validation failure flags. */ void SetValidationFailureMessage( const wxString& message ); /** Call this from your event handler to veto action that the event is signaling. You can only veto a shutdown if wxPropertyGridEvent::CanVeto() - returns true. + returns @true. @remarks Currently only @c wxEVT_PG_CHANGING supports vetoing. */ @@ -1479,8 +1484,21 @@ public: /** Appends a new property under bottommost parent. + @param propClass - Property class as string. + Property class as string. + + @param propLabel + Property label. + + @param propName + Property name. + + @param propValue + Property value. + + @param pChoices + Set of choices for the property (optional). */ wxPGProperty* Add( const wxString& propClass, const wxString& propLabel, @@ -1498,9 +1516,16 @@ public: /** Adds attribute to the bottommost property. + + @param name + Attribute name. + @param type - Allowed values: "string", (same as string), "int", "bool". Empty string - mean autodetect. + Allowed values: @c "string", (same as string), @c "int", @c "bool". + Empty string means autodetect. + + @param value + Attribute value. */ bool AddAttribute( const wxString& name, const wxString& type, diff --git a/interface/wx/propgrid/propgriddefs.h b/interface/wx/propgrid/propgriddefs.h index bc4cda7210..c475c39542 100644 --- a/interface/wx/propgrid/propgriddefs.h +++ b/interface/wx/propgrid/propgriddefs.h @@ -24,17 +24,17 @@ /** If property is supposed to have custom-painted image, then returning - this in OnMeasureImage() will usually be enough. + this in wxPGProperty::OnMeasureImage() will usually be enough. */ -#define wxPG_DEFAULT_IMAGE_SIZE wxSize(-1, -1) +#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 p1 is - after p2. So, for instance, when comparing property names, you can use + 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 @@ -52,8 +52,9 @@ typedef int (*wxPGSortCallback)(wxPropertyGrid* propGrid, // ----------------------------------------------------------------------- -// Used to indicate wxPGChoices::Add etc that the value is actually not given -// by the caller. +/** Used to indicate wxPGChoices::Add() etc that the value is actually not given + by the caller. +*/ #define wxPG_INVALID_VALUE INT_MAX // -----------------------------------------------------------------------