Discussion:
Feature request for wxAUI (implementation enclosed)
Marco DeFreitas
2014-03-13 02:02:36 UTC
Permalink
INTRODUCTION

Currently, wxAUI floating panes are always "floating" over the parent
frame. The assumption is that these panes are transient, such as a tool
palette. However, in a complicated application, there might be panes that
contain non-transient information that the user might want shown for long
periods of time, such as a realtime plot (continuously plotting data) or a
variable display page. The fact that these panes are always on top of the
parent makes it cumbersome to manage windows, especially on small screens
such as on a laptop. It would be nice if the wxAUI system allowed for
non-transient panes, that is, panes that can be below the main frame if the
main frame is "clicked". The default, of course, should be that panes are
"transient", thus not breaking any old code.

I made some minor changes to wxWidgets-3.0.0 code to allow this to happen
and was hoping it could be reviewed and integrated into the official code
base.

IMPLEMENTATION OVERVIEW

The wxAUI system uses a wxMiniFrame, which hard-codes in the
wxFRAME_FLOAT_ON_PARENT style. I modified it so it does not hard-code it,
but allows the user to specify whether to "float" on the parent or not,
based on the passed in style. I set the default style so that it would
float by default, insuring backward compatability.

The next step was to add in a new "transient" attribute to wxAuiPaneInfo.
The user can call a wxAuiPaneInfo::Transient(bool) member function to
specify whether the pane is transient or not. The attribute default is
true, to ensure backward comaptability.

In wxAuiManager, the transparent hint window is specified with a
wxFRAME_FLOAT_ON_PARENT style. I removed this style on the hint window
since it is not needed (the hint exists only while dragging a floating
pane, and can not be obscured by anything else) and the hint window can
obscure a non-transient dragged pane if the style remained. Also, after
creating the hint window, I "raised" the dragged window if it is
non-transient, just to be sure it is above the hint window.

The constructor for wxAuiFloatingFrame hard-codes in the style
wxFRAME_FLOAT_ON_FRAME. I removed this so it can float or not based on the
attributes of the passed in wxAuiPaneInfo parameter. Again, the
wxAuiPaneInfo has the transient attribute set to true by default, so it
should still have backward compatibility.

Finally, I modified the auidemo.cpp sample program to test a non-transient
window. Under the "View" pulldown menu is an item named "Create
Non-Transient Pane".

I tested this on GTK and Windows. The following files were modified:
include/wx/aui/floatpane.h
include/wx/aui/framemanager.h
include/wx/gtk/minifram.h
include/wx/msw/minifram.h
samples/aui/auidemo.cpp
src/aui/floatpane.cpp
src/aui/framemanager.cpp
src/gtk/minifram.cpp


I uploaded the diff patches to these 8 files.

Please take a look (should this be posted to the trac website?).
Thanks!
Marco
--
Please read http://www.wxwidgets.org/support/mlhowto.htm before posting.

To unsubscribe, send email to wx-users+***@googlegroups.com
or visit http://groups.google.com/group/wx-users
Vadim Zeitlin
2014-03-13 13:01:18 UTC
Permalink
On Wed, 12 Mar 2014 19:02:36 -0700 (PDT) Marco DeFreitas wrote:

MD> It would be nice if the wxAUI system allowed for non-transient panes,
MD> that is, panes that can be below the main frame if the main frame is
MD> "clicked". The default, of course, should be that panes are
MD> "transient", thus not breaking any old code.
MD>
MD> I made some minor changes to wxWidgets-3.0.0 code to allow this to happen
MD> and was hoping it could be reviewed and integrated into the official code
MD> base.

Hi Marco,

I don't have any problem with this in principle, but it's hard to review
the changes posted as 8 different diffs. Could you please make a single
diff (as explained in http://trac.wxwidgets.org/wiki/HowToSubmitPatches)
and then submit it for review to review.bakefile.org (you will need to
create an account there but it should be simple) so that I (or anybody else
working on wxAUI) could look at it?

Thanks,
VZ
--
TT-Solutions: wxWidgets consultancy and technical support
http://www.tt-solutions.com/
Marco DeFreitas
2014-03-17 20:59:55 UTC
Permalink
Hey Vadim,

I downloaded the SVN snapshot for today (March 17). I made a copy of the
directory and made my changes in the copy. I then did a diff with the
original and my version as directed (diff -uNr ).

I created an account on review.bakefile.org and tried to upload my diff for
review. I specified the "Base Directory" as "/wxWidgets" and I uploaded my
diff. When I tried to submit the review I got an error that said:
Unable to parse diff revision header '2013-07-26 20:31:06.000000000
-0400'

The first few lines of my diff file looks like this:
diff -uNr wxWidgets-0/include/wx/aui/floatpane.h
wxWidgets-1/include/wx/aui/floatpane.h
--- wxWidgets-0/include/wx/aui/floatpane.h 2013-07-26
20:31:06.000000000 -0400
+++ wxWidgets-1/include/wx/aui/floatpane.h 2014-03-17
15:39:19.669425262 -0400

Did I do something wrong? Also, there did not seem to be a field to enter
my general comments on what the patch accomplishes, or is that on the next
screen after the diff is accepted?

Thanks,
Marco
--
Please read http://www.wxwidgets.org/support/mlhowto.htm before posting.

To unsubscribe, send email to wx-users+***@googlegroups.com
or visit http://groups.google.com/group/wx-users
Vadim Zeitlin
2014-03-18 14:19:10 UTC
Permalink
On Mon, 17 Mar 2014 13:59:55 -0700 (PDT) Marco DeFreitas wrote:

MD> I created an account on review.bakefile.org and tried to upload my diff for
MD> review. I specified the "Base Directory" as "/wxWidgets" and I uploaded my
MD> diff.

I think you shouldn't specify the base directory (I'm not sure how does
the web UI work exactly because I submit my patches for review from the
command line using RBTools). Just choose "wxWidgets" (not the Github
version) in the repository dropdown.

MD> Did I do something wrong? Also, there did not seem to be a field to enter
MD> my general comments on what the patch accomplishes, or is that on the next
MD> screen after the diff is accepted?

Yes, it's on the next screen.

Thanks,
VZ
--
TT-Solutions: wxWidgets consultancy and technical support
http://www.tt-solutions.com/
Marco DeFreitas
2014-03-18 14:39:55 UTC
Permalink
VZ> I think you shouldn't specify a base directory.

I tried that, but it says:
The "Base Diff Path" field is required
--
Please read http://www.wxwidgets.org/support/mlhowto.htm before posting.

To unsubscribe, send email to wx-users+***@googlegroups.com
or visit http://groups.google.com/group/wx-users
Vadim Zeitlin
2014-03-18 14:44:42 UTC
Permalink
On Tue, 18 Mar 2014 07:39:55 -0700 (PDT) Marco DeFreitas wrote:

MD> VZ> I think you shouldn't specify a base directory.
MD>
MD> I tried that, but it says:
MD> The "Base Diff Path" field is required

Hmm, could you please send me the diff privately so that I could test it?

Thanks,
VZ
--
TT-Solutions: wxWidgets consultancy and technical support
http://www.tt-solutions.com/
Marco DeFreitas
2014-03-18 14:58:20 UTC
Permalink
Ok, how should I send it? Do you want me to add it to the Trac web site as
an "enhancement"?

Thanks,
Marco
--
Please read http://www.wxwidgets.org/support/mlhowto.htm before posting.

To unsubscribe, send email to wx-users+***@googlegroups.com
or visit http://groups.google.com/group/wx-users
Vadim Zeitlin
2014-03-18 16:38:45 UTC
Permalink
On Tue, 18 Mar 2014 07:58:20 -0700 (PDT) Marco DeFreitas wrote:

MD> Ok, how should I send it? Do you want me to add it to the Trac web site as
MD> an "enhancement"?

You could just send it to me via email or attach it to Trac. The latter
might be better as at the very least it won't get lost like this.

Thanks,
VZ
--
TT-Solutions: wxWidgets consultancy and technical support
http://www.tt-solutions.com/
Marco DeFreitas
2014-03-19 00:09:05 UTC
Permalink
Just posted it to the Trac web site.

Thanks,
Marco
--
Please read http://www.wxwidgets.org/support/mlhowto.htm before posting.

To unsubscribe, send email to wx-users+***@googlegroups.com
or visit http://groups.google.com/group/wx-users
Marco DeFreitas
2014-04-14 14:53:09 UTC
Permalink
Hey Vadim,

FYI... I posted a new implementation to the Trac web site that will
hopefully remove the issues with backward compatibility of the wxMiniFrame.

See ticket #16096.

No rush... I just wanted to make sure you saw it.

Thanks!
Marco
--
Please read http://www.wxwidgets.org/support/mlhowto.htm before posting.

To unsubscribe, send email to wx-users+***@googlegroups.com
or visit http://groups.google.com/group/wx-users
Loading...