wxWindowID
id,
constwxString& caption,
constwxPoint& pos,
constwxSize&
size,
longstyle )
79: m_width(w), m_height(h), m_pos_x(x), m_pos_y(y), m_EditedMacro(macro_rep)
82wxString new_caption(caption);
86 Create( parent,
id, new_caption, pos,
size, style );
96 bool CMacroEditor::Create( wxWindow* parent, wxWindowID
id,
constwxString& caption,
constwxPoint& pos,
constwxSize&
size,
longstyle )
99wxFrame::Create( parent,
id, caption, pos,
size, style );
104GetSizer()->SetSizeHints(
this);
106Centre(wxBOTH | wxCENTRE_ON_SCREEN);
118wxWindow* win = this->GetParent();
140 for(
unsigned int i= 0;
i< wxDisplay::GetCount();
i++)
142wxDisplay display(
i);
143max_x += display.GetGeometry().GetWidth();
145 if(
m_pos_x+ width > max_x)
m_pos_x= wxGetDisplaySize().GetWidth()-width-5;
146 if(
m_pos_y+ height > wxGetDisplaySize().GetHeight())
m_pos_y= wxGetDisplaySize().GetHeight()-height-5;
176wxBoxSizer* itemBoxSizer2 =
newwxBoxSizer(wxVERTICAL);
177itemFrame1->SetSizer(itemBoxSizer2);
179wxPanel* itemPanel3 =
newwxPanel( itemFrame1,
wxID_ANY);
180itemBoxSizer2->Add(itemPanel3, 1, wxGROW|wxALL, 0);
182wxBoxSizer* itemBoxSizer4 =
newwxBoxSizer(wxVERTICAL);
183itemPanel3->SetSizer(itemBoxSizer4);
189wxStaticBox* itemStaticBoxSizer5Static =
newwxStaticBox(itemPanel3,
wxID_ANY,
_(
"Validation"));
190wxStaticBoxSizer* itemStaticBoxSizer6 =
newwxStaticBoxSizer(itemStaticBoxSizer5Static, wxHORIZONTAL);
191itemBoxSizer4->Add(itemStaticBoxSizer6, 0, wxEXPAND | wxALL, 5);
193 m_Status=
newwxStaticText(itemPanel3, wxID_STATIC, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0);
194itemStaticBoxSizer6->Add(
m_Status, 0, wxALIGN_CENTER_VERTICAL | wxALL, 3);
196wxBoxSizer* itemBoxSizer12 =
newwxBoxSizer(wxHORIZONTAL);
197itemBoxSizer4->Add(itemBoxSizer12, 0, wxEXPAND | wxALL, 0);
199itemBoxSizer12->AddStretchSpacer();
201 m_Accept=
newwxButton(itemPanel3, wxID_OK,
_(
"Accept"), wxDefaultPosition, wxDefaultSize, 0);
202itemBoxSizer12->Add(
m_Accept, 0, wxALL, 5);
205wxButton* itemButton15 =
newwxButton( itemPanel3, wxID_CANCEL,
_(
"Close"), wxDefaultPosition, wxDefaultSize, 0 );
206itemBoxSizer12->Add(itemButton15, 0, wxALL, 5);
262 m_Status->SetForegroundColour(wxColor(*wxRED));
271 m_Status->SetForegroundColour(wxColour(0, 128, 0));
276 m_Status->SetForegroundColour(wxColour(255, 165, 0));
297wxWindow* w = this->GetParent();
311wxWindow* w = this->GetParent();
343HideWithEffect(wxSHOW_EFFECT_BLEND);
344 if(wxTheApp && wxTheApp->GetMainLoop()) {
345 if(!wxTheApp->GetMainLoop()->IsYielding())
346wxTheApp->Yield(
true);
347wxTheApp->ProcessPendingEvents();
349ShowWithEffect(wxSHOW_EFFECT_BLEND);
356wxGenericNotificationMessage notice(wxEmptyString,
wxT(
"Macro added"));
357 #if wxCHECK_VERSION(3, 1, 0) 358wxWindow* w = GetParent();
363notice.SetIcon(icon);
const string & GetWarning() const
void SetParentFrame(CMacroEditor *parent)
macro::CMacroEngine m_MEngine
CMacroEditor()
Constructors.
void Init()
Initialises member variables.
void SetPositionAndSize()
CMacroEditingActionPanel * m_ActionPanel
CRef< macro::CMacroRep > m_MacroRep
void OnAcceptClick(wxCommandEvent &event)
wxIcon GetIconResource(const wxString &name)
Retrieves icon resources.
~CMacroEditor()
Destructor.
wxBitmap GetBitmapResource(const wxString &name)
Retrieves bitmap resources.
bool Create(wxWindow *parent, wxWindowID id=ID_CMACROEDITOR, const wxString &caption=_("Add New Macro"), const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxDefaultSize, long style=wxCAPTION|wxSYSTEM_MENU|wxMINIMIZE_BOX|wxCLOSE_BOX)
static bool ShowToolTips()
Should we show tooltips?
void OnCloseClick(wxCommandEvent &event)
CRef< macro::CMacroRep > m_EditedMacro
void CreateControls()
Creates the controls and sizers.
void RemoveEditor(bool scroll_to_end)
void SaveAddMacroSizeAndPosition(int w, int h, int x, int y)
void AddNewMacro(CRef< macro::CMacroRep > macro_rep)
void UpdateEditedMacro(CRef< macro::CMacroRep > macro_rep)
IMPLEMENT_CLASS(CFloatingFrame, CFloatingFrameBaseClass) const static long kFloatFrameStyle
CFloatingFrame.
#define LOG_POST(message)
This macro is deprecated and it's strongly recomended to move in all projects (except tests) to macro...
#define NCBI_THROW(exception_class, err_code, message)
Generic macro to throw an exception, given the exception class, error code and message string.
const string & GetMsg(void) const
Get message string.
void Info(CExceptionArgs_Base &args)
EDialogReturnValue NcbiMessageBox(const string &message, TDialogType type=eDialog_Ok, EDialogIcon icon=eIcon_Exclamation, const string &title="Error", EDialogTextMode text_mode=eRaw)
string GetLabel(const CSeq_id &id)
void Reset(void)
Reset reference object.
#define END_NCBI_SCOPE
End previously defined NCBI scope.
#define BEGIN_NCBI_SCOPE
Define ncbi namespace.
void ReportUsage(const wxString &dialog_name, const string &action_name)
Report events in the macro_flow_editor and in the macro_editor.
void SaveScriptCreated(const string ¯o)
Save macro created by the editor.
const struct ncbi::grid::netcache::search::fields::SIZE size
static SLJIT_INLINE sljit_ins msg(sljit_gpr r, sljit_s32 d, sljit_gpr x, sljit_gpr b)
wxString ToWxString(const string &s)
wxRect GetScreenRect(const wxWindow &win)
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