(exeFile.IsEmpty())
83 if(::wxIsAbsolutePath(exeFile)) {
84 if(::wxFileExists(exeFile))
89wxFileName fileName(exeFile);
90 if(!fileName.GetPath().IsEmpty())
94pathList.AddEnvList(
wxT(
"PATH"));
95 returnpathList.FindValidPath(exeFile);
99 void ReportIDError(
const string& id_label,
boolis_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_treported = -1;
121 size_tused =
usage.resident / 1024 / 1024;
122 if(reported != used) {
124 LOG_POST(
Info<<
"Memory used: "<< reported <<
"MB");
131wxFileName fileName(path);
132fileName.MakeAbsolute();
134 string file(fileName.GetFullPath().ToUTF8());
135 stringdir(fileName.GetPathWithSep().ToUTF8());
139 #elif defined(__WXOSX__) 141 #elif defined(NCBI_OS_LINUX) 191 #include <Winnetwk.h> 193UNIVERSAL_NAME_INFO* unameinfo;
194 DWORDbufferLength = 1024;
196 const TCHAR* name = localpath.data();
198unameinfo = (UNIVERSAL_NAME_INFO*)&
buffer;
199 DWORD result= WNetGetUniversalName(localpath.data(), UNIVERSAL_NAME_INFO_LEVEL, (
LPVOID)unameinfo, &bufferLength);
201 if(
result== NO_ERROR) {
202 returnunameinfo->lpUniversalName;
207 returnwxString::FromUTF8(path.c_str());
214 unsigned chardigest[16];
216 for(
int i= 0;
i< 16; ++
i) {
218sprintf(
buf,
"%02X", (
int)digest[
i]);
228 unsigneddisplays = wxDisplay::GetCount();
229 _TRACE(
"Displays: "<< displays);
233 for(
unsigned i= 0;
i< displays; ++
i) {
234wxDisplay display(
i);
235wxRect rect = display.GetGeometry();
237 _TRACE(
"Display"<<
i<<
": "<< rect.x <<
","<< rect.y
238<<
" "<< rect.width <<
"x"<< rect.height);
256 returnwxEmptyString;
259 size_tsrc_size = s.size();
260 if(src_size > 2 && s[0] ==
'['&& s[src_size - 1] ==
']')
265 returnwxString::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://")))
286wxFileName absolute(abs_path);
287 if(absolute.IsRelative())
290 if(base.size() != 0) {
291wxString ws_dir = wxFileName(base).GetPath();
292wxFileName relative(abs_path);
293relative.MakeRelativeTo(ws_dir);
294 returnrelative.GetFullPath();
303 if(rel_path.StartsWith(
wxT(
"http://")) || rel_path.StartsWith(
wxT(
"https://")) || rel_path.StartsWith(
wxT(
"ftp://")))
306wxFileName absolute(rel_path);
307 if(absolute.IsAbsolute())
310 if(base.size() != 0) {
311wxString ws_dir = wxFileName(base).GetPath();
312absolute.MakeAbsolute(ws_dir);
313 returnabsolute.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++ ){
368wxMenu* menu =
newwxMenu();
375 CMenuItem& ch_item = *(*it)->GetValue();
379wxMenuItem* wx_item =
NULL;
385menu->Append(
wxID_ANY, wx_label, ch_menu);
389wxItemKind kind = wxITEM_NORMAL;
400item_id = wxID_SEPARATOR;
401kind = wxITEM_SEPARATOR;
404wx_item =
newwxMenuItem(menu, item_id, wx_label, wx_help, kind);
408 if( ! icon.empty()) {
410wxBitmap
bmp= wxArtProvider::GetBitmap(wx_alias);
412wx_item->SetBitmap(
bmp);
417menu->Append(wx_item);
428wxMenuItemList& items = menu.GetMenuItems();
429 ITERATE( wxMenuItemList, it, items ){
430wxMenuItem* item = *it;
431 if( item->GetItemLabel() ==
text){
441wxMenu& menu,
constwxString&
text 443wxMenuItemList& items = menu.GetMenuItems();
444 ITERATE( wxMenuItemList, it, items ){
445wxMenuItem* item = *it;
446 if( item->IsSeparator() && item->GetItemLabel() ==
text){
456wxMenuItemList::const_iterator begin,
457wxMenuItemList::const_iterator end,
458 constwxString&
text,
459 boolskip_named_groups
462 for( wxMenuItemList::const_iterator it = begin; it != end; it++ ){
463wxMenuItem* sub_item = *it;
464wxString s = sub_item->GetItemLabel();
466 if( skip_named_groups ){
467 if( sub_item->IsSeparator() ){
476}
else if( s ==
text){
488wxMenuItemList& items = menu.GetMenuItems();
489 ITERATE( wxMenuItemList, it, items ){
490 constwxMenuItem* it_item = *it;
491 if( it_item->IsSeparator() ){
492named = ! it_item->GetItemLabel().empty();
499menu.Append(
newwxMenuItem( &menu, wxID_SEPARATOR ));
501menu.Append( &item );
507wxString s = item.GetItemLabel();
510 for(
size_t i= 0;
i< s.size(); ++
i) {
511 if(s[
i] ==
'_') {
524wxMenu* sub_menu = item.GetSubMenu();
525wxMenu* sub_menu_clone = sub_menu ?
CloneMenu(*sub_menu) :
NULL;
528wxMenuItem::New(&menu, item.GetId(), s, item.GetHelp(),item.GetKind(), sub_menu_clone);
533 #if wxUSE_OWNER_DRAWN 534clone->SetOwnerDrawn();
544 if( item.IsCheckable() && item.GetKind() != wxITEM_RADIO ){
545clone->Check( item.IsChecked() );
549wxBitmap bitmap = item.GetBitmap();
550 if( bitmap.IsOk() ){
551clone->SetBitmap( bitmap );
561wxMenu* new_menu =
newwxMenu( menu.GetTitle() );
563 constwxMenuItemList& items = menu.GetMenuItems();
564 ITERATE( wxMenuItemList, it, items ){
565 constwxMenuItem* item = *it;
568new_menu->Append( new_item );
579 void Merge( wxMenu& menu_1,
constwxMenu& menu_2 )
581 typedefwxMenuItemList::const_iterator TIter;
584wxMenuItemList& items_1 = menu_1.GetMenuItems();
588TIter grp_begin = items_1.begin();
589TIter grp_end = items_1.end();
591 constwxMenuItemList& items_2 = menu_2.GetMenuItems();
592 ITERATE( wxMenuItemList, it_2, items_2 ){
594 constwxMenuItem* sub_item = *it_2;
595wxString
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 constwxMenuItem* it_item = *grp_end;
608 if( it_item->IsSeparator() ){
615menu_1.Append( wxID_SEPARATOR, clean_label );
620grp_begin = items_1.begin();
621grp_end = items_1.end();
628 if( it_target != grp_end ){
630wxMenuItem* target_sub_item = *it_target;
631wxMenu* sub_menu_1 = target_sub_item->GetSubMenu();
632wxMenu* 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() ){
646wxMenuItem* sub_item = *grp_end;
647 for(
size_tpos = 0; pos < menu_1.GetMenuItemCount(); pos++ ){
648wxMenuItem* pos_item = menu_1.FindItemByPosition( pos );
649 if( pos_item == sub_item ){
650menu_1.Insert( pos, clone );
656menu_1.Append( clone );
670 for(
size_t i= 0;
i< menu.GetMenuItemCount(); ){
671wxMenuItem* item = menu.FindItemByPosition(
i);
673 if( item->IsSeparator() ){
674 if(
i== 0 ||
i== menu.GetMenuItemCount() - 1 ){
678wxMenuItem* next_item = menu.FindItemByPosition(
i+ 1 );
680 remove= next_item->IsSeparator();
682}
else if( item->IsSubMenu() ){
696 #if wxUSE_OWNER_DRAWN 701item = menu.Append( 20000,
wxT(
"Dummy") );
702item->SetMarginWidth( item->GetDefaultMarginWidth() );
703menu.Destroy( item );
712item->SetMarginWidth(
bmp->GetWidth() );
729wxWindow* focused = wxWindow::FindFocus();
731 if( m_Window !=
NULL){
732wxWindow* wid = focused;
733 while( wid !=
NULL){
734 if( wid == m_Window ){
737wid = wid->GetParent();
745 if( focused ==
NULL){
750focused->GetEventHandler()->
751#
if( wxMAJOR_VERSION == 2 && wxMINOR_VERSION < 9 )
752wxEvtHandler::ProcessEvent( event )
754ProcessEvent( event )
785wxRect rc = win.GetRect();
786 if( win.GetParent() ){
787wxPoint pos = rc.GetLeftTop();
788wxPoint screen_pos = win.GetParent()->ClientToScreen( pos );
789rc.SetLeftTop( screen_pos );
796 #if defined(NCBI_OS_MSWIN) 797WXHWND hwnd = win.GetHWND();
803 static unsigned char s_Average(
unsigned charc1,
unsigned charc2,
doubleratio )
805 doubleres = ratio * c1 + (1.0 - ratio) * c2;
806 return(
unsigned char) res;
810wxColour
GetAverage(
constwxColor& c1,
constwxColor& c2,
doubleratio )
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 returnwxColour(
r,
g,
b,
a);
822 staticwxString sc_ellipsis(
wxT(
"..."));
824wxSize sz = dc.GetTextExtent(s);
826 int n= (
int)s.size();
841wxSize el_sz = dc.GetTextExtent(sc_ellipsis);
849dc.GetPartialTextExtents(s, widths);
852 doubleK = ((double) w_av) / full_w;
855 intnew_w = widths[
len];
858 for( ; new_w > w_av && --
len> 0; ){
859new_w = widths[
len];
862 for( ; new_w < w_av && ++
len<
n; ){
863new_w = widths[
len];
880 staticwxString sc_ellipsis(
wxT(
"..."));
883 int n= (
int)s.size();
885wxString res(s,
len);
895 void WrapText(wxDC& dc,
const string&
text,
intw, vector<int>& line_lens)
897 static stringspaces(
" \t\n");
899 inttext_len = (
int)
text.size();
900 const char* s =
text.c_str();
901 for(
intpos = 0; pos < text_len; ) {
902 intline_start = pos;
904string::size_type after_word_end =
905 text.find_first_of(spaces, line_start);
906 if(after_word_end == string::npos) {
907after_word_end = text_len;
909 intline_len = (
int)(after_word_end - line_start);
912dc.GetTextExtent(
ToWxString(s + line_start, line_len), &line_w, &t_h);
918 intp = (
int)after_word_end;
919 for( ; p < text_len; p++ ) {
920 if(spaces.find(s[p]) != string::npos) {
922wxString wx_s =
ToWxString(s + line_start, p - line_start);
924dc.GetTextExtent(wx_s, &cw, &t_h);
931after_word_end =
text.find_first_of(spaces, p);
932 if(after_word_end == string::npos) {
933after_word_end = text_len;
935wxString wx_s =
ToWxString(s + line_start, after_word_end - line_start);
937dc.GetTextExtent(wx_s, &cw, &t_h);
942p = (
int)(after_word_end - 1);
946line_len = p - line_start;
949 const char* ss = s + line_start;
950wxString wx_ss =
ToWxString(ss, line_len - 1);
953line_len = text_len - line_start;
956line_lens.push_back(line_len);
964 constwxArtClient& aClient,
965 constwxSize& aSize )
967 if( aClient != wxART_OTHER ){
971 intpos = anId.Find(
wxT(
"::") );
972 if( pos == wxNOT_FOUND ){
976wxString new_cli = anId.Mid( 0, pos );
977wxString new_id = anId.Mid( pos+2 );
979 if( new_cli.IsSameAs(
wxT(
"menu") ) ){
980new_cli = wxART_MENU;
981}
else if( new_cli.IsSameAs(
wxT(
"wm") ) ){
982new_cli = wxART_FRAME_ICON;
990new_cli +=
wxT(
"_C");
993 returnwxArtProvider::GetBitmap( new_id, new_cli, aSize );
1005 return CRgbaColor(c.Red(), c.Green(), c.Blue(), c.Alpha());
1011view.
Set(
"x", rc.x);
1012view.
Set(
"y", rc.y);
1013view.
Set(
"width", rc.width);
1014view.
Set(
"height", rc.height);
1020rc.x = view.
GetInt(
"x", rc.x);
1021rc.y = view.
GetInt(
"y", rc.y);
1022rc.width = view.
GetInt(
"width", rc.width);
1023rc.height = view.
GetInt(
"height", rc.height);
1028 #ifdef NCBI_OS_MSWIN 1029 intdisp_x = GetSystemMetrics(SM_XVIRTUALSCREEN);
1030 intdisp_y = GetSystemMetrics(SM_YVIRTUALSCREEN);
1031 intdisp_w = GetSystemMetrics(SM_CXVIRTUALSCREEN);
1032 intdisp_h = GetSystemMetrics(SM_CYVIRTUALSCREEN);
1033rc.width = rc.width > disp_w ? disp_w : rc.width;
1034rc.height = rc.height > disp_h ? disp_h : rc.height;
1035rc.x = rc.x < disp_x + 1 ? disp_x + 1 : rc.x;
1036rc.y = rc.y < disp_y + 1 ? disp_y + 1 : rc.y;
1037 #elif __WXOSX_COCOA__ 1048 intmonitors = [NSScreen screens].count;
1055 for(
int i=0;
i<monitors; ++
i) {
1056NSScreen* s = [[NSScreen screens] objectAtIndex:
i];
1057NSRect visible_frame = [s visibleFrame];
1062 intx = visible_frame.origin.x + visible_frame.size.width;
1064 intflipped_y = -visible_frame.origin.y;
1065 inty = flipped_y + visible_frame.size.height;
1069 if(visible_frame.origin.x < minx)
1070minx = visible_frame.origin.x;
1074 if(flipped_y < miny)
1079 if(rc.x + rc.width > maxx) {
1080rc.x = maxx - rc.width;
1084 if(rc.width > maxx-minx)
1085rc.width = maxx-minx;
1089 if(rc.y + rc.height > maxy) {
1090rc.y = maxy - rc.height;
1094 if(rc.height > maxy-miny)
1095rc.height = maxy-miny;
1102 if(rc.y < menubar_height) {
1103rc.y = menubar_height;
1104 if(rc.y + rc.height > maxy) {
1105rc.height -= menubar_height;
1119wxColourDialog dialog(parent, &
data);
1120 if(dialog.ShowModal() == wxID_OK)
1122wxColourData retData = dialog.GetColourData();
1123wxColour col = retData.GetColour();
1124 color.Set(col.Red(), col.Green(), col.Blue());
1132wxWindow *res =
NULL;
1134 ITERATE( wxWindowList, wit, parent->GetChildren() ){
1135wxWindow *child = *wit;
1137 if( child->GetId() ==
id){
1153wxCommandEvent evt(wxEVT_COMMAND_BUTTON_CLICKED, cmd_id);
1154evt.SetInt(cmd_data);
1156evt.StopPropagation();
1158window->GetEventHandler()->ProcessEvent(evt);
1160wxWindowList& list = window->GetChildren();
1161 ITERATE( wxWindowList, wit, list ){
1162wxWindow *current = *wit;
1171wxClassInfo* classInfo = wxClassInfo::FindClass(
wxT(
"wxGenericListCtrl"));
1172 if(classInfo == 0 || !listCtrl.IsKindOf(classInfo))
1175 ITERATE( wxWindowList, wit, listCtrl.GetChildren() ){
1176wxWindow *child = *wit;
1178 if(child->GetName() ==
wxT(
"panel")) {
1190 m_ListCtrl->GetEventHandler()->ProcessEvent( event );
1196 #ifdef __WXOSX_COCOA__ 1197wxNonOwnedWindow* nowin =
dynamic_cast<wxNonOwnedWindow*
>(child);
1200NSWindow* mac_win = nowin->GetWXWindow();
1202 if(mac_win !=
NULL) {
1203NSWindow* mac_window = parent->GetWXWindow();
1204[mac_window addChildWindow:mac_win ordered:NSWindowAbove];
1211 #ifdef __WXOSX_COCOA__ 1212wxNonOwnedWindow* nowin =
dynamic_cast<wxNonOwnedWindow*
>(child);
1215NSWindow* mac_win = nowin->GetWXWindow();
1217 if(mac_win !=
NULL) {
1218NSWindow* mac_window = parent->GetWXWindow();
1219[mac_window addChildWindow:mac_win ordered:NSWindowBelow];
1226 #ifdef __WXOSX_COCOA__ 1227wxNonOwnedWindow* nowin =
dynamic_cast<wxNonOwnedWindow*
>(child);
1230NSWindow* mac_win = nowin->GetWXWindow();
1232 if(mac_win !=
NULL) {
1233NSWindow* mac_window = parent->GetWXWindow();
1234[mac_window removeChildWindow:mac_win];
1243CGFloat menuBarHeight = [[NSApp mainMenu] menuBarHeight];
1244menubar_height = (
int) menuBarHeight;
1246 #ifdef __WXMAC_CARBON__ 1250HIWindowGetAvailablePositioningBounds(kCGNullDirectDisplay,
1251kHICoordSpaceScreenPixel,
1253maxy =
r.size.height - menubar_height;
1256menubar_height *= 2;
1260NSWindow* nswin = win->GetWXWindow();
1261NSScreen* screen = [nswin deepestScreen];
1263 if(screen !=
NULL) {
1264NSRect visible_frame = [screen visibleFrame];
1265maxy = visible_frame.size.height;
1266maxx = visible_frame.size.width;
1277 if(NSEventModifierFlagOption & [ NSEvent modifierFlags ]) {
1295 #ifdef _VISTA_WORKAROUND_ 1296 static intsize_change = 1;
1300win->GetSize(&w, &h);
1301win->SetSize(w+size_change, h);
1313 #ifdef __WXOSX_COCOA__ 1314NSScreen* screen = [NSScreen mainScreen];
1315 if(screen !=
NULL) {
1316NSDictionary *description = [screen deviceDescription];
1317 if(description !=
NULL) {
1318NSSize displayPixelSize = [[description objectForKey:NSDeviceSize] sizeValue];
1319CGSize displayPhysicalSize = CGDisplayScreenSize(
1320[[description objectForKey:
@"NSScreenNumber"] unsignedIntValue]);
1322s.SetWidth(
int((displayPixelSize.width/displayPhysicalSize.width)*25.4f));
1323s.SetHeight(s.GetWidth());
1328 _TRACE(
"Screen DPI: (w,h): "<< s.GetWidth() <<
","<< s.GetHeight() <<
")");
1331 returnwxGetDisplayPPI();
1337 static boolinitialized =
false;
1338 static boolinsideNCBI =
false;
1342initialized =
true;
1358 intwidth = renderer.GetCheckBoxSize(wnd).GetWidth();
1359 intheight = renderer.GetCheckBoxSize(wnd).GetHeight();
1361wxImageList* imageList =
newwxImageList(width, height,
TRUE);
1363wxBitmap unchecked_bmp(width, height),
1364checked_bmp(width, height),
1365unchecked_disabled_bmp(width, height),
1366checked_disabled_bmp(width, height);
1368wxMemoryDC renderer_dc;
1370wxColor bkgColor = wnd->GetBackgroundColour();
1373renderer_dc.SelectObject(unchecked_bmp);
1374renderer_dc.SetBackground(*wxTheBrushList->FindOrCreateBrush(bkgColor));
1375renderer_dc.Clear();
1376renderer.DrawCheckBox(wnd, renderer_dc, wxRect(0, 0, width, height), 0);
1379renderer_dc.SelectObject(checked_bmp);
1380renderer_dc.SetBackground(*wxTheBrushList->FindOrCreateBrush(bkgColor));
1381renderer_dc.Clear();
1382renderer.DrawCheckBox(wnd, renderer_dc, wxRect(0, 0, width, height), wxCONTROL_CHECKED);
1385renderer_dc.SelectObject(unchecked_disabled_bmp);
1386renderer_dc.SetBackground(*wxTheBrushList->FindOrCreateBrush(bkgColor));
1387renderer_dc.Clear();
1388renderer.DrawCheckBox(wnd, renderer_dc, wxRect(0, 0, width, height), 0 | wxCONTROL_DISABLED);
1391renderer_dc.SelectObject(checked_disabled_bmp);
1392renderer_dc.SetBackground(*wxTheBrushList->FindOrCreateBrush(bkgColor));
1393renderer_dc.Clear();
1394renderer.DrawCheckBox(wnd, renderer_dc, wxRect(0, 0, width, height), wxCONTROL_CHECKED | wxCONTROL_DISABLED);
1397renderer_dc.SelectObject(wxNullBitmap);
1400imageList->Add(unchecked_bmp);
1401imageList->Add(checked_bmp);
1402imageList->Add(unchecked_disabled_bmp);
1403imageList->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