A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from http://www.ncbi.nlm.nih.gov/IEB/ToolBox/CPP_DOC/doxyhtml/desktop__canvas_8cpp_source.html below:

NCBI C++ ToolKit: src/gui/widgets/seq_desktop/desktop_canvas.cpp Source File

43 #include <wx/settings.h> 44 #include <wx/dcclient.h> 46 #include <wx/dcbuffer.h> 62

: m_ExpansionState(0), m_Host(), m_Context(

nullptr

)

64

Create(parent,

id

, pos,

size

, style);

79

SetBackgroundColour(*wxWHITE);

80

SetBackgroundStyle(wxBG_STYLE_PAINT);

85

wxColour bg = GetBackgroundColour();

87

bg = wxSystemSettings::GetColour(wxSYS_COLOUR_3DFACE);

90

dc.SetBrush(wxBrush(bg));

91

dc.SetPen(wxPen(bg, 1));

93

wxRect windowRect(wxPoint(0, 0), GetClientSize());

97

CalcUnscrolledPosition(windowRect.x, windowRect.y, &windowRect.x, &windowRect.y);

99

dc.DrawRectangle(windowRect);

108

wxAutoBufferedPaintDC dc(

this

);

109  const

wxFont font(10, wxFONTFAMILY_SWISS, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_NORMAL,

false

,

wxT

(

"Consolas"

));

110

wxScrolledWindow::SetFont(font);

113

SetScrollRate(dc.GetCharWidth(), dc.GetCharHeight());

129

SetVirtualSize(

m_RootItem

->GetSize() + wxSize(50, 50));

132

SetVirtualSize(wxSize(0, 0));

138  if

(event.LeftDown()) {

140

CalcUnscrolledPosition(event.m_x, event.m_y, &pnt.x, &pnt.y);

168

wxWindow* parent = GetParent();

170

parent->ProcessWindowEvent(event);

174

}

else if

(event.LeftDClick()) {

176

CalcUnscrolledPosition(event.m_x, event.m_y, &pnt.x, &pnt.y);

203

wxSize

size

= GetClientSize();

206

CalcUnscrolledPosition(0, 0, &clipBox.x, &clipBox.y);

207

CalcUnscrolledPosition(

size

.GetWidth(),

size

.GetHeight(), &clipBox.width, &clipBox.height);

212  if

(rect_box.Intersects(clipBox)) {

239

objSet.

insert

(it->GetPointer());

241  if

(objSet.

empty

()) {

269

wxSize sz = GetClientSize();

270

wxRect rect(0, 0, sz.x, sz.y);

272

wxRect rect2(item->GetRect());

273

dc.SetClippingRegion(rect2.x, rect2.y, rect2.width, rect2.height);

275

dc.DestroyClippingRegion();

288

GetScrollPixelsPerUnit(&xUnit, &yUnit);

289

Scroll(0,

m_Selected

->GetPosition().y / yUnit);

322

: m_Map(object_to_item) {}

428  class

CSearchStringLocal

432

: m_SearchTerm(search), m_CaseSensitive(case_sensitive), m_StartSearchItem(start_search), m_List(list), m_Count(0), m_Canceled() {}

438

m_Canceled = &canceled;

443  IDesktopItem

* GetFoundItem()

const

{

return

m_FoundItem.GetNCPointerOrNull(); }

448  const string

& m_SearchTerm;

449  bool

m_CaseSensitive;

457  void

CSearchStringLocal::x_Execute()

459  if

(m_StartSearchItem) {

460  auto

it = 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()) {

470

m_StartSearchItem = m_List.front();

490

CSearchStringLocal 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