mirror of
https://github.com/ultimatepp/ultimatepp.git
synced 2026-07-11 22:03:01 -06:00
*ScatterCtrl: Fixes in Linux version
git-svn-id: svn://ultimatepp.org/upp/trunk@7928 f0d560ea-af0d-0410-9eb7-867de7ffcac7
This commit is contained in:
parent
6dc5f1f887
commit
6e7b4e8ebc
5 changed files with 32 additions and 17 deletions
|
|
@ -70,10 +70,14 @@ void ScatterCtrl::Paint(Draw& w)
|
|||
PlotTexts(w, GetSize(), 1);
|
||||
}
|
||||
if (HasFocus()) {
|
||||
w.DrawLine(0, 0, GetSize().cx, 0, 4, LtGray());
|
||||
w.DrawLine(GetSize().cx, 0, GetSize().cx, GetSize().cy, 4, LtGray());
|
||||
w.DrawLine(GetSize().cx, GetSize().cy, 0, GetSize().cy, 4, LtGray());
|
||||
w.DrawLine(0, 0, 0, GetSize().cy, 4, LtGray());
|
||||
w.DrawLine(0, 0, GetSize().cx, 0, 2, LtGray());
|
||||
w.DrawLine(0, 0, 0, GetSize().cy, 2, LtGray());
|
||||
int delta = -2;
|
||||
#ifdef PLATFORM_WIN32
|
||||
delta = 0;
|
||||
#endif
|
||||
w.DrawLine(GetSize().cx+delta, 0, GetSize().cx+delta, GetSize().cy, 2, LtGray());
|
||||
w.DrawLine(0, GetSize().cy+delta, GetSize().cx, GetSize().cy+delta, 2, LtGray());
|
||||
}
|
||||
}
|
||||
lastRefresh_ms = t.Elapsed();
|
||||
|
|
@ -229,7 +233,7 @@ void ScatterCtrl::AddKeyBehavior(bool ctrl, bool alt, bool shift, int key, bool
|
|||
key = VkKeyScanExW(key, hKeyboardLayout) + K_DELTA;
|
||||
}
|
||||
#else
|
||||
key = GetKeyCodeX(key);
|
||||
key = key + K_DELTA;//GetKeyCodeX(key);
|
||||
}
|
||||
#endif
|
||||
keyBehavior << KeyBehavior(ctrl, alt, shift, key, isVirtualKey, action);
|
||||
|
|
@ -276,7 +280,7 @@ void ScatterCtrl::LabelPopUp(bool down, Point &pt)
|
|||
{
|
||||
if (down) {
|
||||
if(showInfo && hPlotLeft <= pt.x && pt.x <= GetSize().cx - hPlotRight &&
|
||||
(vPlotTop + titleHeight) <= pt.y && pt.y <= GetSize().cy - vPlotBottom) {
|
||||
(vPlotTop + titleHeight) <= pt.y && pt.y <= GetSize().cy - vPlotBottom) {
|
||||
popText.AppearOnly(this);
|
||||
|
||||
isLabelPopUp = true;
|
||||
|
|
@ -290,7 +294,7 @@ void ScatterCtrl::LabelPopUp(bool down, Point &pt)
|
|||
if (wa.bottom - (rc.top + pt.y) < 200)
|
||||
pt.y -= 200;
|
||||
ProcessPopUp(pt);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
if(showInfo && isLabelPopUp) {
|
||||
popText.Close();
|
||||
|
|
@ -325,6 +329,9 @@ void ScatterCtrl::ZoomWindow(bool down, Point &pt)
|
|||
RBy = -(popRB.y - vPlotTop - titleHeight)*yRange/(GetSize().cy - (vPlotTop + vPlotBottom + titleHeight)+1) + yMin + yRange;
|
||||
RBy2 = -(popRB.y - vPlotTop - titleHeight)*yRange2/(GetSize().cy - (vPlotTop + vPlotBottom + titleHeight)+1) + yMin2 + yRange2;
|
||||
|
||||
if ((RBx - LTx) <= 0 || (LTy - RBy) <= 0 || (LTy2 - RBy2) <= 0)
|
||||
return;
|
||||
|
||||
SetXYMinLinked(LTx, RBy, RBy2);
|
||||
SetRangeLinked(RBx - LTx, LTy - RBy, LTy2 - RBy2);
|
||||
|
||||
|
|
@ -446,9 +453,8 @@ void ScatterCtrl::MouseMove(Point pt, dword)
|
|||
if (IsNull(popLT))
|
||||
popLT = pt;
|
||||
popRB = pt;
|
||||
popText.AppearOnlyOpen(this);
|
||||
|
||||
ProcessPopUp(pt);
|
||||
popText.AppearOnlyOpen(this);
|
||||
Refresh();
|
||||
}
|
||||
} else if (isZoomWindow) {
|
||||
|
|
@ -529,7 +535,8 @@ void ScatterCtrl::ContextMenu(Bar& bar)
|
|||
bar.Separator();
|
||||
}
|
||||
bar.Add(t_("Copy"), ScatterImg::Copy(), THISBACK1(SaveToClipboard, false)).Key(K_CTRL_C);
|
||||
bar.Add(t_("Save to file"), ScatterImg::Save(), THISBACK1(SaveToFile, Null)).Key(K_CTRL_S);
|
||||
bar.Add(t_("Save to file"), ScatterImg::Save(),
|
||||
THISBACK1(SaveToFile, Null)).Key(K_CTRL_S);
|
||||
}
|
||||
|
||||
void ScatterCtrl::SaveToFile(String fileName)
|
||||
|
|
|
|||
|
|
@ -304,12 +304,16 @@ void ScatterCtrl::SetDrawing(T& w, const Size &size, int scale) {
|
|||
DrawLine(w, popRB.x, popLT.y, popRB.x, popRB.y, 1, SColorHighlight());
|
||||
DrawLine(w, popLT.x, popLT.y, popRB.x, popLT.y, 1, SColorHighlight());
|
||||
DrawLine(w, popLT.x, popRB.y, popRB.x, popRB.y, 1, SColorHighlight());
|
||||
#ifdef PLATFORM_WIN32
|
||||
Ctrl::Refresh();
|
||||
#endif
|
||||
} else {
|
||||
DrawVArrow(w, popLT.x, popLT.y, popLT.x, popRB.y, 1, 4, 15, SColorHighlight());
|
||||
DrawHArrow(w, popLT.x, popRB.y, popRB.x, popRB.y, 1, 4, 15, SColorHighlight());
|
||||
#ifdef PLATFORM_WIN32
|
||||
Ctrl::Refresh(min(popLT.x-4, popRB.x-4), min(popLT.y-4, popRB.y-4),
|
||||
abs(popRB.x-popLT.x) + 9, abs(popRB.y-popLT.y) + 9);
|
||||
#endif
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -18,7 +18,8 @@ int GetKeyCodeX(int key) {
|
|||
if (key > 0x00ff)
|
||||
key = key | 0x01000000;
|
||||
|
||||
key = XKeysymToKeycode(dpy, key) + K_DELTA;
|
||||
key = XKeysymToKeycode(dpy, key);
|
||||
key += K_DELTA;
|
||||
|
||||
XFlush(dpy);
|
||||
XCloseDisplay(dpy);
|
||||
|
|
|
|||
7
uppsrc/ScatterCtrl/src.tpp/MouseBehavior$en-us.tppi
Normal file
7
uppsrc/ScatterCtrl/src.tpp/MouseBehavior$en-us.tppi
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
TITLE("1.1 MouseBehaviour")
|
||||
COMPRESSED
|
||||
120,156,181,85,107,111,219,54,20,253,43,4,218,14,73,145,6,124,232,101,233,75,178,60,26,99,137,85,196,217,178,85,16,108,61,152,136,40,45,6,18,85,35,75,147,223,190,75,201,171,237,204,154,179,34,243,7,193,226,189,231,220,195,67,234,222,8,189,125,139,247,240,27,188,229,231,31,243,155,164,145,58,142,48,32,8,32,6,14,27,96,130,177,75,8,102,212,197,204,182,8,97,148,18,151,186,148,96,219,231,101,30,71,194,178,188,32,161,118,240,229,151,112,16,80,192,82,192,50,151,48,207,102,196,162,14,60,8,35,212,166,204,34,30,29,88,30,99,30,246,51,153,212,117,28,165,22,109,49,108,143,189,33,12,74,96,119,128,93,203,181,45,70,45,74,28,98,19,11,27,24,72,241,75,85,205,18,185,169,164,181,181,164,139,125,161,249,44,142,36,245,188,22,99,3,134,186,54,108,199,242,44,143,48,215,131,138,14,197,152,98,151,66,89,230,81,219,207,121,157,197,209,153,19,24,83,28,99,163,237,128,89,14,196,45,11,67,190,177,198,98,32,157,50,155,12,
|
||||
108,199,79,249,173,40,227,232,97,242,136,162,154,4,232,167,56,66,15,15,196,88,124,192,96,9,7,239,222,161,232,253,193,14,165,131,93,11,141,179,68,107,94,29,233,74,78,125,255,66,53,53,255,153,23,201,87,161,170,56,126,124,4,52,144,0,194,252,161,129,191,150,62,93,207,55,11,181,174,154,76,251,40,58,216,193,251,120,159,218,246,46,67,221,98,28,49,52,137,163,247,12,173,87,49,204,204,148,184,42,68,189,200,109,42,142,224,5,210,114,164,21,50,46,84,34,229,72,23,28,165,11,32,82,55,237,251,204,176,161,121,193,203,46,95,148,171,155,218,71,67,13,75,153,108,128,164,205,255,194,239,83,149,84,57,74,202,124,1,206,84,153,11,45,84,105,50,18,189,215,177,101,106,118,39,5,207,225,85,72,137,100,210,148,89,209,82,8,72,135,18,80,44,201,12,108,127,205,38,188,102,250,233,14,161,222,238,199,246,121,64,150,7,128,62,53,169,20,25,186,224,179,148,87,232,92,212,250,31,134,91,255,106,120,211,58,158,65,100,205,111,148,42,37,227,9,
|
||||
84,48,161,214,94,219,16,142,185,54,94,130,191,176,129,27,100,24,81,145,212,102,13,156,189,171,120,13,238,173,239,196,9,94,44,35,145,186,71,5,68,122,69,28,74,221,171,225,191,42,168,11,113,211,167,161,141,245,170,24,155,232,171,233,144,188,87,134,9,245,170,232,174,162,73,65,105,163,181,42,95,77,209,76,228,185,228,61,154,186,224,22,85,93,210,255,163,235,186,224,252,217,13,22,165,94,209,214,38,188,76,224,220,164,174,232,171,148,148,63,44,175,18,183,69,223,73,182,177,45,154,218,156,215,246,172,107,56,254,223,45,238,176,125,109,63,179,246,223,82,210,176,235,118,221,242,162,116,215,194,76,143,236,90,39,72,49,196,245,106,3,76,42,254,189,243,181,205,51,75,74,192,250,29,177,32,54,14,66,28,60,61,61,17,10,83,16,10,141,194,233,228,240,232,106,24,142,62,124,27,169,213,142,184,49,125,124,116,25,158,159,127,248,54,206,204,225,116,34,111,171,228,174,168,251,49,159,195,240,98,58,57,155,78,78,70,128,252,172,212,172,70,133,170,196,159,
|
||||
170,212,137,148,247,136,151,50,169,96,238,221,174,210,161,237,124,151,39,199,27,249,42,158,55,217,51,186,45,108,191,173,169,251,202,43,13,35,162,87,219,118,178,31,151,102,76,62,11,175,167,147,225,232,52,4,163,11,53,135,99,45,225,171,186,81,112,5,82,248,66,186,129,104,88,22,87,149,39,18,253,222,78,196,63,224,244,85,5,49,152,111,27,152,59,125,215,195,209,113,120,221,233,51,3,215,104,153,195,84,84,115,84,115,201,51,51,26,211,251,229,120,222,160,176,189,6,211,201,249,201,233,213,242,50,180,221,239,251,198,250,81,151,195,143,103,43,176,238,75,123,1,238,215,79,75,80,115,247,18,4,108,115,180,196,192,6,203,103,168,118,88,198,241,95,69,81,112,91,
|
||||
|
||||
|
|
@ -1,9 +1,5 @@
|
|||
TOPIC("KeyBehavior$en-us")
|
||||
#include "KeyBehavior$en-us.tppi"
|
||||
END_TOPIC
|
||||
|
||||
TOPIC("ScatterAction$en-us")
|
||||
#include "ScatterAction$en-us.tppi"
|
||||
TOPIC("MouseBehavior$en-us")
|
||||
#include "MouseBehavior$en-us.tppi"
|
||||
END_TOPIC
|
||||
|
||||
TOPIC("ScatterCtrl$en-us")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue