mirror of
https://github.com/ultimatepp/ultimatepp.git
synced 2026-07-11 22:03:01 -06:00
LinuxGl: Further improvements
git-svn-id: svn://ultimatepp.org/upp/trunk@6196 f0d560ea-af0d-0410-9eb7-867de7ffcac7
This commit is contained in:
parent
0a6aac3123
commit
f10ada104d
7 changed files with 30 additions and 26 deletions
|
|
@ -1,3 +1,5 @@
|
|||
#define GUI_LINUXGL
|
||||
|
||||
#ifndef _LinuxGl_LinuxGl_h_
|
||||
#define _LinuxGl_LinuxGl_h_
|
||||
|
||||
|
|
@ -33,8 +35,6 @@
|
|||
|
||||
#include <LinuxGl/stdids.h>
|
||||
|
||||
#define GUI_LINUXGL
|
||||
|
||||
#include <Painter/Painter.h>
|
||||
|
||||
NAMESPACE_UPP
|
||||
|
|
|
|||
|
|
@ -447,5 +447,5 @@ float GetFps()
|
|||
return fps;
|
||||
}
|
||||
|
||||
END_UPP_NAMESPACE
|
||||
#endif
|
||||
END_UPP_NAMESPACE
|
||||
|
|
@ -172,7 +172,6 @@ void SlimScrollBar::Paint(Draw &w)
|
|||
Size rsz(int(size), IsVert() ? sz.cx : sz.cy);
|
||||
Fix(p);
|
||||
Fix(rsz);
|
||||
w.DrawRect(p.x, p.y, rsz.cx, rsz.cy, White().Alpha(150));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -24,15 +24,15 @@ void TopWindow::GripResize()
|
|||
|
||||
void TopWindow::SyncSizeHints()
|
||||
{
|
||||
SyncCaption0();
|
||||
SyncCaption();
|
||||
}
|
||||
|
||||
void TopWindow::SyncTitle0()
|
||||
void TopWindow::SyncTitle()
|
||||
{
|
||||
SyncCaption0();
|
||||
SyncCaption();
|
||||
}
|
||||
|
||||
void TopWindow::SyncCaption0()
|
||||
void TopWindow::SyncCaption()
|
||||
{
|
||||
GuiLock __;
|
||||
frame->title = title.ToString();
|
||||
|
|
@ -49,7 +49,7 @@ void TopWindow::SyncCaption0()
|
|||
|
||||
void TopWindow::State(int reason)
|
||||
{
|
||||
SyncCaption0();
|
||||
SyncCaption();
|
||||
}
|
||||
|
||||
void TopWindow::SyncRect()
|
||||
|
|
@ -80,7 +80,7 @@ void TopWindow::Open(Ctrl *owner)
|
|||
PopUp(frame, false, true);
|
||||
popup = false;
|
||||
SetRect(frame->GetClient());
|
||||
SyncCaption0();
|
||||
SyncCaption();
|
||||
if(state == MAXIMIZED)
|
||||
frame->Maximize();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -74,8 +74,9 @@ void TopWindowFrame::Paint(Draw& w)
|
|||
int tcx = sz.cx - m.left - m.right - 4 - c * (close.IsShown() + maximize.IsShown());
|
||||
if(!IsNull(icon)) {
|
||||
Image h = icon;
|
||||
if(h.GetWidth() > c || h.GetHeight() > c)
|
||||
h = Rescale(h, GetFitSize(h.GetSize(), Size(c)));
|
||||
//TODO: Eliminate crash in Gate2
|
||||
//if(h.GetWidth() > c || h.GetHeight() > c)
|
||||
// h = Rescale(h, GetFitSize(h.GetSize(), Size(c)));
|
||||
w.DrawImage(tx, m.top + 2, h);
|
||||
tx += c;
|
||||
tcx -= c;
|
||||
|
|
|
|||
|
|
@ -333,7 +333,7 @@ void Ctrl::DrawScreen()
|
|||
}
|
||||
}
|
||||
|
||||
void Ctrl::WndUpdate0r(const Rect& r)
|
||||
void Ctrl::WndUpdate(const Rect& r)
|
||||
{
|
||||
GuiLock __;
|
||||
}
|
||||
|
|
@ -352,7 +352,7 @@ bool Ctrl::ProcessEvents(bool *quit)
|
|||
return true;
|
||||
}
|
||||
|
||||
void Ctrl::EventLoop0(Ctrl *ctrl)
|
||||
void Ctrl::EventLoop(Ctrl *ctrl)
|
||||
{
|
||||
GuiLock __;
|
||||
ASSERT(IsMainThread());
|
||||
|
|
@ -381,7 +381,7 @@ void Ctrl::EventLoop0(Ctrl *ctrl)
|
|||
LoopLevel--;
|
||||
}
|
||||
|
||||
void Ctrl::GuiSleep0(int ms)
|
||||
void Ctrl::GuiSleep(int ms)
|
||||
{
|
||||
GuiLock __;
|
||||
ASSERT(IsMainThread());
|
||||
|
|
@ -396,12 +396,12 @@ Rect Ctrl::GetWndScreenRect() const
|
|||
return GetRect();
|
||||
}
|
||||
|
||||
void Ctrl::WndShow0(bool b)
|
||||
void Ctrl::WndShow(bool b)
|
||||
{
|
||||
GuiLock __;
|
||||
}
|
||||
|
||||
void Ctrl::WndUpdate0()
|
||||
void Ctrl::WndUpdate()
|
||||
{
|
||||
GuiLock __;
|
||||
}
|
||||
|
|
@ -470,7 +470,7 @@ void Ctrl::DestroyWnd()
|
|||
{
|
||||
for(int i = 0; i < topctrl.GetCount(); i++)
|
||||
if(topctrl[i]->top && topctrl[i]->top->owner_window == this)
|
||||
topctrl[i]->WndDestroy0();
|
||||
topctrl[i]->WndDestroy();
|
||||
int q = FindTopCtrl();
|
||||
if(q >= 0) {
|
||||
topctrl.Remove(q);
|
||||
|
|
@ -485,7 +485,7 @@ void Ctrl::DestroyWnd()
|
|||
win->DestroyFrame();
|
||||
}
|
||||
|
||||
void Ctrl::WndDestroy0()
|
||||
void Ctrl::WndDestroy()
|
||||
{
|
||||
DestroyWnd();
|
||||
if(topctrl.GetCount())
|
||||
|
|
@ -508,7 +508,7 @@ void Ctrl::PutForeground()
|
|||
fw[i]->PutForeground();
|
||||
}
|
||||
|
||||
void Ctrl::SetWndForeground0()
|
||||
void Ctrl::SetWndForeground()
|
||||
{
|
||||
GuiLock __;
|
||||
ASSERT(IsOpen());
|
||||
|
|
@ -534,16 +534,15 @@ bool Ctrl::IsWndForeground() const
|
|||
return b;
|
||||
}
|
||||
|
||||
void Ctrl::WndEnable0(bool *b)
|
||||
void Ctrl::WndEnable(bool b)
|
||||
{
|
||||
GuiLock __;
|
||||
*b = true;
|
||||
}
|
||||
|
||||
void Ctrl::SetWndFocus0(bool *b)
|
||||
bool Ctrl::SetWndFocus()
|
||||
{
|
||||
GuiLock __;
|
||||
*b = true;
|
||||
return true;
|
||||
}
|
||||
|
||||
bool Ctrl::HasWndFocus() const
|
||||
|
|
@ -578,7 +577,7 @@ void Ctrl::WndInvalidateRect(const Rect& r)
|
|||
//::InvalidateRect(glHwnd, NULL, false);
|
||||
}
|
||||
|
||||
void Ctrl::WndSetPos0(const Rect& rect)
|
||||
void Ctrl::WndSetPos(const Rect& rect)
|
||||
{
|
||||
GuiLock __;
|
||||
TopWindow *w = dynamic_cast<TopWindow *>(this);
|
||||
|
|
@ -587,7 +586,7 @@ void Ctrl::WndSetPos0(const Rect& rect)
|
|||
SetWndRect(rect);
|
||||
}
|
||||
|
||||
void Ctrl::WndScrollView0(const Rect& r, int dx, int dy)
|
||||
void Ctrl::WndScrollView(const Rect& r, int dx, int dy)
|
||||
{
|
||||
GuiLock __;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -33,3 +33,8 @@
|
|||
#define GUIPLATFORM_KEYCODES_INCLUDE <WinGl/Keys.h>
|
||||
#define GUIPLATFORM_INCLUDE <WinGl/WinGl.h>
|
||||
#endif
|
||||
|
||||
#ifdef flagLINUXGL
|
||||
#define GUIPLATFORM_KEYCODES_INCLUDE <LinuxGl/Keys.h>
|
||||
#define GUIPLATFORM_INCLUDE <LinuxGl/LinuxGl.h>
|
||||
#endif
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue