mirror of
https://github.com/ultimatepp/ultimatepp.git
synced 2026-05-15 14:16:07 -06:00
CtrlCore: GetScreenSize deprecated, implemented using GetVirtualScreenArea
git-svn-id: svn://ultimatepp.org/upp/trunk@5961 f0d560ea-af0d-0410-9eb7-867de7ffcac7
This commit is contained in:
parent
5323d54d98
commit
d05d4f02ce
8 changed files with 8 additions and 30 deletions
|
|
@ -45,8 +45,7 @@ struct GuiLock {
|
|||
~GuiLock() { LeaveGuiMutex(); }
|
||||
};
|
||||
|
||||
bool ScreenInPaletteMode();
|
||||
Size GetScreenSize();
|
||||
bool ScreenInPaletteMode(); // Deprecated
|
||||
|
||||
typedef ImageDraw SystemImageDraw;
|
||||
|
||||
|
|
@ -1251,6 +1250,8 @@ public:
|
|||
virtual ~Ctrl();
|
||||
};
|
||||
|
||||
inline Size GetScreenSize() { return Ctrl::GetVirtualScreenArea().GetSize(); } // Deprecated
|
||||
|
||||
String GuiPlatformGetKeyDesc(dword key);
|
||||
bool GuiPlatformHasSizeGrip();
|
||||
void GuiPlatformGripResize(TopWindow *q);
|
||||
|
|
|
|||
|
|
@ -453,11 +453,6 @@ bool ScreenInPaletteMode()
|
|||
return Xpalette;
|
||||
}
|
||||
|
||||
Size GetScreenSize()
|
||||
{
|
||||
return Size(Xwidth, Xheight);
|
||||
}
|
||||
|
||||
END_UPP_NAMESPACE
|
||||
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -11,11 +11,6 @@ bool ScreenInPaletteMode()
|
|||
return ScreenInfo().PaletteMode();
|
||||
}
|
||||
|
||||
Size GetScreenSize()
|
||||
{
|
||||
return ScreenInfo().GetPageSize();
|
||||
}
|
||||
|
||||
HRGN GetFrameRgn(const Rect& rect, int n) {
|
||||
HRGN rgn = CreateRectRgnIndirect(rect);
|
||||
Rect r = rect;
|
||||
|
|
|
|||
|
|
@ -1630,7 +1630,6 @@ DlgPathEditor::DlgPathEditor()
|
|||
menu_bar.Set(THISBACK(ToolRoot));
|
||||
tool_bar.Set(THISBACK(ToolRoot));
|
||||
dialog << path.SizePos();
|
||||
// dialog.SetRect(CalcWindowRect(dialog, Ctrl::GetWorkStock.GetScreenSize() >> 1));
|
||||
dialog.Sizeable().Zoomable();
|
||||
dialog.SetMinSize(Size(300, 200));
|
||||
path.WhenRescan = THISBACK(Rescan);
|
||||
|
|
|
|||
|
|
@ -2056,9 +2056,9 @@ void GridCtrl::SyncPopup()
|
|||
GetItemAttrs(it, r, c, vi, hi, popup.style, popup.gd, popup.fg, popup.bg, popup.fnt);
|
||||
popup.gd->row = r < fixed_rows ? -1 : r - fixed_rows;
|
||||
popup.gd->col = c < fixed_cols ? -1 : c - fixed_cols;
|
||||
Size scrsz = GetScreenSize();
|
||||
Rect scr = GetWorkArea();
|
||||
int margin = popup.gd->lm + popup.gd->rm;
|
||||
int cx = min(600, min((int) (scrsz.cx * 0.4), max(it.rcx + margin + 2, hi.nsize + 1)));
|
||||
int cx = min(600, min((int) (scr.right * 0.4), max(it.rcx + margin + 2, hi.nsize + 1)));
|
||||
int lines = popup.gd->GetLinesCount(cx - margin - 2, WString(val), popup.fnt, true);
|
||||
int cy = max(lines * Draw::GetStdFontCy() + popup.gd->tm + popup.gd->bm + 2, vi.nsize + 1);
|
||||
if(fr && r == 0)
|
||||
|
|
@ -3402,7 +3402,6 @@ GridCtrl::CurState GridCtrl::SetCursor0(Point p, int opt, int dirx, int diry)
|
|||
|
||||
bool hidden = true;
|
||||
bool clickable = true;
|
||||
bool editable = true;
|
||||
bool group = true;
|
||||
|
||||
if(cur)
|
||||
|
|
@ -3413,7 +3412,6 @@ GridCtrl::CurState GridCtrl::SetCursor0(Point p, int opt, int dirx, int diry)
|
|||
bool hy = diry != 0 ? v.hidden : false;
|
||||
hidden = hx || hy;
|
||||
clickable = h.clickable && v.clickable;
|
||||
editable = h.editable && v.editable;
|
||||
if(oit && oit->group >= 0 && !select_row)
|
||||
{
|
||||
nit = &GetItem(tmpcur);
|
||||
|
|
@ -6051,9 +6049,6 @@ bool GridCtrl::Go0(int jump, bool scroll, bool goleft, bool ctrlmode)
|
|||
if(IsEmpty())
|
||||
return false;
|
||||
|
||||
bool samerow = false;
|
||||
bool doall = true;
|
||||
|
||||
if(!ready)
|
||||
{
|
||||
UpdateSizes();
|
||||
|
|
@ -6070,9 +6065,6 @@ bool GridCtrl::Go0(int jump, bool scroll, bool goleft, bool ctrlmode)
|
|||
sbx.Set(sbx.Get() + 5);
|
||||
return false;
|
||||
}
|
||||
|
||||
samerow = true;
|
||||
doall = false;
|
||||
}
|
||||
|
||||
if(jump == GO_PREV)
|
||||
|
|
|
|||
|
|
@ -206,11 +206,11 @@ void ScatterCtrl::LabelPopUp(bool down, Point &pt)
|
|||
if (IsNull(popLT))
|
||||
popLT = pt;
|
||||
popRB = pt;
|
||||
Size sz = GetScreenSize();
|
||||
Rect wa = GetWorkArea();
|
||||
Rect rc = GetScreenRect();
|
||||
if (sz.cx - (rc.left + pt.x) < 200)
|
||||
if (wa.right - (rc.left + pt.x) < 200)
|
||||
pt.x -= 200;
|
||||
if (sz.cy - (rc.top + pt.y) < 200)
|
||||
if (wa.bottom - (rc.top + pt.y) < 200)
|
||||
pt.y -= 200;
|
||||
ProcessPopUp(pt);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -740,9 +740,6 @@ SqlConsole::SqlConsole(SqlSession& session)
|
|||
Add(schema.BottomPos(0, ecy).RightPos(0, 80));
|
||||
schema.SetLabel(t_("&Schema"));
|
||||
schema <<= THISBACK(ObjectTree);
|
||||
// hide = callback(this, &SqlConsole::Hide);
|
||||
// Size sz = Stock.GetScreenSize();
|
||||
// SetRect((sz.cx - 600) / 2, (sz.cy - 400) / 2, 600, 400);
|
||||
ActiveFocus(command);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -603,7 +603,6 @@ DlgHelpEditor::DlgHelpEditor()
|
|||
HelpTopic("DlgHelpEditor");
|
||||
WhenClose = THISBACK(OnFileClose);
|
||||
Sizeable().Zoomable();
|
||||
// CalcWindowRect(*this, (Stock.GetScreenSize() * 3) >> 2);
|
||||
AddFrame(menubar);
|
||||
AddFrame(toolbar);
|
||||
AddFrame(statusbar);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue