mirror of
https://github.com/ultimatepp/ultimatepp.git
synced 2026-08-31 07:12:39 -06:00
CtrlCore: Cocoa Minimize, Maximize, Overlap
git-svn-id: svn://ultimatepp.org/upp/trunk@12218 f0d560ea-af0d-0410-9eb7-867de7ffcac7
This commit is contained in:
parent
9c62e7bc86
commit
32b79c324e
3 changed files with 43 additions and 23 deletions
|
|
@ -225,6 +225,10 @@ void Upp::TopWindow::Open(Ctrl *owner)
|
|||
SyncCaption();
|
||||
SyncSizeHints();
|
||||
PlaceFocus();
|
||||
if(state == MAXIMIZED)
|
||||
Maximize();
|
||||
if(state == MINIMIZED)
|
||||
Minimize();
|
||||
// if(top)
|
||||
// top->placefocus = true;
|
||||
}
|
||||
|
|
@ -315,4 +319,36 @@ void Upp::TopWindow::SerializePlacement(Stream& s, bool reminimize)
|
|||
SetRect(rect);
|
||||
}
|
||||
|
||||
void Upp::TopWindow::Maximize(bool effect)
|
||||
{
|
||||
state = MAXIMIZED;
|
||||
if(top && top->coco && top->coco->window && !top->coco->window.zoomed) {
|
||||
if(effect)
|
||||
[top->coco->window performZoom:top->coco->window];
|
||||
else
|
||||
[top->coco->window zoom:top->coco->window];
|
||||
}
|
||||
}
|
||||
|
||||
void Upp::TopWindow::Minimize(bool effect)
|
||||
{
|
||||
state = MINIMIZED;
|
||||
if(top && top->coco && top->coco->window && !top->coco->window.miniaturized) {
|
||||
if(effect)
|
||||
[top->coco->window performMiniaturize:top->coco->window];
|
||||
else
|
||||
[top->coco->window miniaturize:top->coco->window];
|
||||
}
|
||||
}
|
||||
|
||||
void Upp::TopWindow::Overlap(bool effect)
|
||||
{
|
||||
state = OVERLAPPED;
|
||||
if(top && top->coco && top->coco->window && top->coco->window.zoomed)
|
||||
[top->coco->window zoom:top->coco->window];
|
||||
if(top && top->coco && top->coco->window && top->coco->window.miniaturized)
|
||||
[top->coco->window deminiaturize:top->coco->window];
|
||||
}
|
||||
|
||||
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -6,27 +6,11 @@ NAMESPACE_UPP
|
|||
|
||||
#define LLOG(x) // LOG(x)
|
||||
|
||||
void TopWindow::Minimize(bool effect)
|
||||
{
|
||||
state = MINIMIZED;
|
||||
}
|
||||
|
||||
TopWindow& TopWindow::FullScreen(bool b)
|
||||
{
|
||||
return *this;
|
||||
}
|
||||
|
||||
void TopWindow::Maximize(bool effect)
|
||||
{
|
||||
state = MAXIMIZED;
|
||||
}
|
||||
|
||||
void TopWindow::Overlap(bool effect)
|
||||
{
|
||||
GuiLock __;
|
||||
state = OVERLAPPED;
|
||||
}
|
||||
|
||||
TopWindow& TopWindow::TopMost(bool b, bool stay_top)
|
||||
{
|
||||
GuiLock __;
|
||||
|
|
|
|||
|
|
@ -1,7 +1,5 @@
|
|||
sooner:
|
||||
|
||||
- replacement fonts
|
||||
- minimize, maximaze
|
||||
- fix package organiser link options (joining link options missing space)
|
||||
|
||||
- implement missing Draw ops
|
||||
|
|
@ -30,14 +28,16 @@ later:
|
|||
|
||||
- keynames apple style
|
||||
|
||||
- Mac menu
|
||||
- Clipboard types
|
||||
- Drag&Drop
|
||||
- System colors
|
||||
- Chameleon
|
||||
* Mac menu
|
||||
* Clipboard types
|
||||
* Drag&Drop
|
||||
* System colors
|
||||
* Chameleon
|
||||
|
||||
done:
|
||||
|
||||
- replacement fonts
|
||||
- minimize, maximaze
|
||||
- void WakeUpGuiThread(void)
|
||||
- not all additional cursors are correct
|
||||
- ignoreclick
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue