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

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

44 #include <wx/filename.h> 45 #include <wx/msgdlg.h> 46 #include <wx/filedlg.h> 48 #include <wx/artprov.h> 98  Create

(parent,

id

, caption, pos,

size

, style);

109 

SetExtraStyle(wxWS_EX_BLOCK_EVENTS);

110

wxDialog::Create( parent,

id

, caption, pos,

size

, style );

115

GetSizer()->SetSizeHints(

this

);

165

wxBoxSizer* itemBoxSizer2 =

new

wxBoxSizer(wxVERTICAL);

166

itemDialog1->SetSizer(itemBoxSizer2);

168  m_Panel

=

new

wxPanel( itemDialog1,

ID_PANEL3

, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );

169

itemBoxSizer2->Add(

m_Panel

, 0, wxALIGN_CENTER_HORIZONTAL, 5);

171

wxBoxSizer* itemBoxSizer4 =

new

wxBoxSizer(wxVERTICAL);

172  m_Panel

->SetSizer(itemBoxSizer4);

174

wxBoxSizer* itemBoxSizer5 =

new

wxBoxSizer(wxHORIZONTAL);

175

itemBoxSizer4->Add(itemBoxSizer5, 0, wxGROW|wxLEFT|wxRIGHT|wxTOP, 5);

177

wxStaticText* itemStaticText6 =

new

wxStaticText(

m_Panel

, wxID_STATIC,

_

(

"Save As:"

), wxDefaultPosition, wxSize(100, -1), wxALIGN_RIGHT );

178

itemBoxSizer5->Add(itemStaticText6, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5);

181

itemBoxSizer5->Add(

m_FileNameBox

, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5);

184

itemBitmapButton8->SetHelpText(

_

(

"Select File"

));

186

itemBitmapButton8->SetToolTip(

_

(

"Select File"

));

187

itemBoxSizer5->Add(itemBitmapButton8, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5);

192

wxStaticText* itemStaticText10 =

new

wxStaticText(

m_Panel

, wxID_STATIC,

_

(

" "

), wxDefaultPosition, wxDefaultSize, 0 );

200

itemBoxSizer2->Add(

m_InfoSizer

, 0, wxGROW|wxLEFT|wxRIGHT|wxBOTTOM, 5);

202  m_Info

=

new

wxStaticText( itemDialog1, wxID_STATIC, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );

205

itemBoxSizer2->Add(5, 1, 1, wxALIGN_CENTER_HORIZONTAL|wxALL, 1);

207

wxBoxSizer* itemBoxSizer15 =

new

wxBoxSizer(wxHORIZONTAL);

208

itemBoxSizer2->Add(itemBoxSizer15, 0, wxALIGN_RIGHT|wxLEFT|wxRIGHT|wxBOTTOM, 5);

210  m_SaveButton

=

new

wxButton( itemDialog1,

ID_SAVE

,

_

(

"Save"

), wxDefaultPosition, wxDefaultSize, 0 );

211

itemBoxSizer15->Add(

m_SaveButton

, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 5);

213  m_OpenButton

=

new

wxButton( itemDialog1,

ID_OPEN

,

_

(

"Save && Open"

), wxDefaultPosition, wxDefaultSize, 0 );

214

itemBoxSizer15->Add(

m_OpenButton

, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 5);

216

wxButton* itemButton18 =

new

wxButton( itemDialog1,

ID_CANCEL

,

_

(

"Cancel"

), wxDefaultPosition, wxDefaultSize, 0 );

217

itemBoxSizer15->Add(itemButton18, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 5);

238  return

wxArtProvider::GetBitmap(name);

263

wxString filename =

file

.GetFullName();

264

wxString path =

file

.GetPath();

266  if

( !path.empty() && wxFileName::DirExists(path) ) {

277  if

( !

m_Path

.empty() ) {

294  string

path = full_name;

301

fname =

f

.GetName();

303  else if

(!

f

.IsDir()) {

304  string

d =

f

.GetDir();

309

fname =

f

.GetName();

313

wxFileDialog dlg(

this

,

wxT

(

"Set File Name"

),

315  wxT

(

"*.pdf"

), wxFD_SAVE|wxFD_OVERWRITE_PROMPT);

317  if

(dlg.ShowModal() != wxID_OK)

320

wxString filename = dlg.GetPath();

323  m_Path

= dlg.GetDirectory();

336

wxString filename =

file

.GetFullName();

337

wxString

n

= filename.Lower();

338  size_t

pos =

n

.rfind(

wxT

(

".pdf"

));

339  if

(pos != string::npos) {

340

filename = filename.SubString(0, pos-1);

342

wxString 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  int

choice = 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) {

411

EndModal(wxID_CANCEL);

EVT_CHECKBOX(ID_CADJUSTFEATURES_CHECKBOX, CAdjustFeaturesForGaps::OnKnownUnknownSelected) EVT_CHECKBOX(ID_CADJUSTFEATURES_CHECKBOX1

CRegistryWriteView GetWriteView(const string &section)

get a read-write view at a particular level.

static CGuiRegistry & GetInstance()

access the application-wide singleton

CRegistryReadView GetReadView(const string &section) 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