wxBrush saveBrush = dc.GetBrush();
71wxPen savePen = dc.GetPen();
76wxPoint dcOrigin =
context->GetDeviceOrigin();
77 context->SetDeviceOrigin(wxPoint(dcOrigin.x + updateRect.GetLeft(), dcOrigin.y + updateRect.GetTop()));
80itemSelRect = itemSelRect.Intersect(updateRect);
81itemSelRect.Offset(-updateRect.GetLeft(), -updateRect.GetTop());
82rect.SetPosition(wxPoint(-updateRect.GetLeft(), -updateRect.GetTop()));
85wxColor
color(128,128,64);
86dc.SetBrush(wxBrush(
color));
87dc.SetPen(wxPen(
color, 1));
89wxColor
color= dc.GetTextBackground().ChangeLightness(95);
90dc.SetBrush(wxBrush(
color));
91dc.SetPen(wxPen(
color, 1));
93dc.DrawRectangle(itemSelRect);
96wxColor
color(128,128,64);
97dc.SetPen(wxPen(
color, 1));
98 intyt = rect.GetTop();
99 intyb = rect.GetBottom();
100 if(yt < updateRect.GetHeight() && yb > 0) {
102dc.DrawLine(rect.GetLeft(), yt, rect.GetRight(), yt);
103 if(yb < updateRect.GetHeight())
104dc.DrawLine(rect.GetLeft(), yb, rect.GetRight(), yb);
106yb =
min(yb, updateRect.GetHeight() - 1);
107dc.DrawLine(rect.GetLeft(), yt, rect.GetLeft(), yb);
108dc.DrawLine(rect.GetRight(), yt, rect.GetRight(), yb);
112dc.SetBrush(saveBrush);
115 context->SetDeviceOrigin(dcOrigin);
126 if(itemSelRect.Contains(event.m_x, event.m_y)) {
131panel->SetCursor(wxCursor(wxCURSOR_ARROW));
135 if(
context->GetHighlightedItem() != 0) {
136 context->SetHighlightedItem(0);
139panel->SetCursor(wxCursor(wxCURSOR_IBEAM));
151 if(itemSelRect.Contains(event.m_x, event.m_y)) {
152 context->SelectItem(
m_Item, event.ControlDown(), event.ShiftDown());
154wxRect leftSpace(0, itemSelRect.GetTop(), itemSelRect.GetRight(), itemSelRect.GetHeight());
155 if(leftSpace.Contains(event.m_x, event.m_y))
156 context->SelectItem(0, event.ControlDown(), event.ShiftDown());
167wxRect itemSelRect = (
context->IsEditingEnabled() ||
event.ControlDown()) ?
170 if(itemSelRect.Contains(event.m_x, event.m_y)) {
void OnMouseMove(wxMouseEvent &event)
wxRect x_GetSelectionRect(CTextPanelContext *context) const
void x_DrawSelectionArea(wxDC &dc, const wxRect &updateRect, CTextPanelContext *context)
void OnLeftDClick(wxMouseEvent &event)
void OnLeftDown(wxMouseEvent &event)
void Draw(wxDC &dc, const wxRect &updateRect, CTextPanelContext *context)
CTextPanelContext * GetContext()
virtual wxSize GetSize() const =0
virtual int GetTextLeftMargin(CTextPanelContext *context) const =0
virtual wxRect GetRect() const
virtual const CConstRef< CObject > GetAssosiatedObject() const
#define END_NCBI_SCOPE
End previously defined NCBI scope.
#define BEGIN_NCBI_SCOPE
Define ncbi namespace.
static CS_CONTEXT * context
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4