(parent,
id, caption, pos,
size, style);
109SetExtraStyle(wxWS_EX_BLOCK_EVENTS);
110wxDialog::Create( parent,
id, caption, pos,
size, style );
115GetSizer()->SetSizeHints(
this);
165wxBoxSizer* itemBoxSizer2 =
newwxBoxSizer(wxVERTICAL);
166itemDialog1->SetSizer(itemBoxSizer2);
168 m_Panel=
newwxPanel( itemDialog1,
ID_PANEL3, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
169itemBoxSizer2->Add(
m_Panel, 0, wxALIGN_CENTER_HORIZONTAL, 5);
171wxBoxSizer* itemBoxSizer4 =
newwxBoxSizer(wxVERTICAL);
172 m_Panel->SetSizer(itemBoxSizer4);
174wxBoxSizer* itemBoxSizer5 =
newwxBoxSizer(wxHORIZONTAL);
175itemBoxSizer4->Add(itemBoxSizer5, 0, wxGROW|wxLEFT|wxRIGHT|wxTOP, 5);
177wxStaticText* itemStaticText6 =
newwxStaticText(
m_Panel, wxID_STATIC,
_(
"Save As:"), wxDefaultPosition, wxSize(100, -1), wxALIGN_RIGHT );
178itemBoxSizer5->Add(itemStaticText6, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5);
181itemBoxSizer5->Add(
m_FileNameBox, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5);
184itemBitmapButton8->SetHelpText(
_(
"Select File"));
186itemBitmapButton8->SetToolTip(
_(
"Select File"));
187itemBoxSizer5->Add(itemBitmapButton8, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5);
192wxStaticText* itemStaticText10 =
newwxStaticText(
m_Panel, wxID_STATIC,
_(
" "), wxDefaultPosition, wxDefaultSize, 0 );
200itemBoxSizer2->Add(
m_InfoSizer, 0, wxGROW|wxLEFT|wxRIGHT|wxBOTTOM, 5);
202 m_Info=
newwxStaticText( itemDialog1, wxID_STATIC, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
205itemBoxSizer2->Add(5, 1, 1, wxALIGN_CENTER_HORIZONTAL|wxALL, 1);
207wxBoxSizer* itemBoxSizer15 =
newwxBoxSizer(wxHORIZONTAL);
208itemBoxSizer2->Add(itemBoxSizer15, 0, wxALIGN_RIGHT|wxLEFT|wxRIGHT|wxBOTTOM, 5);
210 m_SaveButton=
newwxButton( itemDialog1,
ID_SAVE,
_(
"Save"), wxDefaultPosition, wxDefaultSize, 0 );
211itemBoxSizer15->Add(
m_SaveButton, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 5);
213 m_OpenButton=
newwxButton( itemDialog1,
ID_OPEN,
_(
"Save && Open"), wxDefaultPosition, wxDefaultSize, 0 );
214itemBoxSizer15->Add(
m_OpenButton, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 5);
216wxButton* itemButton18 =
newwxButton( itemDialog1,
ID_CANCEL,
_(
"Cancel"), wxDefaultPosition, wxDefaultSize, 0 );
217itemBoxSizer15->Add(itemButton18, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 5);
238 returnwxArtProvider::GetBitmap(name);
263wxString filename =
file.GetFullName();
264wxString path =
file.GetPath();
266 if( !path.empty() && wxFileName::DirExists(path) ) {
277 if( !
m_Path.empty() ) {
294 stringpath = full_name;
301fname =
f.GetName();
303 else if(!
f.IsDir()) {
304 stringd =
f.GetDir();
309fname =
f.GetName();
313wxFileDialog dlg(
this,
wxT(
"Set File Name"),
315 wxT(
"*.pdf"), wxFD_SAVE|wxFD_OVERWRITE_PROMPT);
317 if(dlg.ShowModal() != wxID_OK)
320wxString filename = dlg.GetPath();
323 m_Path= dlg.GetDirectory();
336wxString filename =
file.GetFullName();
337wxString
n= filename.Lower();
338 size_tpos =
n.rfind(
wxT(
".pdf"));
339 if(pos != string::npos) {
340filename = filename.SubString(0, pos-1);
342wxString path =
file.GetPath();
344 if(path.IsEmpty()) {
348 else if(!wxFileName::DirExists(path) ) {
352 else if(filename.IsEmpty()) {
376 NcbiMessageBox(
"Error - You do not have write permission to the file: "+ full_path);
380 intchoice = wxMessageBox(
wxT(
"Selected file already exists. Are you sure you want to overwrite it?"),
381 wxT(
"Warning"), wxYES_NO | wxICON_ERROR,
this);
382 if(choice != wxYES) {
411EndModal(wxID_CANCEL);
EVT_CHECKBOX(ID_CADJUSTFEATURES_CHECKBOX, CAdjustFeaturesForGaps::OnKnownUnknownSelected) EVT_CHECKBOX(ID_CADJUSTFEATURES_CHECKBOX1
CRegistryWriteView GetWriteView(const string §ion)
get a read-write view at a particular level.
static CGuiRegistry & GetInstance()
access the application-wide singleton
CRegistryReadView GetReadView(const string §ion) const
get a read-only view at a particular level.
class CRegistryReadView provides a nested hierarchical view at a particular key.
string GetString(const string &key, const string &default_val=kEmptyStr) const
void Set(const string &key, int val)
access a named key at this level, with no recursion
bool m_UserSelectedFilename
wxBoxSizer * m_SaveOptionsSizer
wxCheckBox * m_IncludeToolTips
void OnFilepathClick(wxCommandEvent &event)
wxEVT_COMMAND_BUTTON_CLICKED event handler for ID_BITMAPBUTTON1
void LoadSettings(const string &pdf_base_key)
void CreateControls()
Creates the controls and sizers.
void OnOpenClick(wxCommandEvent &event)
wxEVT_COMMAND_BUTTON_CLICKED event handler for ID_OPEN
wxTextCtrl * m_FileNameBox
void OnCancelClick(wxCommandEvent &event)
wxEVT_COMMAND_BUTTON_CLICKED event handler for ID_CANCEL
void SaveSettings(const string &pdf_base_key) const
wxIcon GetIconResource(const wxString &name)
Retrieves icon resources.
void OnTextctrl5TextUpdated(wxCommandEvent &event)
wxEVT_COMMAND_TEXT_UPDATED event handler for ID_TEXTCTRL5
void OnSaveClick(wxCommandEvent &event)
wxEVT_COMMAND_BUTTON_CLICKED event handler for ID_SAVE
void OnTooltipCheckboxClick(wxCommandEvent &event)
wxEVT_COMMAND_CHECKBOX_CLICKED event handler for ID_TOOLTIP_CHECKBOX
bool m_OpenPdf
view PDF file after finished.
CwxSavePdfBaseDlg()
Constructors.
static bool ShowToolTips()
Should we show tooltips?
~CwxSavePdfBaseDlg()
Destructor.
bool Create(wxWindow *parent, wxWindowID id=ID_CWXSAVEPDFDLG, const wxString &caption=_("Save Image As PDF"), const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxSize(440, -1), long style=wxCAPTION|wxSYSTEM_MENU|wxCLOSE_BOX|wxTAB_TRAVERSAL)
Creation.
void Init()
Initialises member variables.
wxBitmap GetBitmapResource(const wxString &name)
Retrieves bitmap resources.
bool CheckAccess(TMode access_mode) const
Check access rights.
bool IsDir(EFollowLinks follow=eFollowLinks) const
Check whether a directory entry is a directory.
static string ConcatPath(const string &first, const string &second)
Concatenate two parts of the path for the current OS.
@ fWrite
Write permission.
EDialogReturnValue NcbiMessageBox(const string &message, TDialogType type=eDialog_Ok, EDialogIcon icon=eIcon_Exclamation, const string &title="Error", EDialogTextMode text_mode=eRaw)
#define END_NCBI_SCOPE
End previously defined NCBI scope.
#define BEGIN_NCBI_SCOPE
Define ncbi namespace.
const struct ncbi::grid::netcache::search::fields::SIZE size
Defines classes: CDirEntry, CFile, CDir, CSymLink, CMemoryFile, CFileUtil, CFileLock,...
static const string kPdfPathKey
wxString ToWxString(const string &s)
string ToStdString(const wxString &s)
string ToAsciiStdString(const wxString &input)
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