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

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

41 #include <wx/window.h> 44 #include <wx/button.h> 45 #include <wx/bmpbuttn.h> 46 #include <wx/stattext.h> 47 #include <wx/richtext/richtextctrl.h> 48 #include <wx/msgdlg.h> 49 #include <wx/dcbuffer.h> 50 #include <wx/settings.h> 51 #include <wx/clipbrd.h> 52 #include <wx/webview.h> 53 #include <wx/display.h> 67  if

(!m_Widget->HasCapture() && needs_capture) {

68

m_Widget->CaptureMouse();

71  if

(m_Widget->GetCaret() !=

NULL

)

72

m_Widget->GetCaret()->Hide();

73

m_Offset = wxGetMousePosition() - m_Dragee->GetPosition();

78  if

(

m_Widget

->HasCapture() && needs_capture) {

87  if

(!wxGetMouseState().LeftIsDown() &&

m_Dragging

) {

97

wxRect

r

=

m_Dragee

->GetParent()->GetScreenRect();

101

wxPoint new_pos = wxGetMousePosition() -

m_Offset

;

110

wxCommandEvent cmdevt(wxEVT_COMMAND_BUTTON_CLICKED,

eCmdMoveTip

);

112  m_Dragee

->GetParent()->GetEventHandler()->ProcessEvent(cmdevt);

139

: wxStaticText(parent,

wxID_ANY

,

wxT

(

"CStaticTextHandle"

),

140

wxDefaultPosition, wxDefaultSize, wxNO_BORDER)

141

, m_WidgetHandle(handle)

145

SetBackgroundColour(wxColor(255,255,225));

146

SetForegroundColour(wxColor(0, 0, 0));

154

wxStaticText::SetLabel(

label

);

155 #if defined(__WXOSX_CARBON__) || defined(__WXMAC_CARBON__) || defined(__WXOSX_COCOA__) 157

wxClientDC aDC(

this

);

158

wxSize client_size = aDC.GetMultiLineTextExtent(

label

);

159

SetClientSize(client_size);

163  void OnMouseDown

(wxMouseEvent& evt) { m_WidgetHandle->OnMouseDown(evt); }

164  void OnMouseUp

(wxMouseEvent& evt) { m_WidgetHandle->OnMouseUp(evt); }

168

m_WidgetHandle->OnMove(evt);

169  if

(!m_WidgetHandle->IsDragging()) {

175  void OnSize

(wxSizeEvent& evt) { Layout(); }

176  void OnKeyEvent

( wxKeyEvent& evt ){ m_WidgetHandle->OnKeyEvent(evt); }

177  void OnContextMenu

(wxContextMenuEvent& evt) {m_WidgetHandle->OnContextMenu(evt);}

182

DECLARE_EVENT_TABLE()

207

: wxRichTextCtrl(parent,

wxID_ANY

, wxEmptyString,

208

wxDefaultPosition, s,

209

wxNO_BORDER|wxTE_MULTILINE|wxTE_READONLY)

210

, m_WidgetHandle(handle)

211

, m_SelectionEnabled(

true

)

213

SetEditable(

false

);

214

SetTextCursor(wxCURSOR_ARROW);

219

SetBackgroundColour(wxColor(255,255,225));

220

SetForegroundColour(wxColor(0, 0, 0));

229

m_SelectionEnabled =

b

;

231  if

(m_SelectionEnabled) {

232

SetTextCursor(wxCURSOR_IBEAM);

236

SetTextCursor(wxCURSOR_ARROW);

245

{wxRichTextCtrl::DoSetVirtualSize(1,1);}

249  if

(m_SelectionEnabled) {

254  long

pos = GetCaretPosition();

256

wxPoint pt = ScreenToClient(wxGetMousePosition());

264  if

(GetStyle(pos,attr)) {

272

m_WidgetHandle->OnMouseDown(evt);

275  if

(m_SelectionEnabled) {

280  if

(m_WidgetHandle->IsDragging()) {

281

m_WidgetHandle->OnMouseUp(evt);

290  if

(m_SelectionEnabled) {

296

m_WidgetHandle->OnMove(evt);

297  if

(!m_WidgetHandle->IsDragging()) {

302  void OnKeyEvent

( wxKeyEvent& evt ){ m_WidgetHandle->OnKeyEvent(evt); }

303  void OnContextMenu

(wxContextMenuEvent& evt) {m_WidgetHandle->OnContextMenu(evt);}

306  void OnSize

(wxSizeEvent& evt) { LayoutContent(); }

312

DECLARE_EVENT_TABLE()

338

: wxHtmlWindow(parent,

wxID_ANY

, wxDefaultPosition, s,

339

wxHW_SCROLLBAR_NEVER

)

340

, m_WidgetHandle(handle)

341

, m_SelectionEnabled(

true

)

348

m_SelectionEnabled =

b

;

353

{wxHtmlWindow::DoSetVirtualSize(1,1);}

357  if

(m_SelectionEnabled) {

364

m_WidgetHandle->OnMouseDown(evt,

false

);

368  if

(m_SelectionEnabled) {

373  if

(m_WidgetHandle->IsDragging()) {

376

m_WidgetHandle->OnMouseUp(evt,

false

);

384  if

(m_SelectionEnabled) {

389

m_WidgetHandle->OnMove(evt);

392  void OnKeyEvent

( wxKeyEvent& evt ){ m_WidgetHandle->OnKeyEvent(evt); }

393  void OnContextMenu

(wxContextMenuEvent& evt) {m_WidgetHandle->OnContextMenu(evt);}

397

wxContextMenuEvent cevt;

398

evt.SetPosition(evt.GetPosition());

400

m_WidgetHandle->OnContextMenu(cevt);

404  void OnSize

(wxSizeEvent& evt) { Layout(); }

410

DECLARE_EVENT_TABLE()

447

, m_WidgetHandle(handle) {}

449  void OnMouseDown

(wxMouseEvent& evt) { m_WidgetHandle->OnMouseDown(evt); }

450  void OnMouseUp

(wxMouseEvent& evt) { m_WidgetHandle->OnMouseUp(evt); }

453

m_WidgetHandle->OnMove(evt);

454  if

(!m_WidgetHandle->IsDragging()) {

459  void OnSize

(wxSizeEvent& evt) { Layout(); }

460  void OnKeyEvent

( wxKeyEvent& evt ){ m_WidgetHandle->OnKeyEvent(evt); }

461  void OnContextMenu

(wxContextMenuEvent& evt) {m_WidgetHandle->OnContextMenu(evt);}

466

DECLARE_EVENT_TABLE()

501

,

const

wxString& title

505 #if defined(__WXOSX_CARBON__) || defined(__WXMAC_CARBON__) 506

,WindowGroupRef win_grp_ref

509

: wxFrame(parent,

wxID_ANY

, title, pos, wxDefaultSize,

510

#ifndef __WXOSX_COCOA__

511

wxFRAME_TOOL_WINDOW|wxFRAME_NO_TASKBAR|wxBORDER_SIMPLE|wxFRAME_FLOAT_ON_PARENT,

515  wxT

(

"Sticky Tooltip"

))

518

, m_PinButton(

NULL

)

519

, m_ElementActive(

false

)

520

, m_HighlightPanel(

NULL

)

522

, m_TextWidget(

NULL

)

523

, m_LaunchedBrowser(

false

)

524

, m_PopupDisplayed(

false

)

525

, m_LinkEventHandler(0)

527 #if defined(__WXOSX_CARBON__) || defined(__WXMAC_CARBON__) 528 #if( wxMAJOR_VERSION == 2 && wxMINOR_VERSION < 9 ) 529

ReleaseWindowGroup( GetWindowGroup((WindowRef)m_macWindow) );

531

ReleaseWindowGroup( GetWindowGroup(GetWXWindow()) );

535

SetWindowGroup( (WindowRef) MacGetTopLevelWindowRef(), win_grp_ref);

540  static bool

first_tip =

false

;

541  if

(first_tip ==

false

) {

565

m_HighlightPanel =

new CPanelHandle

(

this

, m_Handle, wxPoint(0,0), wxDefaultSize,

566

#ifdef __WXOSX_COCOA__

572

m_Handle->SetWindow(m_HighlightPanel);

576

m_BackgroundColour.Set(240, 240, 188);

578

p->SetBackgroundColour(m_BackgroundColour);

579

m_HighlightPanel->SetBackgroundColour(m_BackgroundColour);

581

wxBoxSizer* vbox =

new

wxBoxSizer(wxVERTICAL);

582

wxBoxSizer* hbox =

new

wxBoxSizer(wxHORIZONTAL);

588 #if defined(NCBI_OS_LINUX) 589

button_size = wxDefaultSize;

590 #elif defined(__WXOSX_COCOA__) 591

button_size = wxDefaultSize;

593

button_size = wxSize(17,17);

602  "pin_horizontal_pressed"

,

613  "search_img_pressed"

,

623  "mag_glass_pressed"

,

642  if

(hbox->GetChildren().size() > 0 || m_TipInfo.GetTitleText() !=

""

) {

649

tip_title->SetBackgroundColour(wxColor(240, 240, 188));

650

tip_title->SetForegroundColour(wxColor(0, 0, 0));

654

hbox->Add(tip_title, 0);

656

vbox->Add(hbox, 1, wxTOP|wxLEFT|wxRIGHT, 0);

658

title_width = hbox->GetMinSize().GetWidth();

666 #ifdef RICH_TEXT_TOOLTIP 667

x_CreateRichTextControl(p, title_width);

669

x_CreateHtmlTextControl(p, title_width, 500);

675

m_TextWidget->SetBackgroundColour(wxColor(255,255,225));

676

m_TextWidget->SetForegroundColour(wxColor(0, 0, 0));

678

m_TextWidget->SetSelectionEnabled(gui_reg.

GetBool

(

"GBENCH.Application.ViewOptions.EnableTooltipSelection"

,

true

));

683

vbox->Add(m_TextWidget, 0, wxGROW|wxLEFT|wxTOP, 0);

687

p->SetSizerAndFit(vbox);

689

wxBoxSizer* frame_sizer =

new

wxBoxSizer(wxHORIZONTAL);

690

frame_sizer->Add(m_HighlightPanel, 1, wxALL|wxGROW, 0);

691

frame_sizer->FitInside(

this

);

693

this->SetSizerAndFit(frame_sizer);

696

SetMinSize(wxSize(2, 2));

698

m_TargetSize = GetSize() + wxSize(2, 2);

702  int

display_idx = wxDisplay::GetFromPoint(pos);

703  if

(display_idx == wxNOT_FOUND)

704

display_idx = wxDisplay::GetFromWindow(parent);

706  if

(display_idx == wxNOT_FOUND)

709

wxDisplay display(display_idx);

710

wxRect geometry = display.GetGeometry();

711  int

right = (pos.x > geometry.width) ? geometry.GetRight() : geometry.width - 1;

712  if

((right - pos.x) < m_TargetSize.GetX()) {

713  int offset

= m_TargetSize.GetX() - (right - pos.x);

714

wxPoint newPos(pos.x -

offset

, pos.y);

730

this->SetClientData(

this

);

741 #ifdef __WXOSX_COCOA__ 743

wxWindow* pp = GetParent();

745  f

=

dynamic_cast<

wxFrame*

>

(pp);

746

pp = pp->GetParent();

758 #ifdef __WXOSX_COCOA__ 760

wxWindow* pp = GetParent();

762  f

=

dynamic_cast<

wxFrame*

>

(pp);

763

pp = pp->GetParent();

782  return

wxFrame::Show(show);

787  m_Pos

= this->GetScreenPosition() - this->GetParent()->GetScreenPosition();

798  if

(!GetParent()->IsShownOnScreen() && !about_to_show)

803

wxRect pr = GetParent()->GetScreenRect();

808  int

available_width = pr.x + pr.width -

r

.x;

810

new_width = available_width;

814  int

available_height = pr.y + pr.height -

r

.y;

816

new_height = available_height;

820  if

(new_width !=

r

.width ||

821

new_height !=

r

.height) {

822  if

((new_width < 8 || new_height < 8) && IsShown()) {

825  else if

(new_width > 10 && new_height > 10 && !IsShown()) {

834

SetSize(wxSize(new_width, new_height));

877

::wxLaunchDefaultBrowser(evt.GetString());

882

wxString href(evt.GetLinkInfo().GetHref());

886

::wxLaunchDefaultBrowser(href);

899

unique_ptr<wxMenu> menu(cmd_reg.

CreateMenu

(sPopupMenu));

900

PopupMenu(menu.get());

907  if

( wxTheClipboard->Open() )

910

wxTheClipboard->Close();

919

gui_reg.

Set

(

"GBENCH.Application.ViewOptions.EnableTooltipSelection"

, select_enabled);

930 #ifdef RICH_TEXT_TOOLTIP 932

evt.Enable(

m_TextWidget

->GetStringSelection().length() > 0);

935

evt.Enable(

m_TextWidget

->SelectionToText().length() > 0);

941  if

( wxTheClipboard->Open() )

943 #ifdef RICH_TEXT_TOOLTIP 950

wxString::iterator iter;

955  for

(iter =

str

.begin(); iter !=

str

.end(); ++iter) {

956  if

(*iter == wxRichTextLineBreakChar) {

962

wxTheClipboard->SetData(

new

wxTextDataObject(

str

));

963

wxTheClipboard->Close();

977

wxCommandEvent cmdevt(wxEVT_COMMAND_BUTTON_CLICKED,

eCmdReleaseTip

);

978

cmdevt.SetEventObject(

this

);

979

GetParent()->GetEventHandler()->ProcessEvent(cmdevt);

987

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

997  m_PinButton

->SetBitmapLabel(provider->GetBitmap(

wxT

(

"pin_horizontal"

)));

998  m_PinButton

->SetBitmapSelected(provider->GetBitmap(

wxT

(

"pin_horizontal_pressed"

)));

1001  m_PinButton

->SetBitmapLabel(provider->GetBitmap(

wxT

(

"pin_vertical"

)));

1002  m_PinButton

->SetBitmapSelected(provider->GetBitmap(

wxT

(

"pin_vertical_pressed"

)));

1015

wxSize text_extent(title_width, 0);

1016

wxFont font(font_size, wxFONTFAMILY_ROMAN, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_NORMAL);

1030

wxRichTextCtrl* text0 =

new

wxRichTextCtrl(p,

wxID_ANY

, wxEmptyString,

1033

text0->SetFont(font);

1034

text0->BeginAlignment(wxTEXT_ALIGNMENT_LEFT);

1035

text0->BeginFontSize(font_size);

1036

text0->BeginLineSpacing(wxTEXT_ATTR_LINE_SPACING_NORMAL);

1037

text0->BeginParagraphSpacing(0, 0);

1040  for

(

i

=0;

i

<truncated_lines.size(); ++

i

) {

1053

wxWindowDC dc(

this

);

1054

wxSize pixperinch = dc.GetPPI();

1055  int

pixel_margin_x = (

int

)(2.0f*((

float

)pixperinch.x)*(1.0f/72.0f)*

1056

(

float

)wxRICHTEXT_DEFAULT_MARGIN);

1057  int

pixel_margin_y = (

int

)(2.0f*((

float

)pixperinch.y)*(1.0f/72.0f)*

1058

(float)wxRICHTEXT_DEFAULT_MARGIN);

1060  int

cocoa_delta = 0;

1061 #ifdef __WXOSX_COCOA__ 1063

cocoa_delta += font_size/2;

1070

wxSize(text_extent.GetWidth() + pixel_margin_x + 2,

1071

text_extent.GetHeight() + pixel_margin_y + cocoa_delta));

1072  text

->SetFont(font);

1073  text

->BeginAlignment(wxTEXT_ALIGNMENT_LEFT);

1074  text

->BeginFontSize(font_size);

1075  text

->BeginLineSpacing(wxTEXT_ATTR_LINE_SPACING_NORMAL);

1076  text

->BeginParagraphSpacing(0, 0);

1078  for

(

i

=0;

i

<truncated_lines.size(); ++

i

) {

1082 #ifdef RICH_TEXT_TOOLTIP 1091

wxSize text_extent(title_width, 0);

1092

wxFont font(font_size, wxFONTFAMILY_ROMAN, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_NORMAL);

1098  bool

is_html =

false

;

1108

std::vector<string> truncated_lines;

1116

wxWindowDC dc(

this

);

1117

wxSize pixperinch = dc.GetPPI();

1118  int

pixel_margin_x = (

int

)(2.0f*((

float

)pixperinch.x)*(1.0f/72.0f)*

1119

(

float

)wxRICHTEXT_DEFAULT_MARGIN);

1120  int

pixel_margin_y = (

int

)(2.0f*((

float

)pixperinch.y)*(1.0f/72.0f)*

1121

(float)wxRICHTEXT_DEFAULT_MARGIN);

1129

html_text =

"<html><body><p>"

;

1132  for

(

i

=0;

i

<truncated_lines.size(); ++

i

) {

1133

html_text += truncated_lines[

i

];

1134  if

(

i

<truncated_lines.size()-1)

1135

html_text +=

"<BR>"

;

1138

html_text +=

"</p></body></html>"

;

1141

html_text = tip_text;

1152

text2->SetStandardFonts(font_size,

_

(

"Times New Roman"

), wxEmptyString);

1153

text2->SetBorders(0);

1154

text2->SetPage(html_text);

1164

wxHtmlContainerCell* cell = text2->GetInternalRepresentation();

1165  int

w1 = cell->GetMaxTotalWidth();

1169  if

(w1 == 0) w1 = cell->GetWidth();

1176

wxSize(w1 + pixel_margin_x, wxDefaultSize.GetHeight() ));

1177  text

->SetStandardFonts(font_size,

_

(

"Times New Roman"

), wxEmptyString);

1178  text

->SetBorders(0);

1179  text

->SetPage(html_text);

1184  int

h2 =

text

->GetInternalRepresentation()->GetHeight();

1185  text

->SetSizeHints(w1 + pixel_margin_x,

1186

h2 + pixel_margin_y);

1198

wxSize text_extent(title_width, 0);

1199

wxFont font(font_size, wxFONTFAMILY_ROMAN, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_NORMAL);

1203

wxWindowDC dc(

this

);

1204

wxSize pixperinch = dc.GetPPI();

1205  int

pixel_margin_x = (

int

)(2.0f*((

float

)pixperinch.x)*(1.0f/72.0f)*

1206

(

float

)wxRICHTEXT_DEFAULT_MARGIN);

1207  int

pixel_margin_y = (

int

)(2.0f*((

float

)pixperinch.y)*(1.0f/72.0f)*

1208

(float)wxRICHTEXT_DEFAULT_MARGIN);

1211

html_text =

"<table margin=\"0\" padding=\"0\" border=\"0\"><tr margin=\"0\" padding=\"0\" border=\"5\"><td valign=\"top\" align=\"right\" cellpadding=\"0\" nowrap=\"nowrap\"><span style=\"font-weight:bold; font-size:12pt\">Variation ID:</span></td><td valign=\"top\"><span style=\"font-weight:bold; font-size:12pt\">rs192879263</span></td></tr><tr margin=\"0\" padding=\"0\" border=\"5\"><td valign=\"top\" align=\"right\" cellpadding=\"0\" nowrap=\"nowrap\"><span style=\"font-weight:bold; font-size:12pt\">Variant Type:</span></td><td valign=\"top\"><span style=\"font-weight:bold; font-size:12pt\">SNP</span></td></tr><tr margin=\"0\" padding=\"0\" border=\"5\"><td valign=\"top\" align=\"right\" cellpadding=\"0\" nowrap=\"nowrap\"><span style=\"font-weight:bold; font-size:12pt\">Alleles:</span></td><td valign=\"top\"><span style=\"font-weight:bold; font-size:12pt\">A/G</span></td></tr></table> \ 1212 <p>total length: 1 \ 1213 <br>Position: 83,657,295<br> \ 1217 <a href=\"https://www.ncbi.nlm.nih.gov/snp/rs192879263\">SNP summary for rs192879263</a> \ 1225

text2->SetStandardFonts(font_size,

_

(

"Times New Roman"

), wxEmptyString);

1226

text2->SetBorders(0);

1227

text2->SetPage(html_text);

1236  int

w1 = text2->GetInternalRepresentation()->GetMaxTotalWidth();

1241

wxSize(w1 + pixel_margin_x, wxDefaultSize.GetHeight() ));

1242  text

->SetStandardFonts(font_size,

_

(

"Times New Roman"

), wxEmptyString);

1243  text

->SetBorders(0);

1244  text

->SetPage(html_text);

1249  int

h2 =

text

->GetInternalRepresentation()->GetHeight();

1250  text

->SetSizeHints(w1 + pixel_margin_x,

1251

h2 + pixel_margin_y);

1264  const char

* img_name,

1265  const char

* img_pressed_name,

1269

wxBitmapButton*

b

=

new

wxBitmapButton(p,

1274

wxBU_EXACTFIT|wxBORDER_NONE);

1276 #ifndef __WXOSX_COCOA__ 1277  b

->SetBitmapSelected(provider->GetBitmap(

ToWxString

(img_pressed_name)));

1279  b

->SetClientData(

this

);

1280  b

->SetBackgroundColour(wxColour(255, 255, 225));

1285

std::vector<std::string>

1290

std::vector<string> lines;

1291

std::vector<string> truncated_lines;

1293  if

(lines.size() > 0 &&

1294

lines[lines.size()-1] ==

""

)

1295

lines.erase(lines.begin() + lines.size()-1);

1297  for

(

size_t l

=0;

l

<lines.size(); ++

l

) {

1298  if

(lines[

l

].length() <= (

size_t

)max_line_len) {

1299

truncated_lines.push_back(lines[

l

]);

1308

string::size_type break_idx = max_line_len;

1309  int

break_priority = -1;

1310

string::size_type

b

= 70;

1311

string::size_type b_end = max_line_len;

1314  while

(remainder.length() > (

size_t

)max_line_len) {

1320

string::size_type url_start_idx = remainder.find(

"<a href=\""

, 0);

1326  if

(url_start_idx != string::npos && url_start_idx < (

size_t

)max_line_len) {

1329

string::size_type url_stop_idx = remainder.find(

"</a>"

,

1331

string::size_type text_start_idx = remainder.find(

"\">"

,

1335  if

(url_stop_idx != std::string::npos &&

1336

text_start_idx != std::string::npos) {

1338

text_start_idx += 2;

1340

string::size_type text_stop_idx = url_stop_idx -1;

1342

string::size_type url_text_len = text_stop_idx -

1345

string::size_type text_after_url = remainder.length() -

1360  if

(url_text_len >= (

size_t

)max_line_len) {

1361

truncated_lines.push_back(remainder.substr(0, url_start_idx));

1362

truncated_lines.push_back(remainder.substr(url_start_idx,

1363

url_stop_idx - url_start_idx + 1));

1364

remainder = remainder.substr(url_stop_idx+1, string::npos);

1369  else if

(url_start_idx + url_text_len > (

size_t

)max_line_len) {

1370

truncated_lines.push_back(remainder.substr(0, url_start_idx));

1371

remainder = remainder.substr(url_start_idx, string::npos);

1376  else if

(url_start_idx + url_text_len + text_after_url <= (

size_t

)max_line_len) {

1377

truncated_lines.push_back(remainder);

1388

b_end =

std::max

(url_stop_idx + 10,

1389

url_stop_idx + max_line_len - (url_text_len + url_start_idx));

1400  for

(;

b

<b_end; ++

b

) {

1401  if

(remainder[

b

] ==

';'

) {

1405  else if

(remainder[

b

] ==

' '

&&

1406

break_priority <= 5) {

1410  else if

(remainder[

b

] ==

':'

&&

1411

break_priority <= 4) {

1415  else if

(remainder[

b

] ==

'-'

&&

1416

break_priority <= 3) {

1420  else if

(remainder[

b

] ==

'.'

&&

1421

break_priority <= 2) {

1425  else if

(break_priority <= 1) {

1433

string::size_type start_idx = remainder.find_first_not_of(

' '

);

1434  if

(start_idx != std::string::npos &&

1435

start_idx < break_idx)

1436

truncated_lines.push_back(remainder.substr(start_idx, break_idx+1));

1437

remainder = remainder.substr(break_idx+1, string::npos);

1440  if

(remainder.length() > 0)

1441

truncated_lines.push_back(remainder);

1445  return

truncated_lines;

1451

wxSize& text_extent)

1453

wxString line_break = (wxChar) 29;

1455

wxRichTextAttr urlStyle;

1456

urlStyle.SetTextColour(*wxBLUE);

1457

urlStyle.SetFontUnderlined(

true

);

1466

std::string::size_type idx1 = 0;

1467

std::string::size_type idx2 = 0;

1468

std::string::size_type idx3 = 0;

1470

idx1 = remainder.find(

"<a href=\""

, 0);

1473  while

(idx1 != std::string::npos) {

1476

ctrl->WriteText(

ToWxString

(remainder.substr(0, idx1)));

1480

idx2 = remainder.find(

"\">"

, idx1);

1481  if

(idx2 != std::string::npos) {

1482  size_t

url_len = (idx2-1)-(idx1+8);

1483  std::string

url = remainder.substr(idx1+9, url_len);

1486

idx3 = remainder.find(

"</a>"

, idx2);

1487  if

(idx3 != std::string::npos) {

1488  size_t

description_len = idx3 - (idx2+2);

1489  std::string

url_text = remainder.substr(idx2+2, description_len);

1491

ctrl->BeginStyle(urlStyle);

1498

remainder = remainder.substr(idx3+4, remainder.size()-(idx3+4));

1502  _TRACE

(

"Invalid format: "

<<

l

.c_str());

1508  _TRACE

(

"Invalid format: "

<<

l

.c_str());

1514

idx1 = remainder.find(

"<a href=\""

, 0);

1518  if

(remainder !=

""

)

1522

ctrl->WriteText(line_break);

1526

rl = ctrl->GetBuffer().GetLineAtPosition(ctrl->GetLastPosition());

1528

text_extent.SetWidth(

std::max

(text_extent.GetWidth(), rl->GetSize().GetWidth()));

1529

text_extent.SetHeight(

std::max

(text_extent.GetHeight(),

1530

rl->GetPosition().y + rl->GetSize().GetHeight()));

static CGuiRegistry & GetInstance()

access the application-wide singleton

void Set(const string &key, int val)

set specific values

bool GetBool(const string &key, bool default_val=false) const

Rich Text helper class that allows mouse click and motion events to grab the control's parent object ...

bool GetSelectionEnabled() const

virtual void DoSetVirtualSize(int x, int y)

void OnMove(wxMouseEvent &evt)

virtual wxSize DoGetVirtualSize() const

void OnMouseDown(wxMouseEvent &evt)

CHtmlWindowtHandle(wxPanel *parent, CWidgetHandle *handle, wxSize s)

void OnContextMenu(wxContextMenuEvent &evt)

void OnKeyEvent(wxKeyEvent &evt)

void OnSize(wxSizeEvent &evt)

Need this (call Layout()) in derived classes to work with Sizers.

void SetSelectionEnabled(bool b)

void OnMouseUp(wxMouseEvent &evt)

void OnRightUp(wxMouseEvent &evt)

CWidgetHandle * m_WidgetHandle

Panel helper class that allows mouse click and motion events to grab the control's parent class and m...

CPanelHandle(wxWindow *parent, CWidgetHandle *handle, const wxPoint &pos, const wxSize &size, int style=0)

CWidgetHandle * m_WidgetHandle

void OnMove(wxMouseEvent &evt)

void OnContextMenu(wxContextMenuEvent &evt)

void OnMouseUp(wxMouseEvent &evt)

void OnSize(wxSizeEvent &evt)

Need this (call Layout()) in derived classes to work with Sizers.

void OnMouseDown(wxMouseEvent &evt)

void OnKeyEvent(wxKeyEvent &evt)

Rich Text helper class that allows mouse click and motion events to grab the control's parent object ...

void SetSelectionEnabled(bool b)

void OnMouseDown(wxMouseEvent &evt)

CWidgetHandle * m_WidgetHandle

void OnMouseUp(wxMouseEvent &evt)

void OnMove(wxMouseEvent &evt)

bool GetSelectionEnabled() const

void OnContextMenu(wxContextMenuEvent &evt)

virtual void DoSetVirtualSize(int x, int y)

CRichTextHandle(wxPanel *parent, CWidgetHandle *handle, wxSize s)

void OnKeyEvent(wxKeyEvent &evt)

void OnSize(wxSizeEvent &evt)

Need this (call Layout()) in derived classes to work with Sizers.

virtual wxSize DoGetVirtualSize() const

Static text helper class that allows mouse click and motion events to grab the control's parent objec...

CWidgetHandle * m_WidgetHandle

void OnSize(wxSizeEvent &evt)

Need this (call Layout()) in derived classes to work with Sizers.

void OnMouseDown(wxMouseEvent &evt)

CStaticTextHandle(wxPanel *parent, CWidgetHandle *handle)

void OnMove(wxMouseEvent &evt)

void OnContextMenu(wxContextMenuEvent &evt)

void OnKeyEvent(wxKeyEvent &evt)

void OnMouseUp(wxMouseEvent &evt)

void SetLabel(const wxString &label)

CUICommandRegistry is a centralized registry where all application commands should be registered.

static CUICommandRegistry & GetInstance()

the main instance associated with the application

wxMenu * CreateMenu(const SwxMenuItemRec *items)

create a menu from a static definition (see WX_*_MENU macros)

virtual bool OnLinkClicked(const wxString &href)=0

Invoked when an URL is clicked.

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

static const char * str(char *buf, int n)

EStickyToolTipCommands

Commands needed to mange sticky tool tip windows.

@ eCmdReleaseTip

User clicked somewhere on a tip.

@ eCmdCopySelectedTipText

User selected option to make text selectable.

@ eCmdMoveTip

Left mouse (or equiv) up inside tip area.

@ eCmdCopyTipText

Mouse left a tip (remove glyph highlight)

@ eCmdZoomTip

search (scroll) window to tip element

@ eCmdSelectTipText

User selected option to copy (all) tip text.

@ eCmdSearchTip

tool tip pinned or unpinned

@ eCmdInfoTip

zoom into tip element

@ eCmdPinTip

tool tip parent window hidden

#define END_NCBI_SCOPE

End previously defined NCBI scope.

#define BEGIN_NCBI_SCOPE

Define ncbi namespace.

static list< string > & Split(const CTempString str, const CTempString delim, list< string > &arr, TSplitFlags flags=0, vector< SIZE_TYPE > *token_pos=NULL)

Split a string using specified delimiters.

static SIZE_TYPE Find(const CTempString str, const CTempString pattern, ECase use_case=eCase, EDirection direction=eForwardSearch, SIZE_TYPE occurrence=0)

Find the pattern in the string.

@ eNocase

Case insensitive compare.

#define NCBI_GUIWIDGETS_WX_EXPORT

static const char label[]

unsigned int

A callback function used to compare two keys in a database.

static void text(MDB_val *v)

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

NCBI C++ auxiliary debug macros.

double r(size_t dimension_, const Int4 *score_, const double *prob_, double theta_)

ViewerWindowBase::OnEditMenu ViewerWindowBase::OnJustification EVT_MENU(MID_SHOW_GEOM_VLTNS, ViewerWindowBase::OnShowGeomVltns) EVT_MENU(MID_FIND_PATTERN

static SLJIT_INLINE sljit_ins l(sljit_gpr r, sljit_s32 d, sljit_gpr x, sljit_gpr b)

#define WX_DEFINE_MENU(name)

New macros for defining menus for use with CUICommandRegistry.

#define WX_MENU_ITEM(cmd)

#define WX_MENU_SEPARATOR()

wxFileArtProvider * GetDefaultFileArtProvider()

void RemoveChildWindow(wxFrame *parent, wxWindow *child)

For OSX Cocoa, removes child window connection (for layering) to parent.

wxString ToWxString(const string &s)

wxRect GetScreenRect(const wxWindow &win)

void AddChildWindowAbove(wxFrame *parent, wxWindow *child)

For OSX Cocoa, puts child window in front of (visually) parent.


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