add 'no-sheet dialog style

svn: r2347
This commit is contained in:
Matthew Flatt 2006-03-02 20:09:02 +00:00
parent 79c9d947af
commit e0f43372fd
5 changed files with 21 additions and 5 deletions

View File

@ -137,7 +137,9 @@
(check-dimension cwho height)
(check-init-pos-integer cwho x)
(check-init-pos-integer cwho y)
(check-style cwho #f '(no-resize-border no-caption no-system-menu mdi-parent mdi-child toolbar-button hide-menu-bar float metal)
(check-style cwho #f '(no-resize-border no-caption no-system-menu
mdi-parent mdi-child
toolbar-button hide-menu-bar float metal)
style)
(when (memq 'mdi-child style)
(when (memq 'mdi-parent style)
@ -212,7 +214,7 @@
(check-label-string cwho label)
(check-top-level-parent/false cwho parent)
(for-each (lambda (x) (check-dimension cwho x)) (list width height x y))
(check-style cwho #f '(no-caption resize-border) style)))
(check-style cwho #f '(no-caption resize-border no-sheet) style)))
(rename [super-on-subwindow-char on-subwindow-char])
(private-field [wx #f])
(override

View File

@ -1022,8 +1022,13 @@ static void dialogMenu(wxDialogBox *XTMAC_UNUSED(d))
#endif
}
#ifndef wxNOT_AS_SHEET
# define wxNOT_AS_SHEET 0
#endif
static Scheme_Object *dialogStyle_wxNO_CAPTION_sym = NULL;
static Scheme_Object *dialogStyle_wxMAXIMIZE_sym = NULL;
static Scheme_Object *dialogStyle_wxNOT_AS_SHEET_sym = NULL;
static void init_symset_dialogStyle(void) {
REMEMBER_VAR_STACK();
@ -1031,12 +1036,14 @@ static void init_symset_dialogStyle(void) {
dialogStyle_wxNO_CAPTION_sym = WITH_REMEMBERED_STACK(scheme_intern_symbol("no-caption"));
wxREGGLOB(dialogStyle_wxMAXIMIZE_sym);
dialogStyle_wxMAXIMIZE_sym = WITH_REMEMBERED_STACK(scheme_intern_symbol("resize-border"));
wxREGGLOB(dialogStyle_wxNOT_AS_SHEET_sym);
dialogStyle_wxNOT_AS_SHEET_sym = WITH_REMEMBERED_STACK(scheme_intern_symbol("no-sheet"));
}
static int unbundle_symset_dialogStyle(Scheme_Object *v, const char *where) {
SETUP_VAR_STACK(1);
VAR_STACK_PUSH(0, v);
if (!dialogStyle_wxMAXIMIZE_sym) WITH_VAR_STACK(init_symset_dialogStyle());
if (!dialogStyle_wxNOT_AS_SHEET_sym) WITH_VAR_STACK(init_symset_dialogStyle());
Scheme_Object *i INIT_NULLED_OUT, *l = v;
long result = 0;
while (SCHEME_PAIRP(l)) {
@ -1044,6 +1051,7 @@ static int unbundle_symset_dialogStyle(Scheme_Object *v, const char *where) {
if (0) { }
else if (i == dialogStyle_wxNO_CAPTION_sym) { result = result | wxNO_CAPTION; }
else if (i == dialogStyle_wxMAXIMIZE_sym) { result = result | wxMAXIMIZE; }
else if (i == dialogStyle_wxNOT_AS_SHEET_sym) { result = result | wxNOT_AS_SHEET; }
else { break; }
l = SCHEME_CDR(l);
}

View File

@ -60,9 +60,14 @@ static void dialogMenu(wxDialogBox *XTMAC_UNUSED(d))
#endif
}
#ifndef wxNOT_AS_SHEET
# define wxNOT_AS_SHEET 0
#endif
@BEGINSYMBOLS dialogStyle > > PRED BUNDLE
@SYM "no-caption" : wxNO_CAPTION
@SYM "resize-border" : wxMAXIMIZE
@SYM "no-sheet" : wxNOT_AS_SHEET
@ENDSYMBOLS
@INCLUDE wxs_espc.xci

View File

@ -75,7 +75,7 @@ typedef short int WXTYPE;
#define wxMINIMIZE_BOX 0x00000800
#define wxMAXIMIZE_BOX 0x00001000
#define wxTOOLBAR_BUTTON 0x00002000
#define wxTINY_CAPTION_VERT 0x00004000
#define wxNOT_AS_SHEET 0x00004000
#define wxRESIZE_BOX wxMAXIMIZE_BOX
#define wxNO_RESIZE_BORDER 0x00800000
#define wxHIDE_MENUBAR 0x01000000

View File

@ -107,7 +107,8 @@ wxFrame::wxFrame // Constructor (for frame window)
if (cStyle & wxMDI_CHILD) { // hack : MDI_CHILD means dialog box
#ifdef OS_X
if (parentFrame && parentFrame->GetSheetParent()) {
if (parentFrame && parentFrame->GetSheetParent()
&& !(cStyle & wxNOT_AS_SHEET)) {
WXGC_IGNORE(this, cSheetParent);
cSheetParent = parentFrame->GetSheetParent();
windowClass = kSheetWindowClass;