From: Ralph T. <ra...@gm...> - 2005-12-30 08:12:26
|
Hi Thomas, The first change (to get_window_title) looks good. I assume that your issue with (2) is that the Begin window grows but the edit text widgets remain the same size. It seems like it should grow... I'll test your change and verify that the baseline is correct. Sean, what is the correct behavior for the edit text widget here? Thanks, Ralph On 12/29/05, Thomas Witt <wi...@ac...> wrote: > > Hi, > > The attached patch fixes 2 issues with the widget implementation on > win32 that show up in begin. > > a) The text in an edit_text widget is truncated to 1023 char on > extraction. As a result loading any example in begin that is longer than > that (some are) and making a small modification will see the update fail > with a syntax error. > > b) The edit_text widget does not grow vertically. This makes > editing/viewing larger examples in Begin a pain. It works for begin but > this fix might need more review. > > Thomas > > -- > Thomas Witt > wi...@ac... > > > Index: ui_core_implementation.cpp > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > RCS file: /cvsroot/adobe-source/adobe-source/adobe/future/widgets/sources= /win/ui_core_implementation.cpp,v > retrieving revision 1.5 > diff -u -3 -p -u -r1.5 ui_core_implementation.cpp > --- ui_core_implementation.cpp 2 Dec 2005 02:52:56 -0000 1.5 > +++ ui_core_implementation.cpp 30 Dec 2005 00:02:05 -0000 > @@ -245,11 +245,13 @@ std::string get_window_title(HWND window > { > assert(window); > > - std::vector<WCHAR> titlename; > + int const buffer_size =3D ::GetWindowTextLengthW(window) + 1; > > - titlename.resize(1024); > + std::vector<WCHAR> titlename(buffer_size, 0); > > - *(&titlename[::GetWindowTextW(window, &titlename[0], 1024)]) =3D = 0; > + int const text_length =3D ::GetWindowTextW(window, &titlename[0], buff= er_size); > + > + assert(text_length < buffer_size); > > return std::string(hackery::convert_utf(&titlename[0])); > } > @@ -3143,7 +3145,10 @@ void edit_text_t::implementation_t::set_ > // alignment. > // > position.y_m +=3D baseline - edit_baseline_m; > - geometry.height() =3D edit_height_m; > + > + // Do we need to adapt the height for baseline alignment? (thw) > + // Disabled as it disables vertical align_fill (thw) > + // geometry.height() =3D edit_height_m; > _super::set_bounds(position, geometry); > } > > > > |