: m_ExpansionState(0), m_Host(), m_Context(
nullptr)
64Create(parent,
id, pos,
size, style);
79SetBackgroundColour(*wxWHITE);
80SetBackgroundStyle(wxBG_STYLE_PAINT);
85wxColour bg = GetBackgroundColour();
87bg = wxSystemSettings::GetColour(wxSYS_COLOUR_3DFACE);
90dc.SetBrush(wxBrush(bg));
91dc.SetPen(wxPen(bg, 1));
93wxRect windowRect(wxPoint(0, 0), GetClientSize());
97CalcUnscrolledPosition(windowRect.x, windowRect.y, &windowRect.x, &windowRect.y);
99dc.DrawRectangle(windowRect);
108wxAutoBufferedPaintDC dc(
this);
109 constwxFont font(10, wxFONTFAMILY_SWISS, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_NORMAL,
false,
wxT(
"Consolas"));
110wxScrolledWindow::SetFont(font);
113SetScrollRate(dc.GetCharWidth(), dc.GetCharHeight());
129SetVirtualSize(
m_RootItem->GetSize() + wxSize(50, 50));
132SetVirtualSize(wxSize(0, 0));
138 if(event.LeftDown()) {
140CalcUnscrolledPosition(event.m_x, event.m_y, &pnt.x, &pnt.y);
168wxWindow* parent = GetParent();
170parent->ProcessWindowEvent(event);
174}
else if(event.LeftDClick()) {
176CalcUnscrolledPosition(event.m_x, event.m_y, &pnt.x, &pnt.y);
203wxSize
size= GetClientSize();
206CalcUnscrolledPosition(0, 0, &clipBox.x, &clipBox.y);
207CalcUnscrolledPosition(
size.GetWidth(),
size.GetHeight(), &clipBox.width, &clipBox.height);
212 if(rect_box.Intersects(clipBox)) {
239objSet.
insert(it->GetPointer());
241 if(objSet.
empty()) {
269wxSize sz = GetClientSize();
270wxRect rect(0, 0, sz.x, sz.y);
272wxRect rect2(item->GetRect());
273dc.SetClippingRegion(rect2.x, rect2.y, rect2.width, rect2.height);
275dc.DestroyClippingRegion();
288GetScrollPixelsPerUnit(&xUnit, &yUnit);
289Scroll(0,
m_Selected->GetPosition().y / yUnit);
322: m_Map(object_to_item) {}
428 classCSearchStringLocal
432: m_SearchTerm(search), m_CaseSensitive(case_sensitive), m_StartSearchItem(start_search), m_List(list), m_Count(0), m_Canceled() {}
438m_Canceled = &canceled;
443 IDesktopItem* GetFoundItem()
const{
returnm_FoundItem.GetNCPointerOrNull(); }
448 const string& m_SearchTerm;
449 boolm_CaseSensitive;
457 voidCSearchStringLocal::x_Execute()
459 if(m_StartSearchItem) {
460 autoit = find(m_List.begin(), m_List.end(), m_StartSearchItem);
461 while(!m_Canceled->IsCanceled() && it != m_List.end() && !(*it)->FindSearchItem(m_SearchTerm, m_CaseSensitive)) {
464 if(it != m_List.end()) {
470m_StartSearchItem = m_List.front();
490CSearchStringLocal find(search,
false, start_search,
m_DisplayList);
std::invoke_result< _Fty, ICanceled & >::type GUI_AsyncExec(_Fty &&_Fnarg, const wxString &msg=wxT("Accessing network..."))
Defines a scrollable canvas for drawing purposes.
TItemList m_DisplayList
List of items to be displayed.
void PaintBackground(wxDC &dc)
list< CIRef< IDesktopItem > > TItemList
void OnEraseBackground(wxEraseEvent &event)
void x_ScrollToSelectedItem()
void SetMainItem(IDesktopItem *main_item, int state=0)
void OnMouseEvent(wxMouseEvent &event)
Handler for all mouse events.
CIRef< IDesktopItem > m_RootItem
The root item to be displayed.
void x_OnContextMenu(wxContextMenuEvent &event)
CIRef< IDesktopItem > m_Selected
the selected item
void OnPaint(wxPaintEvent &event)
CIRef< IDesktopItem > FindItem(const wxPoint &pt) const
void SetContext(CDesktopViewContext *context)
void ObjectSelectionChanged()
CIRef< IDesktopItem > m_Highlighted
the highlighted item
void SetSelectedObjects(const TConstObjects &objs)
bool FindText(const string &search)
void GetSelectedObjects(TConstObjects &objects) const
unique_ptr< CDesktopViewContext > m_Context
void x_EraseItem(CIRef< IDesktopItem > item, wxDC &dc)
TObjectToItem m_ObjectToItem
virtual const CConstRef< CObject > GetAssociatedObject() const
virtual bool IsShown() const
Interface for testing cancellation request in a long lasting operation.
virtual wxPoint GetPosition() const =0
virtual void Draw(wxDC &dc, bool highlight=false) const =0
virtual wxSize GetSize() const =0
const_iterator end() const
const_iterator find(const key_type &key) const
iterator_bool insert(const value_type &val)
const_iterator begin() const
parent_type::iterator iterator
#define ITERATE(Type, Var, Cont)
ITERATE macro to sequence through container elements.
vector< CConstRef< CObject > > TConstObjects
TObjectType * GetPointer(void) const THROWS_NONE
Get pointer,.
void Reset(void)
Reset reference object.
#define END_NCBI_SCOPE
End previously defined NCBI scope.
#define BEGIN_NCBI_SCOPE
Define ncbi namespace.
virtual bool IsCanceled(void) const =0
string Execute(const string &cmmd, const vector< string > &args, const string &data=kEmptyStr)
double value_type
The numeric datatype used by the parser.
const struct ncbi::grid::netcache::search::fields::SIZE size
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