Added Set/GetSelection to wxPrintDialogData (the value of the Selection radio button);

corrected bug in cursor.cpp (used wxIconRefData).


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3540 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Julian Smart
1999-08-31 12:03:05 +00:00
parent 311227c3fe
commit 5360828db9
4 changed files with 25 additions and 3 deletions

View File

@@ -457,6 +457,13 @@ Returns a reference to the internal wxPrintData object.
Returns TRUE if the user has selected printing to a file.
\membersection{wxPrintDialogData::GetSelection}\label{wxprintdialogdatagetselection}
\constfunc{bool}{GetSelection}{\void}
Returns TRUE if the user requested that the selection be printed (where 'selection' is
a concept specific to the application).
\membersection{wxPrintDialogData::GetToPage}\label{wxprintdialogdatagettopage}
\constfunc{int}{GetToPage}{\void}
@@ -505,6 +512,13 @@ Sets the internal wxPrintData.
Sets the 'Print to file' checkbox to TRUE or FALSE.
\membersection{wxPrintDialogData::SetSelection}\label{wxprintdialogdatasetselection}
\func{void}{SetSelection}{\param{bool}{ flag}}
Selects the 'Selection' radio button. The effect of printing the selection depends on how the application
implements this command, if at all.
\membersection{wxPrintDialogData::SetSetupDialog}\label{wxprintdialogdatasetsetupdialog}
\func{void}{SetSetupDialog}{\param{bool }{flag}}

View File

@@ -222,6 +222,7 @@ class WXDLLEXPORT wxPrintDialogData: public wxObject
int GetMaxPage() const { return m_printMaxPage; };
int GetNoCopies() const { return m_printNoCopies; };
bool GetAllPages() const { return m_printAllPages; };
bool GetSelection() const { return m_printSelection; };
bool GetCollate() const { return m_printCollate; };
bool GetPrintToFile() const { return m_printToFile; };
bool GetSetupDialog() const { return m_printSetupDialog; };
@@ -232,6 +233,7 @@ class WXDLLEXPORT wxPrintDialogData: public wxObject
void SetMaxPage(int v) { m_printMaxPage = v; };
void SetNoCopies(int v) { m_printNoCopies = v; };
void SetAllPages(bool flag) { m_printAllPages = flag; };
void SetSelection(bool flag) { m_printSelection = flag; };
void SetCollate(bool flag) { m_printCollate = flag; };
void SetPrintToFile(bool flag) { m_printToFile = flag; };
void SetSetupDialog(bool flag) { m_printSetupDialog = flag; };
@@ -274,6 +276,7 @@ private:
bool m_printAllPages;
bool m_printCollate;
bool m_printToFile;
bool m_printSelection;
bool m_printEnableSelection;
bool m_printEnablePageNumbers;
bool m_printEnableHelp;

View File

@@ -677,6 +677,7 @@ wxPrintDialogData::wxPrintDialogData()
m_printAllPages = FALSE;
m_printCollate = FALSE;
m_printToFile = FALSE;
m_printSelection = FALSE;
m_printEnableSelection = FALSE;
m_printEnablePageNumbers = TRUE;
m_printEnablePrintToFile = TRUE;
@@ -702,6 +703,7 @@ wxPrintDialogData::wxPrintDialogData(const wxPrintData& printData)
m_printAllPages = FALSE;
m_printCollate = FALSE;
m_printToFile = FALSE;
m_printSelection = FALSE;
m_printEnableSelection = FALSE;
m_printEnablePageNumbers = TRUE;
m_printEnablePrintToFile = TRUE;
@@ -789,6 +791,8 @@ void wxPrintDialogData::ConvertToNative()
if ( m_printAllPages )
pd->Flags |= PD_ALLPAGES;
if ( m_printAllPages )
pd->Flags |= PD_SELECTION;
if ( m_printCollate )
pd->Flags |= PD_COLLATE;
if ( m_printToFile )
@@ -834,6 +838,7 @@ void wxPrintDialogData::ConvertFromNative()
m_printNoCopies = pd->nCopies ;
m_printAllPages = ((pd->Flags & PD_ALLPAGES) == PD_ALLPAGES);
m_printSelection = ((pd->Flags & PD_SELECTION) == PD_SELECTION);
m_printCollate = ((pd->Flags & PD_COLLATE) == PD_COLLATE);
m_printToFile = ((pd->Flags & PD_PRINTTOFILE) == PD_PRINTTOFILE);
m_printEnablePrintToFile = ((pd->Flags & PD_DISABLEPRINTTOFILE) != PD_DISABLEPRINTTOFILE);
@@ -881,6 +886,7 @@ void wxPrintDialogData::operator=(const wxPrintDialogData& data)
m_printAllPages = data.m_printAllPages;
m_printCollate = data.m_printCollate;
m_printToFile = data.m_printToFile;
m_printSelection = data.m_printSelection;
m_printEnableSelection = data.m_printEnableSelection;
m_printEnablePageNumbers = data.m_printEnablePageNumbers;
m_printEnableHelp = data.m_printEnableHelp;
@@ -1013,7 +1019,6 @@ void wxPageSetupDialogData::ConvertToNative()
pd->hDevMode = NULL;
}
pd->hDevMode = (HGLOBAL) m_printData.GetNativeData();
m_printData.SetNativeData((void*) NULL);

View File

@@ -73,7 +73,7 @@ wxCursor::wxCursor(const char WXUNUSED(bits)[], int WXUNUSED(width), int WXUNUSE
wxCursor::wxCursor(const wxString& cursor_file, long flags, int hotSpotX, int hotSpotY)
{
m_refData = new wxIconRefData;
m_refData = new wxCursorRefData;
M_CURSORDATA->m_destroyCursor = FALSE;
M_CURSORDATA->m_hCursor = 0;
@@ -125,7 +125,7 @@ wxCursor::wxCursor(const wxString& cursor_file, long flags, int hotSpotX, int ho
// Cursors by stock number
wxCursor::wxCursor(int cursor_type)
{
m_refData = new wxIconRefData;
m_refData = new wxCursorRefData;
switch (cursor_type)
{