[Git][wxwidgets/wxwidgets][master] 5 commits: Improve wxAuiManager managed window documentation

4 views
Skip to first unread message

Vadim Zeitlin (@_VZ_)

unread,
Jun 11, 2025, 12:17:05 PMJun 11
to wx-commi...@googlegroups.com

Vadim Zeitlin pushed to branch master at wxWidgets / wxWidgets

Commits:

  • f2736755
    by Vadim Zeitlin at 2025-06-09T23:43:40+02:00
    Improve wxAuiManager managed window documentation
    
    Don't say that this window must be a wxFrame.
    
    Mention that event handlers for this window should call Skip().
    
  • d5f57e7d
    by Vadim Zeitlin at 2025-06-10T02:20:51+02:00
    Remove documentation for no longer existing wxUsleep()
    
    This function was removed back in 5e2da5a (Get rid of v2.8 code,
    2022-08-01) but the documentation wasn't updated -- do it now.
    
    Closes #25506.
    
  • 0d5f3d11
    by Vadim Zeitlin at 2025-06-10T16:28:51+02:00
    Add comment explaining wxGridEvent::GetNewXXX() functions
    
    Explicitly mention that GetNewRow() intentionally returns m_col and not
    m_row.
    
    See #25512.
    
  • b4949c62
    by Vadim Zeitlin at 2025-06-11T18:11:57+02:00
    Document wxPGSplitterPositionFlags
    
    This enum should be present in the interface header as it is used as the
    parameter type of DoSetSplitter().
    
    Closes #25513.
    
  • 66bd59a9
    by Vadim Zeitlin at 2025-06-11T18:12:01+02:00
    Document that wxPGSelectPropertyFlags was added in 3.3.0
    
    Do it if only for consistency with wxPGSplitterPositionFlags.
    

4 changed files:

Changes:

  • include/wx/generic/grid.h
    ... ... @@ -3289,8 +3289,13 @@ public:
    3289 3289
     
    
    3290 3290
         int GetRow() const { return m_row; }
    
    3291 3291
         int GetCol() const { return m_col; }
    
    3292
    +
    
    3293
    +    // Note that GetNewRow() intentionally returns m_col, which is used for the
    
    3294
    +    // new row for wxEVT_GRID_ROW_MOVE events because m_row is used for the row
    
    3295
    +    // being moved. And similarly for GetNewCol().
    
    3292 3296
         int GetNewRow() const { return m_col; }
    
    3293 3297
         int GetNewCol() const { return m_row; }
    
    3298
    +
    
    3294 3299
         wxPoint GetPosition() const { return wxPoint( m_x, m_y ); }
    
    3295 3300
         bool Selecting() const { return m_selecting; }
    
    3296 3301
     
    

  • interface/wx/aui/framemanager.h
    ... ... @@ -71,7 +71,7 @@ enum wxAuiManagerOption
    71 71
     
    
    72 72
         wxAuiManager is the central class of the wxAUI class framework.
    
    73 73
     
    
    74
    -    wxAuiManager manages the panes associated with it for a particular wxFrame,
    
    74
    +    wxAuiManager manages the panes associated with it for a particular window,
    
    75 75
         using a pane's wxAuiPaneInfo information to determine each pane's docking
    
    76 76
         and floating behaviour.
    
    77 77
     
    
    ... ... @@ -87,18 +87,18 @@ enum wxAuiManagerOption
    87 87
         flicker, by modifying more than one pane at a time, and then "committing"
    
    88 88
         all of the changes at once by calling Update().
    
    89 89
     
    
    90
    -    Panes can be added quite easily:
    
    90
    +    Panes can be added using AddPane():
    
    91 91
     
    
    92 92
         @code
    
    93
    -    wxTextCtrl* text1 = new wxTextCtrl(this, -1);
    
    94
    -    wxTextCtrl* text2 = new wxTextCtrl(this, -1);
    
    93
    +    wxTextCtrl* text1 = new wxTextCtrl(this, wxID_ANY);
    
    94
    +    wxTextCtrl* text2 = new wxTextCtrl(this, wxID_ANY);
    
    95 95
         m_mgr.AddPane(text1, wxLEFT, "Pane Caption");
    
    96 96
         m_mgr.AddPane(text2, wxBOTTOM, "Pane Caption");
    
    97 97
         m_mgr.Update();
    
    98 98
         @endcode
    
    99 99
     
    
    100
    -    Later on, the positions can be modified easily. The following will float
    
    101
    -    an existing pane in a tool window:
    
    100
    +    Later on, the positions and other attributes can be modified, e.g. the
    
    101
    +    following will float an existing pane in a tool window:
    
    102 102
     
    
    103 103
         @code
    
    104 104
         m_mgr.GetPane(text1).Float();
    
    ... ... @@ -197,13 +197,14 @@ public:
    197 197
         /**
    
    198 198
             Constructor.
    
    199 199
     
    
    200
    -        @param managed_wnd
    
    201
    -            Specifies the wxFrame which should be managed.
    
    200
    +        @param managedWindow
    
    201
    +            Specifies the window which will contain AUI panes. If it is not
    
    202
    +            specified here, it must be set later using SetManagedWindow().
    
    202 203
             @param flags
    
    203 204
                 Specifies the frame management behaviour and visual effects
    
    204 205
                 with the ::wxAuiManagerOption's style flags.
    
    205 206
         */
    
    206
    -    wxAuiManager(wxWindow* managed_wnd = nullptr,
    
    207
    +    wxAuiManager(wxWindow* managedWindow = nullptr,
    
    207 208
                      unsigned int flags = wxAUI_MGR_DEFAULT);
    
    208 209
     
    
    209 210
         /**
    
    ... ... @@ -543,11 +544,17 @@ public:
    543 544
         void SetFlags(unsigned int flags);
    
    544 545
     
    
    545 546
         /**
    
    546
    -        Called to specify the frame or window which is to be managed by wxAuiManager.
    
    547
    -        Frame management is not restricted to just frames.  Child windows or custom
    
    548
    -        controls are also allowed.
    
    547
    +        Set the window which is to be managed by wxAuiManager.
    
    548
    +
    
    549
    +        This window will often be a wxFrame but an arbitrary child window can
    
    550
    +        also be used.
    
    551
    +
    
    552
    +        Note that wxAuiManager handles many events for the managed window,
    
    553
    +        including ::wxEVT_SIZE, so any application-defined handlers for this
    
    554
    +        window should take care to call wxEvent::Skip() to let wxAuiManager
    
    555
    +        perform its own processing.
    
    549 556
         */
    
    550
    -    void SetManagedWindow(wxWindow* managed_wnd);
    
    557
    +    void SetManagedWindow(wxWindow* managedWindow);
    
    551 558
     
    
    552 559
         /**
    
    553 560
             This function is used to show a hint window at the specified rectangle.
    

  • interface/wx/propgrid/propgridpagestate.h
    ... ... @@ -10,6 +10,8 @@
    10 10
     
    
    11 11
         Values of this enum are used with wxPropertyGrid::CommitChangesFromEditor(),
    
    12 12
         for example.
    
    13
    +
    
    14
    +    @since 3.3.0
    
    13 15
      */
    
    14 16
     enum class wxPGSelectPropertyFlags : int
    
    15 17
     {
    
    ... ... @@ -65,6 +67,30 @@ enum class wxPGSelectPropertyFlags : int
    65 67
         NoRefresh     = 0x0100
    
    66 68
     };
    
    67 69
     
    
    70
    +/**
    
    71
    +    Flags for wxPropertyGridPageState::DoSetSplitter().
    
    72
    +
    
    73
    +    @since 3.3.0
    
    74
    +*/
    
    75
    +enum class wxPGSplitterPositionFlags : int
    
    76
    +{
    
    77
    +    /// No special flags.
    
    78
    +    Null           = 0,
    
    79
    +    /// Refresh the grid after setting splitter position.
    
    80
    +    Refresh        = 0x0001,
    
    81
    +    /// Set splitter position for all pages.
    
    82
    +    AllPages       = 0x0002,
    
    83
    +
    
    84
    +    /*
    
    85
    +        These are intentionally not documented as it seems that they are only
    
    86
    +        used internally.
    
    87
    +
    
    88
    +    FromEvent      = 0x0004,
    
    89
    +    FromAutoCenter = 0x0008
    
    90
    +
    
    91
    +     */
    
    92
    +};
    
    93
    +
    
    68 94
     /**
    
    69 95
         @section propgrid_hittestresult wxPropertyGridHitTestResult
    
    70 96
     
    

  • interface/wx/utils.h
    ... ... @@ -1541,18 +1541,6 @@ wxString wxNow();
    1541 1541
     */
    
    1542 1542
     void wxSleep(int secs);
    
    1543 1543
     
    
    1544
    -/**
    
    1545
    -    @deprecated This function is deprecated because its name is misleading:
    
    1546
    -                notice that the argument is in milliseconds, not microseconds.
    
    1547
    -                Please use either wxMilliSleep() or wxMicroSleep() depending on
    
    1548
    -                the resolution you need.
    
    1549
    -
    
    1550
    -    Sleeps for the specified number of milliseconds.
    
    1551
    -
    
    1552
    -    @header{wx/utils.h}
    
    1553
    -*/
    
    1554
    -void wxUsleep(unsigned long milliseconds);
    
    1555
    -
    
    1556 1544
     ///@}
    
    1557 1545
     
    
    1558 1546
     
    

Reply all
Reply to author
Forward
0 new messages