Kirix Support Forums

Call for testing

Please post all general questions, comments, bug reports, and any other wxAUI feedback here.

Call for testing

Postby Ben on Tue Nov 14, 2006 7:32 am

Hi all,

wxWidgets 2.8.0 RC1 has just been released. wxAUI 0.9.3 RC1 is bundled with this release.

wxAUI has undergone a lot of changes recently. We performed a large class rename, prepping for the first stable release of wxAUI with wxWidgets. In addition, we've added wxAuiNotebook and the wxAuiMDI family of classes. Many other minor features have been implemented, and many bugs and crashes have been fixed as well.

Because this is the first release of the bundled wxAUI with a stable version of wxWidgets, we want to make sure that we solve as many outstanding bugs as possible. So if you have some extra time, please download wxWidgets 2.8.0 RC1 and make sure that your application is working well with the included version wxAUI. To my knowledge, there are only about two weeks left before the final version of wxWidgets 2.8.0 is released.

Thanks much,
Ben
User avatar
Ben
Kirix Support Team
 
Posts: 522
Joined: Mon Dec 19, 2005 6:29 am

Postby Antoine on Tue Nov 14, 2006 5:37 pm

Hi Ben,

Good work!

The problem I reported in my post 'toolbar not fully repainted' has gone.

The ones I reported in my post 'problem with docking' are still there (unless they are features).

In order to reproduce #1, just modify auidemo.cpp and add a few 'PaneBorder(false)' to paneInfo. You will see that Panes without PaneBorder have no transparent hints anymore.

Problem #2 is still there. This is very annoying from user's perspective. He gets a window, starts to play with frames and to arrange them the way he likes, and very soon discovers that he is unable to reach back previous states (without apparent logic). This is exactly the way I discovered it, and I finally reduce it to 3 panes in order to reproduce it.

Also, I noticed odd behaviour when I didn't create a Pane with CenterPane() default settings. Is a CenterPane mandatory? Here is what I saw: if you create a unique Pane (LeftPane for instance), then as soon as you resize the window, the Pane disappears... If you create 2 Panes (a left and a right). This seems to be OK (even if you close one just after).

I also think your Notebook shall call SetSelection(idx) in the InsertPage method, even when select is false, provided this is the first page. In other words m_curpage shall not be -1 if there is at least one page in the notebook. I started to write some MDI/docview extension based on AuiNotebook last week (quick and dirty as I discovered wxWidget last week, and I just want to check if I can do what I want quickly) and I was surprised to receive PAGE_CHANGE events with old_page=-1, even when the notebook had several pages.

I also observed a strange behaviour, when I tried to create the center pane with CaptionVisible(true). This was a notebook. The notebook was empty and the caption visible, but as soon as I inserted a page the caption disapeared even if I didn't ask for that. I did not really make further tests. The demo shows that a notebook can have a caption. So maybe it is related to the fact it was the center pane.

Best regards,

Antoine

Still MSW, mingw, gcc 3.4.5.
Antoine
Registered User
 
Posts: 7
Joined: Mon Nov 06, 2006 6:16 pm
Location: Paris - France

Postby Antoine on Tue Nov 14, 2006 5:57 pm

Another one:

1- start auidemo
2- select 'all panes': the center pane will be divided in 2 parts, low part being a notebook.
3- Resize the demo window to make it as big as possible
4- Observe the thin (1 pixel) bottom line of the frame around the notebook: you will see it is one pixel too high

I'm not quite sure but it might be true for every Panes. It can be easily seen on the tree pane on the left. Just play a little bit with the window size, and you will see a one pixel high line that is not repainted just below the bottom line of the frame.

Antoine.

Added note: it seems to depend on how many pixel you have for the height of the whole center pane. Probably a rounding problem, when distributing the height to the 2 parts.
Last edited by Antoine on Tue Nov 14, 2006 6:17 pm, edited 1 time in total.
Antoine
Registered User
 
Posts: 7
Joined: Mon Nov 06, 2006 6:16 pm
Location: Paris - France

Postby Antoine on Tue Nov 14, 2006 6:06 pm

And yet another one:

1- Start auidemo
2- Show 'all panes'
3- Make the demo window bigger
4- Take the grip on the right of the left tree pane and drag it near the center of the window: the tree pane will take half of the window, and the remaining ones will be compressed on the right part of the window.
5- Take the bottom right corner of the window and shrink the window to the left so that its width is less than the width of the tree pane. Play a little bit with window's width.

You will see that the tree pane is not correctly redisplayed. At some point, parts of the panes that are docked on the right is displayed, thought they should not be visible.

And even if you extend the window back on the right so that all panes are fully visible, the tree pane is not fully repainted (and still holds some garbage drawing coming from the panes docked on the right).

Best regards,

Antoine

(MSW, mingw, g++ 3.4.5)
Antoine
Registered User
 
Posts: 7
Joined: Mon Nov 06, 2006 6:16 pm
Location: Paris - France

Tested it

Postby djetter on Tue Nov 14, 2006 8:20 pm

Ben,

Sorry for not responding to the previous post I made. Anyway, I have downloaded 2.8.0 and tested it. First, there seems to be some problems with the main wxwidgets library in this version, when compiling on Windows. I had to rename 'setup0.h' to 'setup.h' in the msw include directory. Then, I received a bunch of warnings from microsoft visual C++ 6.0 of type 4018 and 4284, that I did not receive before. It may have something to do with the fact that I'm using STL classes (e.g. vector, list, etc.)

Anyway, on to AUI. As far as wxAuiNotebook goes, I like the new look of the tabs, and the fact that I could put the close button on each tab. It would be nice if the button would change when you hover the mouse over it, but that's not a big deal. I overrode the close button like so:

BEGIN_EVENT_TABLE(MainWindow, wxFrame)
EVT_AUINOTEBOOK_PAGE_CLOSE(wxID_ANY, MainWindow::OnNotebookPageClose)
END_EVENT_TABLE()

void MainWindow::OnNotebookPageClose(wxAuiNotebookEvent& evt)
{
evt.Veto();
size_t page = m_notebook->GetSelection();
wxWindow *window = m_notebook->GetPage(page);
window->Hide();
m_notebook->RemovePage(page);
m_mgr.Update();
}

That seemed to give the desired behavior of simply hiding windows, instead of closing them, which was what I wanted. Awesome!

However, here is one problem that seems to be in both the new version and old version of AUI: How do I get the rectangle of a control in a floating panel? For instance, let's say I have this:

wxTextCtrl *m_textCtrl = new wxTextCtrl(this, wxID_ANY, wxT(""), wxPoint(0,0), wxSize(600, 200), wxTE_READONLY | wxNO_BORDER | wxTE_MULTILINE);

m_mgr.AddPane(m_textCtrl, wxAuiPaneInfo().Name(wxT("StatusPane")).Caption(wxT("Status")).Bottom().Layer(1).Position(1));

When the pane is docked, all I have to do to get the rectangle of the text control is this:

m_textCtrl->GetRect()

However, when the pane is floating, the x and y of that rectangle become 0. So, how can I get the rectangle of m_textCtrl when the pane is floating? I want to check if the point of a mouse click is inside that rectangle or not. Thanks,

-----Drew
djetter
Registered User
 
Posts: 5
Joined: Sat Oct 28, 2006 2:33 pm
Location: Albuquerque, NM

Postby Ben on Wed Nov 15, 2006 12:51 am

Hi Drew,

Easy. The reason that the coordinates start at (0,0) is that the pane is now located inside of a floating frame. Pane positions are reported in client coordinates, so this is correct.

To find out if a mouse is in your window, the following code will work for docked and undocked panes.

Code: Select all
wxPoint mouse_pt = ::wxGetMousePosition();
wxAuiPaneInfo& info = m_mgr.GetPane("mypane");
wxRect rect = info.window->GetClientRect();
info.window->ClientToScreen(&rect.x, &rect.y);
if (rect.Contains(mouse_pt))
{
    // inside
}


Caution, I just typed that in without testing it, but it should work.

Best,
Ben
User avatar
Ben
Kirix Support Team
 
Posts: 522
Joined: Mon Dec 19, 2005 6:29 am

Return to wxAUI Questions, Thoughts & Feedback