bool snapX:1, snapY:1, dontHide:1;
};
-public class BorderBits { public: bool contour:1, fixed:1, sizable:1, deep:1, bevel:1; };
+public class BorderBits { public: bool contour:1, fixed:1, sizable:1, deep:1, bevel:1, thin:1; };
class WindowBits : BorderBits
{
- BorderBits borderBits:5:0;
- bool hidden:1, isActiveClient:1, hasHorzScroll:1, hasVertScroll:1, stayOnTop:1, modal:1, unused1:1, isDefault:1, inactive:1, isRemote:1, drawBehind:1;
+ BorderBits borderBits:6:0;
+ bool hidden:1, isActiveClient:1, hasHorzScroll:1, hasVertScroll:1, stayOnTop:1, modal:1, isDefault:1, inactive:1, isRemote:1, drawBehind:1;
bool interim:1, tabCycle:1, noCycle:1, dontScrollHorz:1, dontScrollVert:1, hasMaximize:1, hasMinimize:1, hasClose:1;
- bool embedded:1, unused2:1, hasMenuBar:1, isDocument:1, showInTaskBar:1, hasStatusBar:1, nonClient:1, clickThrough:1;
+ bool embedded:1, hasMenuBar:1, isDocument:1, showInTaskBar:1, hasStatusBar:1, nonClient:1, clickThrough:1;
};
public enum BorderStyle : BorderBits
contour = BorderBits { contour = true },
fixed = BorderBits { fixed = true } | contour,
sizable = BorderBits { sizable = true } | fixed,
+ thin = BorderBits { fixed = true, thin = true } | contour,
+ sizableThin = BorderBits { sizable = true } | thin,
deep = BorderBits { deep = true },
bevel = BorderBits { bevel = true },
sizableDeep = sizable|deep,
DWORD style = 0;
DWORD exStyle = 0;
HWND parentWindow = null; //HWND_DESKTOP; // we get different behaviors with desktop...
+ Window master = window.master, rootWindow = (master && master != guiApp.desktop) ? master.rootWindow : null;
if(window.style.stayOnTop)
exStyle |= WS_EX_TOPMOST;
- // exStyle |= WS_EX_TOOLWINDOW;
-
- if(window.master.rootWindow && window.master.rootWindow != guiApp.desktop && (window.style.modal || window.style.interim))
- {
- Window master = window.master;
- Window rootWindow = window.master.rootWindow;
-
+ if(rootWindow && (window.style.modal || window.style.interim))
parentWindow = rootWindow.is3D ? rootWindow.parent.windowHandle : rootWindow.windowHandle;
-
- // parentWindow = window.master.rootWindow.is3D ? window.master.rootWindow.parent.windowHandle : window.master.rootWindow.windowHandle;
- }
if(window.alphaBlend)
// if(window.background.a < 255) //&& window.style & ES_REDRAW) Not needed anymore?
{
exStyle |= WS_EX_APPWINDOW;
parentWindow = null;
- //style |= WS_SYSMENU;
}
- else if(window.master.rootWindow && window.master.rootWindow != guiApp.desktop)
- {
+
+ if(window.style.thin)
exStyle |= WS_EX_TOOLWINDOW;
- //exStyle |= WS_EX_APPWINDOW;
- //style |= WS_SYSMENU;
- }
- else
- {
- // exStyle |= WS_EX_APPWINDOW;
- //style |= WS_SYSMENU;
- }
- /*else if(parentWindow)
- exStyle |= WS_EX_TOOLWINDOW;*/
- /*if(window.interim)
- parentWindow = window.master.rootWindow.windowHandle;*/
if(window.windowHandle)
windowHandle = window.windowHandle;
style | (window.systemParent ? WS_CHILD :
(WS_POPUP | (window.style.hasMinimize ? WS_MINIMIZEBOX : 0))),
0,0,1,1, parentWindow, null, hInstance, null);
-
#if 0
if(exStyle & WS_EX_LAYERED)
SetLayeredWindowAttributes(windowHandle, 0, 255 /*A(window.background)*/, LWA_ALPHA);
HICON icon = null;
HICON oldIcon = (HICON)SendMessage(window.windowHandle, WM_GETICON, ICON_BIG, 0);
+ // Dialogs Inherit master's icon if none set
+ Window master = window.master, rootWindow = (master && master != guiApp.desktop) ? master.rootWindow : null;
+
+ if(!resource && !window.style.showInTaskBar && window.hasClose && rootWindow && rootWindow.icon)
+ resource = rootWindow.icon;
+
// WARNING -- putting this here as it is right after CreateRootWindow
// Take out Layered flag if we're not in 24 bit
{
gotWhatWeWant = true;
}
if(gotWhatWeWant ||
- MessageBox { type = yesNo, /*master = this, */text = "Error opening file",
+ MessageBox { type = yesNo, master = this, text = "Error opening file",
contents = "Open a different file?" }.Modal() == no)
{
if(!projectView && gotWhatWeWant)
fileMenu, "Global Settings...", g;
bool NotifySelect(MenuItem selection, Modifiers mods)
{
- // globalSettingsDialog.master = this;
+ globalSettingsDialog.master = this;
if(ide.workspace && ide.workspace.compiler)
globalSettingsDialog.workspaceActiveCompiler = ide.workspace.compiler;
else if(ideSettings.defaultCompiler)
{
if(OpenFile(ideProjectFileDialog.filePath, normal, true, projectTypes[ideProjectFileDialog.fileType].typeExtension, no, add))
break;
- if(MessageBox { type = yesNo, /*master = this, */text = "Error opening project file",
+ if(MessageBox { type = yesNo, master = this, text = "Error opening project file",
contents = "Add a different project?" }.Modal() == no)
{
break;
helpMenu, "About...", a;
bool NotifySelect(MenuItem selection, Modifiers mods)
{
- AboutIDE { /*master = this */}.Modal();
+ AboutIDE { master = this }.Modal();
return true;
}
}
char temp[4096];
sprintf(temp, "The document %s was modified by another application.\n"
"Would you like to reload it and lose your changes?", this.fileName);
- if(MessageBox { type = yesNo/*, master = this*//*.parent*/,
+ if(MessageBox { type = yesNo, master = this/*.parent*/,
text = "Document has been modified", contents = temp }.Modal() == yes)
{
char * fileName = CopyString(this.fileName);
{
if(debugger.isActive)
{
- if(MessageBox { type = yesNo, /*master = ide, */
+ if(MessageBox { type = yesNo, master = ide,
contents = "Do you want to terminate the debugging session in progress?",
text = title }.Modal() == no)
return true;
}
if(prj)
{
- MessageBox { type = ok, parent = parent, /*master = this, */text = "Same Project",
+ MessageBox { type = ok, parent = parent, master = this, text = "Same Project",
contents = "This project is already present in workspace." }.Modal();
}
else
skinItems[c].id = c;
skinItems[c].isRadio = true;
}
-*/ /*
+*/
ideFileDialog.master = this;
- ideProjectFileDialog.master = this;*/
+ ideProjectFileDialog.master = this;
//SetDriverAndSkin();
return true;