mirror of
https://github.com/ultimatepp/ultimatepp.git
synced 2026-08-31 07:12:39 -06:00
CtrlLib: RichTextView now supports triple-click to select paragraph
git-svn-id: svn://ultimatepp.org/upp/trunk@6531 f0d560ea-af0d-0410-9eb7-867de7ffcac7
This commit is contained in:
parent
3a36180d3f
commit
93d544d91e
3 changed files with 15 additions and 3 deletions
|
|
@ -11,6 +11,7 @@ public:
|
|||
virtual void MouseMove(Point p, dword keyflags);
|
||||
virtual void LeftRepeat(Point p, dword keyflags);
|
||||
virtual void LeftDouble(Point p, dword keyflags);
|
||||
virtual void LeftTriple(Point p, dword keyflags);
|
||||
virtual void RightDown(Point p, dword keyflags);
|
||||
|
||||
private:
|
||||
|
|
|
|||
|
|
@ -214,6 +214,16 @@ void RichTextView::LeftDouble(Point p, dword keyflags)
|
|||
}
|
||||
}
|
||||
|
||||
void RichTextView::LeftTriple(Point p, dword keyflags)
|
||||
{
|
||||
int pos = GetPointPos(p);
|
||||
RichPos rp = text.GetRichPos(pos);
|
||||
anchor = pos - rp.posinpara;
|
||||
cursor = anchor + rp.paralen + 1;
|
||||
RefreshSel();
|
||||
SetFocus();
|
||||
}
|
||||
|
||||
void RichTextView::MouseMove(Point p, dword keyflags)
|
||||
{
|
||||
int pos = GetPointPos(p);
|
||||
|
|
|
|||
|
|
@ -171,7 +171,8 @@ nt]_[* Insert]([@(0.0.255) int]_[*@3 parentid], [@(0.0.255) int]_[*@3 i],
|
|||
], [@(0.0.255) int]_[*@3 cx]_`=_[@3 0], [@(0.0.255) int]_[*@3 cy]_`=_[@3 0],
|
||||
[@(0.0.255) bool]_[*@3 wo]_`=_[@(0.0.255) false])&]
|
||||
[s2; Inserts child item to parent specified by id. Distinct variants
|
||||
set various attributes to TreeCtrl`::Node of insterted item.&]
|
||||
set various attributes to TreeCtrl`::Node of insterted item. Returns
|
||||
id of new item.&]
|
||||
[s3; &]
|
||||
[s4; &]
|
||||
[s5;:TreeCtrl`:`:Add`(int`,const TreeCtrl`:`:Node`&`): [@(0.0.255) int]_[* Add]([@(0.0.255) i
|
||||
|
|
@ -191,7 +192,7 @@ mg], [_^Ctrl^ Ctrl][@(0.0.255) `&]_[*@3 ctrl], [@(0.0.255) int]_[*@3 cx]_`=_[@3
|
|||
[@(0.0.255) int]_[*@3 cy]_`=_[@3 0], [@(0.0.255) bool]_[*@3 withopen]_`=_[@(0.0.255) false])&]
|
||||
[s2; Inserts child item at the end of list of parent`'s child items.
|
||||
Parent is specified by id. Distinct variants set various attributes
|
||||
to TreeCtrl`::Node of insterted item.&]
|
||||
to TreeCtrl`::Node of insterted item. Returns id of new item.&]
|
||||
[s3; &]
|
||||
[s4; &]
|
||||
[s5;:TreeCtrl`:`:Remove`(int`): [@(0.0.255) void]_[* Remove]([@(0.0.255) int]_[*@3 id])&]
|
||||
|
|
@ -720,4 +721,4 @@ pen]([@(0.0.255) bool]_[*@3 b]_`=_[@(0.0.255) true])&]
|
|||
nSelect]([@(0.0.255) bool]_[*@3 b])&]
|
||||
[s2;%% Sets canselect flag.&]
|
||||
[s3; &]
|
||||
[s0; ]
|
||||
[s0; ]]
|
||||
Loading…
Add table
Add a link
Reference in a new issue