.developing rainbow

git-svn-id: svn://ultimatepp.org/upp/trunk@3671 f0d560ea-af0d-0410-9eb7-867de7ffcac7
This commit is contained in:
cxl 2011-07-18 15:02:19 +00:00
parent 041fd94dbd
commit a290659bf2
5 changed files with 34 additions and 2 deletions

View file

@ -248,6 +248,7 @@ TopWindow *Ctrl::GetMainWindow()
{
GuiLock __;
Ctrl *q = GetTopCtrl();
DDUMP(Upp::Name(q));
for(;;) {
Ctrl *w = q->GetOwner();
if(!w)

View file

@ -284,6 +284,8 @@ void Ctrl::SetFocusWnd()
GuiLock __;
// notification, don't set host platform focus here
LLOG("Ctrl::SetFocusWnd");
DDUMP(Upp::Name(focusCtrlWnd));
DDUMP(Upp::Name(this));
if(focusCtrlWnd != this) {
LLOG("Ctrl::SetFocusWnd->ActivateWnd");
ActivateWnd();

View file

@ -2,7 +2,7 @@
NAMESPACE_UPP
#define LLOG(x) // LOG(x)
#define LLOG(x) DLOG(x)
Rect TopWindow::windowFrameMargin;
@ -426,6 +426,31 @@ TopWindow& TopWindow::Urgent(bool b)
return *this;
}
void TopWindow::ShutdownWindow()
{
}
void TopWindow::ShutdownWindows()
{
bool again = true;
while(again) {
Vector<Ctrl *> tc = GetTopCtrls();
again = false;
for(int i = 0; i < tc.GetCount(); i++) {
Ptr<TopWindow> w = dynamic_cast<TopWindow *>(tc[i]);
if(w && w->IsOpen() && w->IsEnabled()) {
again = true;
w->SetForeground();
w->ShutdownWindow();
if(w && w->IsOpen())
w->WhenClose();
if(!w || !w->IsOpen())
break;
}
}
}
}
struct DialogBackground : public Display {
void Paint(Draw& w, const Rect& r, const Value& q, Color ink, Color paper, dword style) const
{

View file

@ -85,6 +85,8 @@ private:
#endif
public:
virtual void ShutdownWindow();
Callback WhenClose;
void Backup();
@ -165,6 +167,8 @@ public:
Image GetLargeIcon() const { return largeicon; }
void SerializePlacement(Stream& s, bool reminimize = false);
static void ShutdownWindows();
typedef TopWindow CLASSNAME;

View file

@ -1,7 +1,7 @@
#ifndef _plugin_jpg_icpp_init_stub
#define _plugin_jpg_icpp_init_stub
#include "Draw/init"
#define BLITZ_INDEX__ F41EE56AAB5E423C9A7F05BB9E9F8F6EE
#define BLITZ_INDEX__ FE833856160034180BCAB32D6048C9BB6
#include "jpgreg.icpp"
#undef BLITZ_INDEX__
#endif