mirror of
https://github.com/ultimatepp/ultimatepp.git
synced 2026-07-31 14:17:10 -06:00
reorganizing repo
git-svn-id: svn://ultimatepp.org/upp/trunk@9206 f0d560ea-af0d-0410-9eb7-867de7ffcac7
This commit is contained in:
parent
7d17505cfe
commit
e3e8d627f5
3840 changed files with 0 additions and 1161578 deletions
|
|
@ -1,71 +0,0 @@
|
|||
#include "DropPane.h"
|
||||
|
||||
DropPane::DropPane()
|
||||
{
|
||||
Add(btnDrop);
|
||||
btnDrop.WhenAction = THISBACK(Togle);
|
||||
btnDrop.Set(true);
|
||||
btnDrop.Add(lblText);
|
||||
lblText.SetAlign(ALIGN_CENTER);
|
||||
lastHeight = 20;
|
||||
}
|
||||
|
||||
DropPane::~DropPane()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
void DropPane::SetRect(int x, int y, int cx, int cy)
|
||||
{
|
||||
Ctrl::SetRect(x, y, cx, cy);
|
||||
if (btnDrop.Get())
|
||||
lastHeight = cy;
|
||||
btnDrop.SetRect(3, 0, cx - 7, 20);
|
||||
lblText.SetRect(0, 0, btnDrop.GetRect().Width(), btnDrop.GetRect().Height());
|
||||
}
|
||||
|
||||
void DropPane::Paint(Draw& w)
|
||||
{
|
||||
Size sz = GetSize();
|
||||
btnDrop.SetRect(3, 0, sz.cx - 7, 20);
|
||||
lblText.SetRect(0, 0, btnDrop.GetRect().Width(), btnDrop.GetRect().Height());
|
||||
if (btnDrop.Get())
|
||||
lastHeight = sz.cy;
|
||||
if(!IsTransparent())
|
||||
w.DrawRect(sz, /*SColorInfoText()*/SColorFace);
|
||||
|
||||
int d = 5;
|
||||
if (btnDrop.Get() == false)
|
||||
sz.cy = 16;
|
||||
|
||||
w.Begin();
|
||||
|
||||
w.DrawRect(1, d, sz.cx - 2, 1, SColorShadow);
|
||||
w.DrawRect(1, d + 1, sz.cx - 2, 1, SColorLight);
|
||||
|
||||
w.DrawRect(0, d, 1, sz.cy - d - 1, SColorShadow);
|
||||
w.DrawRect(1, d + 1, 1, sz.cy - d - 2, SColorLight);
|
||||
|
||||
w.DrawRect(sz.cx - 2, d, 1, sz.cy - d, SColorShadow);
|
||||
w.DrawRect(sz.cx - 1, d, 1, sz.cy - d, SColorLight);
|
||||
|
||||
w.DrawRect(1, sz.cy - 2, sz.cx - 2, 1, SColorShadow);
|
||||
w.DrawRect(1, sz.cy - 1, sz.cx - 2, 1, SColorLight);
|
||||
|
||||
w.End();
|
||||
}
|
||||
|
||||
void DropPane::SetLabel(const char* label)
|
||||
{
|
||||
lblText.SetLabel(label);
|
||||
}
|
||||
|
||||
void DropPane::Togle()
|
||||
{
|
||||
Rect r = GetRect();
|
||||
if (btnDrop.Get())
|
||||
SetRect(r.left, r.top, r.Width(), lastHeight);
|
||||
else
|
||||
SetRect(r.left, r.top, r.Width(), 20);
|
||||
WhenAction();
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue