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

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

52 #include <wx/menuitem.h> 53 #include <wx/colordlg.h> 55 #include <wx/listctrl.h> 57 #include <wx/filename.h> 59 #include <wx/renderer.h> 60 #include <wx/dcmemory.h> 61 #include <wx/imaglist.h> 64 #import <Cocoa/Cocoa.h> 67 #ifdef __WXMAC_CARBON__ 68 #include <Carbon/carbon.h> 71 #include <wx/display.h> 80  if

(exeFile.IsEmpty())

83  if

(::wxIsAbsolutePath(exeFile)) {

84  if

(::wxFileExists(exeFile))

89

wxFileName fileName(exeFile);

90  if

(!fileName.GetPath().IsEmpty())

94

pathList.AddEnvList(

wxT

(

"PATH"

));

95  return

pathList.FindValidPath(exeFile);

99 void ReportIDError

(

const string

& id_label,

bool

is_local,

const string

& title)

101  string str

(

"<html><body>Failed to retrieve sequence for id "

);

105  str

+=

"For successful data display Genome Workbench requires that annotations and the reference sequences are imported into the same project."

;

107  str

+=

"For more details: <a href=https://www.ncbi.nlm.nih.gov/tools/gbench/tutorial27/>https://www.ncbi.nlm.nih.gov/tools/gbench/tutorial27/</a>"

;

109  str

+=

"</body></html>"

;

120  size_t

reported = -1;

121  size_t

used =

usage

.resident / 1024 / 1024;

122  if

(reported != used) {

124  LOG_POST

(

Info

<<

"Memory used: "

<< reported <<

"MB"

);

131

wxFileName fileName(path);

132

fileName.MakeAbsolute();

134  string file

(fileName.GetFullPath().ToUTF8());

135  string

dir(fileName.GetPathWithSep().ToUTF8());

139 #elif defined(__WXOSX__) 141 #elif defined(NCBI_OS_LINUX) 191 #include <Winnetwk.h> 193

UNIVERSAL_NAME_INFO* unameinfo;

194  DWORD

bufferLength = 1024;

196  const TCHAR

* name = localpath.data();

198

unameinfo = (UNIVERSAL_NAME_INFO*)&

buffer

;

199  DWORD result

= WNetGetUniversalName(localpath.data(), UNIVERSAL_NAME_INFO_LEVEL, (

LPVOID

)unameinfo, &bufferLength);

201  if

(

result

== NO_ERROR) {

202  return

unameinfo->lpUniversalName;

207  return

wxString::FromUTF8(path.c_str());

214  unsigned char

digest[16];

216  for

(

int i

= 0;

i

< 16; ++

i

) {

218

sprintf(

buf

,

"%02X"

, (

int

)digest[

i

]);

228  unsigned

displays = wxDisplay::GetCount();

229  _TRACE

(

"Displays: "

<< displays);

233  for

(

unsigned i

= 0;

i

< displays; ++

i

) {

234

wxDisplay display(

i

);

235

wxRect rect = display.GetGeometry();

237  _TRACE

(

"Display"

<<

i

<<

": "

<< rect.x <<

","

<< rect.y

238

<<

" "

<< rect.width <<

"x"

<< rect.height);

256  return

wxEmptyString;

259  size_t

src_size = s.size();

260  if

(src_size > 2 && s[0] ==

'['

&& s[src_size - 1] ==

']'

)

265  return

wxString::FromUTF8(decoded.c_str());

274  return string

(s.ToAscii());

283  if

(abs_path.StartsWith(

wxT

(

"http://"

)) || abs_path.StartsWith(

wxT

(

"https://"

)) || abs_path.StartsWith(

wxT

(

"ftp://"

)))

286

wxFileName absolute(abs_path);

287  if

(absolute.IsRelative())

290  if

(base.size() != 0) {

291

wxString ws_dir = wxFileName(base).GetPath();

292

wxFileName relative(abs_path);

293

relative.MakeRelativeTo(ws_dir);

294  return

relative.GetFullPath();

303  if

(rel_path.StartsWith(

wxT

(

"http://"

)) || rel_path.StartsWith(

wxT

(

"https://"

)) || rel_path.StartsWith(

wxT

(

"ftp://"

)))

306

wxFileName absolute(rel_path);

307  if

(absolute.IsAbsolute())

310  if

(base.size() != 0) {

311

wxString ws_dir = wxFileName(base).GetPath();

312

absolute.MakeAbsolute(ws_dir);

313  return

absolute.GetFullPath();

345  size_t n

=

in

.GetCount();

347  for

(

size_t i

= 0;

i

<

n

;

i

++ ){

355  size_t n

=

in

.size();

357  for

(

size_t i

= 0;

i

<

n

;

i

++ ){

368

wxMenu* menu =

new

wxMenu();

375  CMenuItem

& ch_item = *(*it)->GetValue();

379

wxMenuItem* wx_item =

NULL

;

385

menu->Append(

wxID_ANY

, wx_label, ch_menu);

389

wxItemKind kind = wxITEM_NORMAL;

400

item_id = wxID_SEPARATOR;

401

kind = wxITEM_SEPARATOR;

404

wx_item =

new

wxMenuItem(menu, item_id, wx_label, wx_help, kind);

408  if

( ! icon.empty()) {

410

wxBitmap

bmp

= wxArtProvider::GetBitmap(wx_alias);

412

wx_item->SetBitmap(

bmp

);

417

menu->Append(wx_item);

428

wxMenuItemList& items = menu.GetMenuItems();

429  ITERATE

( wxMenuItemList, it, items ){

430

wxMenuItem* item = *it;

431  if

( item->GetItemLabel() ==

text

){

441

wxMenu& menu,

const

wxString&

text 443

wxMenuItemList& items = menu.GetMenuItems();

444  ITERATE

( wxMenuItemList, it, items ){

445

wxMenuItem* item = *it;

446  if

( item->IsSeparator() && item->GetItemLabel() ==

text

){

456

wxMenuItemList::const_iterator begin,

457

wxMenuItemList::const_iterator end,

458  const

wxString&

text

,

459  bool

skip_named_groups

462  for

( wxMenuItemList::const_iterator it = begin; it != end; it++ ){

463

wxMenuItem* sub_item = *it;

464

wxString s = sub_item->GetItemLabel();

466  if

( skip_named_groups ){

467  if

( sub_item->IsSeparator() ){

476

}

else if

( s ==

text

){

488

wxMenuItemList& items = menu.GetMenuItems();

489  ITERATE

( wxMenuItemList, it, items ){

490  const

wxMenuItem* it_item = *it;

491  if

( it_item->IsSeparator() ){

492

named = ! it_item->GetItemLabel().empty();

499

menu.Append(

new

wxMenuItem( &menu, wxID_SEPARATOR ));

501

menu.Append( &item );

507

wxString s = item.GetItemLabel();

510  for

(

size_t i

= 0;

i

< s.size(); ++

i

) {

511  if

(s[

i

] ==

'_'

) {

524

wxMenu* sub_menu = item.GetSubMenu();

525

wxMenu* sub_menu_clone = sub_menu ?

CloneMenu

(*sub_menu) :

NULL

;

528

wxMenuItem::New(&menu, item.GetId(), s, item.GetHelp(),item.GetKind(), sub_menu_clone);

533 #if wxUSE_OWNER_DRAWN 534

clone->SetOwnerDrawn();

544  if

( item.IsCheckable() && item.GetKind() != wxITEM_RADIO ){

545

clone->Check( item.IsChecked() );

549

wxBitmap bitmap = item.GetBitmap();

550  if

( bitmap.IsOk() ){

551

clone->SetBitmap( bitmap );

561

wxMenu* new_menu =

new

wxMenu( menu.GetTitle() );

563  const

wxMenuItemList& items = menu.GetMenuItems();

564  ITERATE

( wxMenuItemList, it, items ){

565  const

wxMenuItem* item = *it;

568

new_menu->Append( new_item );

579 void Merge

( wxMenu& menu_1,

const

wxMenu& menu_2 )

581  typedef

wxMenuItemList::const_iterator TIter;

584

wxMenuItemList& items_1 = menu_1.GetMenuItems();

588

TIter grp_begin = items_1.begin();

589

TIter grp_end = items_1.end();

591  const

wxMenuItemList& items_2 = menu_2.GetMenuItems();

592  ITERATE

( wxMenuItemList, it_2, items_2 ){

594  const

wxMenuItem* sub_item = *it_2;

595

wxString

label

= sub_item->GetItemLabel();

597  if

( sub_item->IsSeparator() ){

603  if

( grp_begin != items_1.end() ){

606  for

( grp_end++; grp_end != items_1.end(); grp_end++ ){

607  const

wxMenuItem* it_item = *grp_end;

608  if

( it_item->IsSeparator() ){

615

menu_1.Append( wxID_SEPARATOR, clean_label );

620

grp_begin = items_1.begin();

621

grp_end = items_1.end();

628  if

( it_target != grp_end ){

630

wxMenuItem* target_sub_item = *it_target;

631

wxMenu* sub_menu_1 = target_sub_item->GetSubMenu();

632

wxMenu* sub_menu_2 = sub_item->GetSubMenu();

634  if

( sub_menu_1 && sub_menu_2 ){

636  Merge

( *sub_menu_1, *sub_menu_2 );

643  _ASSERT

( grp_begin != items_1.end() );

644  if

( grp_end != items_1.end() ){

646

wxMenuItem* sub_item = *grp_end;

647  for

(

size_t

pos = 0; pos < menu_1.GetMenuItemCount(); pos++ ){

648

wxMenuItem* pos_item = menu_1.FindItemByPosition( pos );

649  if

( pos_item == sub_item ){

650

menu_1.Insert( pos, clone );

656

menu_1.Append( clone );

670  for

(

size_t i

= 0;

i

< menu.GetMenuItemCount(); ){

671

wxMenuItem* item = menu.FindItemByPosition(

i

);

673  if

( item->IsSeparator() ){

674  if

(

i

== 0 ||

i

== menu.GetMenuItemCount() - 1 ){

678

wxMenuItem* next_item = menu.FindItemByPosition(

i

+ 1 );

680  remove

= next_item->IsSeparator();

682

}

else if

( item->IsSubMenu() ){

696 #if wxUSE_OWNER_DRAWN 701

item = menu.Append( 20000,

wxT

(

"Dummy"

) );

702

item->SetMarginWidth( item->GetDefaultMarginWidth() );

703

menu.Destroy( item );

712

item->SetMarginWidth(

bmp

->GetWidth() );

729

wxWindow* focused = wxWindow::FindFocus();

731  if

( m_Window !=

NULL

){

732

wxWindow* wid = focused;

733  while

( wid !=

NULL

){

734  if

( wid == m_Window ){

737

wid = wid->GetParent();

745  if

( focused ==

NULL

){

750

focused->GetEventHandler()->

751

#

if

( wxMAJOR_VERSION == 2 && wxMINOR_VERSION < 9 )

752

wxEvtHandler::ProcessEvent( event )

754

ProcessEvent( event )

785

wxRect rc = win.GetRect();

786  if

( win.GetParent() ){

787

wxPoint pos = rc.GetLeftTop();

788

wxPoint screen_pos = win.GetParent()->ClientToScreen( pos );

789

rc.SetLeftTop( screen_pos );

796 #if defined(NCBI_OS_MSWIN) 797

WXHWND hwnd = win.GetHWND();

803 static unsigned char s_Average

(

unsigned char

c1,

unsigned char

c2,

double

ratio )

805  double

res = ratio * c1 + (1.0 - ratio) * c2;

806  return

(

unsigned char

) res;

810

wxColour

GetAverage

(

const

wxColor& c1,

const

wxColor& c2,

double

ratio )

812  unsigned char r

=

s_Average

( c1.Red(), c2.Red(), ratio );

813  unsigned char g

=

s_Average

( c1.Green(), c2.Green(), ratio );

814  unsigned char b

=

s_Average

( c1.Blue(), c2.Blue(), ratio );

815  unsigned char a

=

s_Average

( c1.Alpha(), c2.Alpha(), ratio );

816  return

wxColour(

r

,

g

,

b

,

a

);

822  static

wxString sc_ellipsis(

wxT

(

"..."

));

824

wxSize sz = dc.GetTextExtent(s);

826  int n

= (

int

)s.size();

841

wxSize el_sz = dc.GetTextExtent(sc_ellipsis);

849

dc.GetPartialTextExtents(s, widths);

852  double

K = ((double) w_av) / full_w;

855  int

new_w = widths[

len

];

858  for

( ; new_w > w_av && --

len

> 0; ){

859

new_w = widths[

len

];

862  for

( ; new_w < w_av && ++

len

<

n

; ){

863

new_w = widths[

len

];

880  static

wxString sc_ellipsis(

wxT

(

"..."

));

883  int n

= (

int

)s.size();

885

wxString res(s,

len

);

895 void WrapText

(wxDC& dc,

const string

&

text

,

int

w, vector<int>& line_lens)

897  static string

spaces(

" \t\n"

);

899  int

text_len = (

int

)

text

.size();

900  const char

* s =

text

.c_str();

901  for

(

int

pos = 0; pos < text_len; ) {

902  int

line_start = pos;

904

string::size_type after_word_end =

905  text

.find_first_of(spaces, line_start);

906  if

(after_word_end == string::npos) {

907

after_word_end = text_len;

909  int

line_len = (

int

)(after_word_end - line_start);

912

dc.GetTextExtent(

ToWxString

(s + line_start, line_len), &line_w, &t_h);

918  int

p = (

int

)after_word_end;

919  for

( ; p < text_len; p++ ) {

920  if

(spaces.find(s[p]) != string::npos) {

922

wxString wx_s =

ToWxString

(s + line_start, p - line_start);

924

dc.GetTextExtent(wx_s, &cw, &t_h);

931

after_word_end =

text

.find_first_of(spaces, p);

932  if

(after_word_end == string::npos) {

933

after_word_end = text_len;

935

wxString wx_s =

ToWxString

(s + line_start, after_word_end - line_start);

937

dc.GetTextExtent(wx_s, &cw, &t_h);

942

p = (

int

)(after_word_end - 1);

946

line_len = p - line_start;

949  const char

* ss = s + line_start;

950

wxString wx_ss =

ToWxString

(ss, line_len - 1);

953

line_len = text_len - line_start;

956

line_lens.push_back(line_len);

964  const

wxArtClient& aClient,

965  const

wxSize& aSize )

967  if

( aClient != wxART_OTHER ){

971  int

pos = anId.Find(

wxT

(

"::"

) );

972  if

( pos == wxNOT_FOUND ){

976

wxString new_cli = anId.Mid( 0, pos );

977

wxString new_id = anId.Mid( pos+2 );

979  if

( new_cli.IsSameAs(

wxT

(

"menu"

) ) ){

980

new_cli = wxART_MENU;

981

}

else if

( new_cli.IsSameAs(

wxT

(

"wm"

) ) ){

982

new_cli = wxART_FRAME_ICON;

990

new_cli +=

wxT

(

"_C"

);

993  return

wxArtProvider::GetBitmap( new_id, new_cli, aSize );

1005  return CRgbaColor

(c.Red(), c.Green(), c.Blue(), c.Alpha());

1011

view.

Set

(

"x"

, rc.x);

1012

view.

Set

(

"y"

, rc.y);

1013

view.

Set

(

"width"

, rc.width);

1014

view.

Set

(

"height"

, rc.height);

1020

rc.x = view.

GetInt

(

"x"

, rc.x);

1021

rc.y = view.

GetInt

(

"y"

, rc.y);

1022

rc.width = view.

GetInt

(

"width"

, rc.width);

1023

rc.height = view.

GetInt

(

"height"

, rc.height);

1028 #ifdef NCBI_OS_MSWIN 1029  int

disp_x = GetSystemMetrics(SM_XVIRTUALSCREEN);

1030  int

disp_y = GetSystemMetrics(SM_YVIRTUALSCREEN);

1031  int

disp_w = GetSystemMetrics(SM_CXVIRTUALSCREEN);

1032  int

disp_h = GetSystemMetrics(SM_CYVIRTUALSCREEN);

1033

rc.width = rc.width > disp_w ? disp_w : rc.width;

1034

rc.height = rc.height > disp_h ? disp_h : rc.height;

1035

rc.x = rc.x < disp_x + 1 ? disp_x + 1 : rc.x;

1036

rc.y = rc.y < disp_y + 1 ? disp_y + 1 : rc.y;

1037 #elif __WXOSX_COCOA__ 1048  int

monitors = [NSScreen screens].count;

1055  for

(

int i

=0;

i

<monitors; ++

i

) {

1056

NSScreen* s = [[NSScreen screens] objectAtIndex:

i

];

1057

NSRect visible_frame = [s visibleFrame];

1062  int

x = visible_frame.origin.x + visible_frame.size.width;

1064  int

flipped_y = -visible_frame.origin.y;

1065  int

y = flipped_y + visible_frame.size.height;

1069  if

(visible_frame.origin.x < minx)

1070

minx = visible_frame.origin.x;

1074  if

(flipped_y < miny)

1079  if

(rc.x + rc.width > maxx) {

1080

rc.x = maxx - rc.width;

1084  if

(rc.width > maxx-minx)

1085

rc.width = maxx-minx;

1089  if

(rc.y + rc.height > maxy) {

1090

rc.y = maxy - rc.height;

1094  if

(rc.height > maxy-miny)

1095

rc.height = maxy-miny;

1102  if

(rc.y < menubar_height) {

1103

rc.y = menubar_height;

1104  if

(rc.y + rc.height > maxy) {

1105

rc.height -= menubar_height;

1119

wxColourDialog dialog(parent, &

data

);

1120  if

(dialog.ShowModal() == wxID_OK)

1122

wxColourData retData = dialog.GetColourData();

1123

wxColour col = retData.GetColour();

1124  color

.Set(col.Red(), col.Green(), col.Blue());

1132

wxWindow *res =

NULL

;

1134  ITERATE

( wxWindowList, wit, parent->GetChildren() ){

1135

wxWindow *child = *wit;

1137  if

( child->GetId() ==

id

){

1153

wxCommandEvent evt(wxEVT_COMMAND_BUTTON_CLICKED, cmd_id);

1154

evt.SetInt(cmd_data);

1156

evt.StopPropagation();

1158

window->GetEventHandler()->ProcessEvent(evt);

1160

wxWindowList& list = window->GetChildren();

1161  ITERATE

( wxWindowList, wit, list ){

1162

wxWindow *current = *wit;

1171

wxClassInfo* classInfo = wxClassInfo::FindClass(

wxT

(

"wxGenericListCtrl"

));

1172  if

(classInfo == 0 || !listCtrl.IsKindOf(classInfo))

1175  ITERATE

( wxWindowList, wit, listCtrl.GetChildren() ){

1176

wxWindow *child = *wit;

1178  if

(child->GetName() ==

wxT

(

"panel"

)) {

1190  m_ListCtrl

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

1196 #ifdef __WXOSX_COCOA__ 1197

wxNonOwnedWindow* nowin =

dynamic_cast<

wxNonOwnedWindow*

>

(child);

1200

NSWindow* mac_win = nowin->GetWXWindow();

1202  if

(mac_win !=

NULL

) {

1203

NSWindow* mac_window = parent->GetWXWindow();

1204

[mac_window addChildWindow:mac_win ordered:NSWindowAbove];

1211 #ifdef __WXOSX_COCOA__ 1212

wxNonOwnedWindow* nowin =

dynamic_cast<

wxNonOwnedWindow*

>

(child);

1215

NSWindow* mac_win = nowin->GetWXWindow();

1217  if

(mac_win !=

NULL

) {

1218

NSWindow* mac_window = parent->GetWXWindow();

1219

[mac_window addChildWindow:mac_win ordered:NSWindowBelow];

1226 #ifdef __WXOSX_COCOA__ 1227

wxNonOwnedWindow* nowin =

dynamic_cast<

wxNonOwnedWindow*

>

(child);

1230

NSWindow* mac_win = nowin->GetWXWindow();

1232  if

(mac_win !=

NULL

) {

1233

NSWindow* mac_window = parent->GetWXWindow();

1234

[mac_window removeChildWindow:mac_win];

1243

CGFloat menuBarHeight = [[NSApp mainMenu] menuBarHeight];

1244

menubar_height = (

int

) menuBarHeight;

1246 #ifdef __WXMAC_CARBON__ 1250

HIWindowGetAvailablePositioningBounds(kCGNullDirectDisplay,

1251

kHICoordSpaceScreenPixel,

1253

maxy =

r

.size.height - menubar_height;

1256

menubar_height *= 2;

1260

NSWindow* nswin = win->GetWXWindow();

1261

NSScreen* screen = [nswin deepestScreen];

1263  if

(screen !=

NULL

) {

1264

NSRect visible_frame = [screen visibleFrame];

1265

maxy = visible_frame.size.height;

1266

maxx = visible_frame.size.width;

1277  if

(NSEventModifierFlagOption & [ NSEvent modifierFlags ]) {

1295 #ifdef _VISTA_WORKAROUND_ 1296  static int

size_change = 1;

1300

win->GetSize(&w, &h);

1301

win->SetSize(w+size_change, h);

1313 #ifdef __WXOSX_COCOA__ 1314

NSScreen* screen = [NSScreen mainScreen];

1315  if

(screen !=

NULL

) {

1316

NSDictionary *description = [screen deviceDescription];

1317  if

(description !=

NULL

) {

1318

NSSize displayPixelSize = [[description objectForKey:NSDeviceSize] sizeValue];

1319

CGSize displayPhysicalSize = CGDisplayScreenSize(

1320

[[description objectForKey:

@"NSScreenNumber"

] unsignedIntValue]);

1322

s.SetWidth(

int

((displayPixelSize.width/displayPhysicalSize.width)*25.4f));

1323

s.SetHeight(s.GetWidth());

1328  _TRACE

(

"Screen DPI: (w,h): "

<< s.GetWidth() <<

","

<< s.GetHeight() <<

")"

);

1331  return

wxGetDisplayPPI();

1337  static bool

initialized =

false

;

1338  static bool

insideNCBI =

false

;

1342

initialized =

true

;

1358  int

width = renderer.GetCheckBoxSize(wnd).GetWidth();

1359  int

height = renderer.GetCheckBoxSize(wnd).GetHeight();

1361

wxImageList* imageList =

new

wxImageList(width, height,

TRUE

);

1363

wxBitmap unchecked_bmp(width, height),

1364

checked_bmp(width, height),

1365

unchecked_disabled_bmp(width, height),

1366

checked_disabled_bmp(width, height);

1368

wxMemoryDC renderer_dc;

1370

wxColor bkgColor = wnd->GetBackgroundColour();

1373

renderer_dc.SelectObject(unchecked_bmp);

1374

renderer_dc.SetBackground(*wxTheBrushList->FindOrCreateBrush(bkgColor));

1375

renderer_dc.Clear();

1376

renderer.DrawCheckBox(wnd, renderer_dc, wxRect(0, 0, width, height), 0);

1379

renderer_dc.SelectObject(checked_bmp);

1380

renderer_dc.SetBackground(*wxTheBrushList->FindOrCreateBrush(bkgColor));

1381

renderer_dc.Clear();

1382

renderer.DrawCheckBox(wnd, renderer_dc, wxRect(0, 0, width, height), wxCONTROL_CHECKED);

1385

renderer_dc.SelectObject(unchecked_disabled_bmp);

1386

renderer_dc.SetBackground(*wxTheBrushList->FindOrCreateBrush(bkgColor));

1387

renderer_dc.Clear();

1388

renderer.DrawCheckBox(wnd, renderer_dc, wxRect(0, 0, width, height), 0 | wxCONTROL_DISABLED);

1391

renderer_dc.SelectObject(checked_disabled_bmp);

1392

renderer_dc.SetBackground(*wxTheBrushList->FindOrCreateBrush(bkgColor));

1393

renderer_dc.Clear();

1394

renderer.DrawCheckBox(wnd, renderer_dc, wxRect(0, 0, width, height), wxCONTROL_CHECKED | wxCONTROL_DISABLED);

1397

renderer_dc.SelectObject(wxNullBitmap);

1400

imageList->Add(unchecked_bmp);

1401

imageList->Add(checked_bmp);

1402

imageList->Add(unchecked_disabled_bmp);

1403

imageList->Add(checked_disabled_bmp);

Checksum and hash calculation classes.

CChecksum – Checksum calculator.

void OnUpdateUIEvent(wxUpdateUIEvent &event)

void OnCommandEvent(wxCommandEvent &event)

void OnMenuEvent(wxCommandEvent &event)

void OnChildFocus(wxCommandEvent &event)

void ConnectToControl(wxListCtrl &listCtrl)

class CRegistryReadView provides a nested hierarchical view at a particular key.

int GetInt(const string &key, int default_val=0) const

access a named key at this level, with no recursion

void Set(const string &key, int val)

access a named key at this level, with no recursion

class CRgbaColor provides a simple abstraction for managing colors.

static wxString ResolvePathExisting(const wxString &path, const wxString &delim=wxT(","))

Utility function to hide the platform specifics of locating our standard directories.

void SetText(wxString value)

virtual wxBitmap CreateBitmap(const wxArtID &id, const wxArtClient &client, const wxSize &size)

int AddDirectory(wxString aDirName)

std::ofstream out("events_result.xml")

main entry point for tests

thread_local unique_ptr< FtaMsgPost > bmp

static void DLIST_NAME() remove(DLIST_LIST_TYPE *list, DLIST_TYPE *item)

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

#define ITERATE(Type, Var, Cont)

ITERATE macro to sequence through container elements.

@ eFollowLinks

Follow symbolic links.

void AddLine(const char *line, size_t len)

void GetMD5Digest(unsigned char digest[16]) const

Return calculated MD5 digest.

#define LOG_POST(message)

This macro is deprecated and it's strongly recomended to move in all projects (except tests) to macro...

void Info(CExceptionArgs_Base &args)

static CResult SpawnLP(EMode mode, const char *cmdname, const char *argv,...)

Spawn a new process with variable number of command-line arguments and find file to execute from the ...

@ eNoWait

Continues to execute calling process concurrently with new process (asynchronous spawn).

static string NormalizePath(const string &path, EFollowLinks follow_links=eIgnoreLinks)

Normalize a path.

static string CreateAbsolutePath(const string &path, ERelativeToWhat rtw=eRelativeToCwd)

Get an absolute path from some, possibly relative, path.

unsigned char GetRedUC(void) const

Get specific channels in unsigned char values.

unsigned char GetGreenUC(void) const

unsigned char GetAlphaUC(void) const

TItemNode::TNodeList_CI TChildItem_CI

TChildItem_I SubItemsBegin()

TChildItem_I SubItemsEnd()

const string & GetImageAlias() const

const string & GetLabel() const

unsigned char GetBlueUC(void) const

static string base64Decode(const string &str)

static string base64Encode(const string &str)

const TCmdID & GetCommand() const

const string & GetTooltip() const

static bool GetMemoryUsage(SMemoryUsage &usage)

Get current process memory usage.

#define END_NCBI_SCOPE

End previously defined NCBI scope.

#define BEGIN_NCBI_SCOPE

Define ncbi namespace.

static string Int8ToString(Int8 value, TNumToStringFlags flags=0, int base=10)

Convert Int8 to string.

static string IntToString(int value, TNumToStringFlags flags=0, int base=10)

Convert int to string.

static bool IsNcbiInhouseClient(void) THROWS_NONE

Return TRUE if the client is inside NCBI, FALSE otherwise.

static const char label[]

unsigned int

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

static void text(MDB_val *v)

const TYPE & Get(const CNamedParameterList *param)

#define TRUE

bool replacment for C indicating true.

Defines a portable execute class.

Defines classes: CDirEntry, CFile, CDir, CSymLink, CMemoryFile, CFileUtil, CFileLock,...

std::istream & in(std::istream &in_, double &x_)

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

Process memory usage information, in bytes.

int g(Seg_Gsm *spe, Seq_Mtf *psm, Thd_Gsm *tdg)

void SetMenuItemMarginWidth(wxMenuItem *item, wxBitmap *bmp)

Set margin width for menu item.

void BroadcastCommandToChildWindows(wxWindow *window, int cmd_id, int cmd_data)

Sends command event with id 'cmd_id' to window and all its children.

void OpenFileBrowser(const wxString &path)

void GetMacDragWindowBounds(wxTopLevelWindow *win, int &menubar_height, int &maxy, int &maxx)

Returns window boundaries for mac (top menubar width and max height)

bool sf_FileArtProviderPushed

wxMenu * CreateMenu(const CMenuItem *item)

Creates a wxMenu object replicating the structure of CMenuItem.

static unsigned char s_Average(unsigned char c1, unsigned char c2, double ratio)

static void s_InsertInUnnamedGroup(wxMenu &menu, wxMenuItem &item)

wxColour ConvertColor(const CRgbaColor &c2)

wxString ToRelativePath(const wxString &base, const wxString &abs_path)

converts an absolute path to a relative one based on current workspace directory

void LoadWindowRectFromRegistry(wxRect &rc, const CRegistryReadView &view)

void InitDefaultFileArtProvider(const wxString &dir)

wxString GetAbsolutePath(const wxString &localpath)

wxFileArtProvider * GetDefaultFileArtProvider()

void UseDefaultMarginWidth(wxMenu &menu)

Using default menu item margin width.

void FromArrayString(const wxArrayString &in, vector< string > &out)

int TruncTextLength(wxDC &dc, const wxString &s, int w, Ewx_Truncate trunc)

returns number of characters representing a truncated version of "s" which fits in the gievn width "w...

void Merge(wxMenu &menu_1, const wxMenu &menu_2)

This function merges the content of menu_2 into menu_1 based on equivalence of item labels Menu trees...

void RemoveChildWindow(wxFrame *parent, wxWindow *child)

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

void AddChildWindowBelow(wxFrame *parent, wxWindow *child)

For OSX Cocoa, puts child window behind the parent.

string GetVideoId()

Returns id of video configuration to be used for saving settings.

string GetMD5Digest(const CChecksum &cs)

wxString TruncateText(wxDC &dc, const wxString &s, int w, Ewx_Truncate trunc)

truncates given string so that its length is less or equal "w" "trunc" controls truncation,...

wxString FindExeFile(const wxString &exeFile)

string ToString(const wxRect &rc)

wxString FnToWxString(const string &s)

void CorrectWindowRect(wxTopLevelWindow *win, wxRect &rc)

wxString ToAbsolutePath(const wxString &base, const wxString &rel_path)

converts relative path from the current workspace directory to an absolute path

wxRect GetScreenRect(const wxWindow &win)

static wxString s_GetCleanMenuText(const wxMenuItem &item)

string FnToStdString(const wxString &s)

void WindowSetText(const wxWindow &win, const wxChar *text)

Windows specific function, equivalent of SetWindowText() WinAPI.

wxImageList * CreateCheckboxImages(wxWindow *wnd)

void WrapText(wxDC &dc, const string &text, int w, vector< int > &line_lens)

divides given "text" into lines, so that every line has width less or equal to "w".

wxMenu * CloneMenu(const wxMenu &menu)

create a copy of the given menu

wxFileArtProvider * s_FileArtProvider

wxMenuItem * FindSubItem(wxMenu &menu, const wxString &text)

Find a subitem of the given menu by text.

bool NcbiChooseColor(wxWindow *parent, CRgbaColor &color)

static wxMenuItemList::const_iterator s_FindSeparator(wxMenu &menu, const wxString &text)

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

void AddChildWindowAbove(wxFrame *parent, wxWindow *child)

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

static wxMenuItem * s_CloneMenuItem(wxMenu &menu, const wxMenuItem &item)

void ToArrayString(const vector< string > &in, wxArrayString &out)

bool DlgGLWinOverlayFix(wxWindow *win)

Fix a problem on windows where after a dialog overlays an opengl window the opengl window may be cons...

static wxMenuItemList::const_iterator s_FindSubItem(wxMenuItemList::const_iterator begin, wxMenuItemList::const_iterator end, const wxString &text, bool skip_named_groups)

void ReportIDError(const string &id_label, bool is_local, const string &title)

bool GetMacOptionKeyDown()

For mac, return an ID for the current space (of "Spaces" fame)

wxSize GetDisplayPPI()

Mac always seems to return 72 for screen PPI so use wx function for non-mac and on mac divide the dis...

wxWindow * FindChildWindowById(long id, wxWindow *parent)

void SaveWindowRectToRegistry(const wxRect &rc, CRegistryWriteView view)

void CleanupSeparators(wxMenu &menu)

Removes extra separators (in the begining or at the end of the menu, ot those that precede other sepa...

wxString ToWxString(const string &s)

string ToStdString(const wxString &s)

Ewx_Truncate

Truncate options for drawing text with FLTK API.

@ ewxTruncate_Ellipsis

truncate text if needed

@ ewxTruncate_EllipsisAlways

truncate text if needed, add "..." if truncated


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