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/group__map__widget_8cpp_source.html below:

NCBI C++ ToolKit: src/gui/widgets/wx/group_map_widget.cpp Source File

37 #include <wx/dcbuffer.h> 39 #include <wx/settings.h> 55  static bool

icons_registered =

false

;

56  if

( ! icons_registered) {

59  wxT

(

"arrow_open.png"

));

61  wxT

(

"arrow_close.png"

));

62

icons_registered =

true

;

65  m_OpenIcon

= wxArtProvider::GetBitmap(

wxT

(

"map::arrow_open"

));

84

it_props.

m_BackColor

= wxSystemSettings::GetColour(wxSYS_COLOUR_WINDOW);

85

it_props.

m_TextColor

= wxSystemSettings::GetColour(wxSYS_COLOUR_WINDOWTEXT);

89

wxBoxSizer* sizer =

new

wxBoxSizer(wxHORIZONTAL);

106  for

(

size_t i

= 0;

i

< groups.size();

i

++ ) {

111  for

(

size_t

j = 0; j < items.size(); j++ ) {

149  string

s =

"Group \""

+

label

+

"\" already exist"

;

158  const string

& icon_alias,

const string

& descr,

bool

showDefault)

165

wxBitmap icon = wxArtProvider::GetBitmap(

ToWxString

(icon_alias));

182  string

s =

"Group \""

+ group_label +

"\" does not exist."

;

204  string

s =

"Group \""

+ group +

"\" does not exist."

;

252

curItem.

Reset

(grp_item);

298  for

(

size_t i

= 0;

i

< v_items.size();

i

++ ) {

314

wxCommandEvent event(wxEVT_COMMAND_LISTBOX_DOUBLECLICKED,

GetId

());

315  event

.SetEventObject(

this

);

318

(void)GetEventHandler()->ProcessEvent(event);

323

wxClientDC dc(

this

);

327  for

(

size_t

j = 0; j < group.m_Items.size(); ++j) {

331  if

(pitem == &item) {

361  const string

& descr,

373

m_ClickOnSpace(

false

)

394  if

(m_DefaultState == eDefaultNo) {

395

descr =

"Click to make '"

+

GetLabel

() +

"' default view.\n"

;

396

descr +=

"This view will be opened on double click on The Project View '"

+

397

m_Widget.GetInputCategory() +

"' object."

;

399  else if

(m_DefaultState == eDefaultYes) {

400

descr =

"Click to clear default view.\n"

;

401

descr +=

"Double click on The Project View '"

+ m_Widget.GetInputCategory() +

402  "' object will open this dialog."

;

421

pref_h = m_Icon.GetHeight();

424  int

label_h = x_PreferredLabelHeight(dc, props, width);

426

pref_h =

max

(pref_h, label_h);

427  if

(IsGroupSeparator()) {

433

pref_h += x_PreferredSeparatorHeight(dc);

441  return

IsGroupSeparator() ? 0 : 12;

451

wxFont font = props.

m_Font

;

452

font.SetWeight(wxFONTWEIGHT_NORMAL);

455

m_LabelRealW = x_CalculateRealTextWidth(dc, props);

457  if

(m_DefaultState != eDefaultHide) {

458  const char

* defText =

470

wxRect rc_back(m_Rect);

477

x_DrawBackground(dc, rc_back,

state

, props);

483

dc.DrawBitmap(m_Icon, m_IconPos.x, m_IconPos.y,

true

);

486  if

( ! m_Label.empty() && m_LabelRect.width > 0 && m_LabelRect.height > 0) {

489  if

(IsGroupSeparator()) {

490

dc.SetFont(props.

m_Font

);

493

wxFont font = props.

m_Font

;

494

font.SetWeight(wxFONTWEIGHT_NORMAL);

498

x_DrawText(dc, m_Label, m_LabelRect, selected, widget_focused, m_HotLabel, props);

500  if

(m_DefaultState != eDefaultHide && m_DefWidth > 0) {

501  const char

* defText =

503

wxRect defRect(m_LabelRect);

504

defRect.SetX(defRect.GetRight() - m_DefWidth);

506

wxFont font = props.

m_Font

;

507

font.SetWeight(wxFONTWEIGHT_NORMAL);

509

x_DrawText(dc, defText, defRect, selected, widget_focused, m_HotDef, props);

537

wxBrush brush(cl_back);

539

dc.DrawRectangle(rc.x, rc.y, rc.width, rc.height);

545  if

(IsGroupSeparator()) {

546

m_Widget.x_OnToggleGroup(*

this

);

548

m_Widget.x_OnSelectItem(*

this

);

555  if

(IsGroupSeparator())

560

wxRect rc(m_LabelRect);

561

rc.width = m_LabelRealW;

562

m_HotLabel = rc.Contains(ms_pos);

566  if

(!m_HotLabel && m_DefaultState != eDefaultHide && m_DefWidth > 0) {

567

wxRect defRect(m_LabelRect);

568

defRect.SetX(defRect.GetRight() - m_DefWidth);

569

m_HotDef = defRect.Contains(ms_pos);

572  return

m_HotLabel || m_HotDef;

577

m_ClickOnSpace = !m_HotLabel && !m_HotDef;

579  if

(IsGroupSeparator() || m_HotLabel) {

583

m_Widget.x_OnMakeDefaultItem(*

this

);

589  if

(!m_HotDef && !IsGroupSeparator() && m_ClickOnSpace)

CMapControl owns all its items.

virtual void AddItem(IwxMapItem *item)

virtual void DeleteAllItems()

@ eAdjustVertSize

widget adjusts its model space so that its vertical size fits into available viewport

SProperties & GetProperties()

virtual void InsertItem(TIndex index, IwxMapItem *item)

virtual void LockUpdates(bool lock=true)

block layout and repainting until control is unlocked

virtual TIndex GetSelectedIndex() const

virtual TItemRef GetItem(TIndex index)

virtual TIndex GetItemsCount() const

TIndex GetHotIndex() const

virtual SwxMapItemProperties & GetMapItemProperties()

virtual TIndex GetItemIndex(IwxMapItem &item) const

virtual void DeleteItem(TIndex index)

CMapItem This is a base class for IwxMapItem implementations.

void SetIcon(wxBitmap &image)

virtual void Layout(wxDC &dc, SwxMapItemProperties &props)

virtual bool IsGroupSeparator() const

const string & GetLabel() const

virtual void SelectItem(TIndex index, bool select=true)

virtual void SetStyle(int style)

virtual void RegisterFileAlias(const wxArtID &anId, const wxArtClient &aClient, const wxSize &aSize, const wxString &aName, long aType=wxBITMAP_TYPE_ANY, int anIndex=-1)

Include a standard set of the NCBI C++ Toolkit most basic headers.

#define NCBI_THROW(exception_class, err_code, message)

Generic macro to throw an exception, given the exception class, error code and message string.

string GetLabel(const CSeq_id &id)

const CSeq_id & GetId(const CSeq_loc &loc, CScope *scope)

If all CSeq_ids embedded in CSeq_loc refer to the same CBioseq, returns the first CSeq_id found,...

TObjectType * GetPointer(void) const THROWS_NONE

Get pointer,.

TObjectType * GetPointer(void) 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.

static const char label[]

const struct ncbi::grid::netcache::search::fields::SIZE size

int m_ItemOffsetY

horz space between an item and separation line or border

int m_ItemOffsetX

vertical space between separation lines and the borders

bool m_SeparateGroups

vert space around an item

int m_SepLineWidth

max item height

SwxMapItemProperties - properties of the IwxMapItem.

wxFileArtProvider * GetDefaultFileArtProvider()

wxString ToWxString(const string &s)

wxColour GetAverage(const wxColor &c1, const wxColor &c2, double ratio)


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