This is the mail archive of the
cygwin-apps@cygwin.com
mailing list for the Cygwin project.
Re: [Patch] Resizeable main window
- From: Igor Pechtchanski <pechtcha at cs dot nyu dot edu>
- To: Frank Richter <frichter at gmx dot li>
- Cc: cygwin-apps at cygwin dot com
- Date: Thu, 16 Oct 2003 16:36:58 -0400 (EDT)
- Subject: Re: [Patch] Resizeable main window
- References: <3F8ED1C0.4060008@gmx.li>
- Reply-to: cygwin-apps at cygwin dot com
On Thu, 16 Oct 2003, Frank Richter wrote:
> This adds the ability to resize the main window, with support for
> facilities to adjust the size/position of child elements.
>
> Currently, it adds a thick border and maximize box to the main window,
> and dragging the border resizes the contained pages and adjusts some
> controls (in particular, the bottom right Back/Next/Etc buttons stay in
> the bottom right, and the top right Cygwin icon stays where it is.)
> Further work needs to be done to make everything "resize friendly", but
> it's a start.
>
> The changes have been made against the CVS version and tested on WinXP.
> The code utilizes some "less public" aspects of property sheets and
> makes certain assumptions on it's internal workings, so it *may* break
> on other versions.
>
> -f.r.
Frank,
I've played with this for a bit, and it does allow resizing the window.
I succeeded in making a bunch of things resizeable by adding the
appropriate controls (IDC_STATIC_HEADER_TITLE, IDC_STATIC_WELCOME_TITLE,
IDC_VERSION, IDC_URL_LIST, IDC_EDIT_USER_URL, IDC_BUTTON_ADD_URL) to the
DefaultControlsInfo list (see below for exact changes). I'm assuming that
if something is anchored on the opposite sides (left-right or top-bottom),
it's going to stretch along that dimension when resized. FWIW, the three
lines below with URL in them make the mirror list selection dialog almost
fully resizeable. One thing I couldn't do was actually make the chooser
resizeable (i.e., the one that started the whole rigamarole). Notice in
the changes below that I'm anchoring the IDC_LISTVIEW_POS in the same
manner as IDC_URL_LIST, which should have worked, but didn't. Do you have
an insight as to why?
Also, I didn't see any provisions in the code for handling more than one
element of a particular type (e.g., if there is more than one IDC_STATIC
control). Does this mean that every control has to have a distinct
resource type?
Another thing I noticed was that when things were resized, the new sizes
weren't calculated quite right. For example, when IDC_VERSION was made
resizeable in the vertical dimension, and the screen was returned to the
original size, the Version label still covered the text string below it.
Igor
==============================================================================
static ControlAdjuster::ControlInfo DefaultControlsInfo[] = {
{IDC_HEADICON, false, true, true, false},
{IDC_HEADSEPARATOR, true, true, true, false},
+ {IDC_STATIC_HEADER_TITLE, true, true, true, false},
+ {IDC_STATIC_WELCOME_TITLE, true, true, true, false},
+ {IDC_VERSION, true, true, true, false},
+ {IDC_URL_LIST, true, true, true, true},
+ {IDC_EDIT_USER_URL, true, false, true, true},
+ {IDC_BUTTON_ADD_URL, false, false, true, true},
+ {IDC_CHOOSE_VIEW, false, true, true, false},
+ {IDC_CHOOSE_INST_TEXT, true, true, true, false},
+ {IDC_LISTVIEW_POS, true, true, true, true},
+ {IDC_CHOOSE_VIEWCAPTION, false, true, true, false},
+// {IDC_STATIC, true, true, true, true},
{0, false, false, false, false}
};
--
http://cs.nyu.edu/~pechtcha/
|\ _,,,---,,_ pechtcha@cs.nyu.edu
ZZZzz /,`.-'`' -. ;-;;,_ igor@watson.ibm.com
|,4- ) )-,_. ,\ ( `'-' Igor Pechtchanski, Ph.D.
'---''(_/--' `-'\_) fL a.k.a JaguaR-R-R-r-r-r-.-.-. Meow!
"I have since come to realize that being between your mentor and his route
to the bathroom is a major career booster." -- Patrick Naughton