No problem IMHO. However I wonder how this will interact with
SalFrame::{Get,Set}FrameState which are used to make dialog positions
persistent. However as you say I would expect that to be a Mac/Aqua
problem (if a problem at all). Certainly it cannot hurt to provide the
system dependent layer with extra information.Kind regards, pl Ismael wrote: > Hi, > I'm a developer involved in the mac aqua port of OpenOffice. > > Few days ago, i started to work on native windows and more precisely > dialogs. MacOS X has different types of dialogs: alerts, sheets, ... > These dialogs can be modeless, document modal or application modal. (See > Apple Human Interface Guidelines (AHIG) > http://developer.apple.com/documentation/UserExperience/Conceptual/OSXHIGuidelines/XHIGWindows/chapter_17_section_6.html#//apple_ref/doc/uid/20000961-BACFBACB > > ). > > The problem was that, in salframe.cxx (file used for creation of > windows), there's only one type of dialogs: SAL_FRAME_STYLE_DIALOG > (defined in vcl/inc/salframe.hxx) although the dialog can be a little > message box or a big dialog with a lot of tabs. And this has to be known > in MacOS X to create the dialog with the correct type. > > After some investigations, i found that in vcl/source/window/window.cxx > there's the different types of dialogs but they are lost during the > creation of the salframe: > In function void Window::ImplInit( Window* pParent, WinBits nStyle, > SystemParentData* pSystemParentData ) > near line 830: > switch (mpWindowImpl->mnType) > { > case WINDOW_DIALOG: > case WINDOW_TABDIALOG: > case WINDOW_MODALDIALOG: > case WINDOW_MODELESSDIALOG: > case WINDOW_MESSBOX: > case WINDOW_INFOBOX: > case WINDOW_WARNINGBOX: > case WINDOW_ERRORBOX: > case WINDOW_QUERYBOX: > nFrameStyle |= SAL_FRAME_STYLE_DIALOG; > default: > break; > } > All the different types of dialogs have the same flag: > SAL_FRAME_STYLE_DIALOG. It could be useful for the different platforms, > not only MacOS X, to know what is the type of the dialog they are about > to create, so that they can adjust the window they are creating to the > specificities of their platform. > > That's why i propose these changes (to vcl/source/window/window.cxx): > > nFrameStyle |= SAL_FRAME_STYLE_DIALOG; > switch (mpWindowImpl->mnType) > { > case WINDOW_DIALOG: > break; > case WINDOW_TABDIALOG: > nFrameStyle |= SAL_FRAME_STYLE_TAB_DIALOG; > break; > case WINDOW_MODELESSDIALOG: > nFrameStyle |= SAL_FRAME_STYLE_MODELESS_DIALOG; > break; > case WINDOW_MODALDIALOG: > nFrameStyle |= SAL_FRAME_STYLE_MODAL_DIALOG; > break; > case WINDOW_MESSBOX: > nFrameStyle |= SAL_FRAME_STYLE_MESSBOX; > break; > case WINDOW_QUERYBOX: > nFrameStyle |= SAL_FRAME_STYLE_QUERYBOX; > break; > case WINDOW_INFOBOX: > nFrameStyle |= SAL_FRAME_STYLE_INFOBOX; > break; > case WINDOW_WARNINGBOX: > nFrameStyle |= SAL_FRAME_STYLE_WARNINGBOX; > break; > case WINDOW_ERRORBOX: > nFrameStyle |= SAL_FRAME_STYLE_ERRORBOX; > break; > default: > nFrameStyle &= ~SAL_FRAME_STYLE_DIALOG; > break; > } > > and in vcl/inc/salframe.hxx, we can add these constants: > #define SAL_FRAME_STYLE_TAB_DIALOG ((ULONG)0x00000100) > #define SAL_FRAME_STYLE_MODELESS_DIALOG ((ULONG)0x00000200) > #define SAL_FRAME_STYLE_MODAL_DIALOG ((ULONG)0x00000400) > #define SAL_FRAME_STYLE_MESSBOX ((ULONG)0x00000800) > #define SAL_FRAME_STYLE_QUERYBOX ((ULONG)0x00001000) > #define SAL_FRAME_STYLE_INFOBOX ((ULONG)0x00002000) > #define SAL_FRAME_STYLE_WARNINGBOX ((ULONG)0x00004000) > #define SAL_FRAME_STYLE_ERRORBOX ((ULONG)0x00008000) > > > These changes won't oblige the developers of native part of VCL of the > different architectures to update/change their code, as a dialog window > will still have the SAL_FRAME_STYLE_DIALOG flag. But dialog windows will > also have a flag which will bring more info on the type of dialog (for > example: SAL_FRAME_STYLE_DIALOG | SAL_FRAME_STYLE_MESSBOX (the flags are > ORed)), and so, this will create new possibilities in the use of dialog > windows. > > Best regards, > > Ismael MERZAQ > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > -- If you give someone a program, you will frustrate them for a day; if you teach them how to program, you will frustrate them for a lifetime. -- Author unknown --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
