No changes, just cleanup the image part of the docview sample.
Remove unnecessary, never used methods. Don't use pointers when objects or references can be used more safely. Don't name classes which are not part of wx with "wx" prefix to avoid confusing people. Don't define empty unnecessary event tables. Prefer wxScrolledWindow::SetVirtualSize() to SetScrollbars(). Stop using "protected" when "private" should be used. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@64300 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -198,33 +198,24 @@ public:
|
||||
};
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// A basic image document class
|
||||
// A document class representing an image
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
class wxImageDocument : public wxDocument
|
||||
class ImageDocument : public wxDocument
|
||||
{
|
||||
public:
|
||||
ImageDocument() : wxDocument() { }
|
||||
|
||||
wxImage GetImage() const { return m_image; }
|
||||
|
||||
protected:
|
||||
wxImage m_image;
|
||||
public:
|
||||
wxImageDocument();
|
||||
|
||||
wxImage* GetImage() { return &m_image; }
|
||||
const wxImage& GetImage() const { return m_image; }
|
||||
|
||||
bool SaveFile(wxOutputStream*, wxBitmapType) const;
|
||||
|
||||
public:
|
||||
virtual ~wxImageDocument();
|
||||
virtual bool DeleteContents();
|
||||
|
||||
virtual bool DoOpenDocument(const wxString& file);
|
||||
virtual bool DoSaveDocument(const wxString& file);
|
||||
|
||||
virtual bool DoOpenDocument(wxInputStream*);
|
||||
virtual bool DoSaveDocument(wxOutputStream*) const;
|
||||
private:
|
||||
wxImage m_image;
|
||||
|
||||
wxDECLARE_NO_COPY_CLASS(wxImageDocument);
|
||||
DECLARE_DYNAMIC_CLASS(wxImageDocument)
|
||||
wxDECLARE_NO_COPY_CLASS(ImageDocument);
|
||||
DECLARE_DYNAMIC_CLASS(ImageDocument)
|
||||
};
|
||||
|
||||
#endif // _WX_SAMPLES_DOCVIEW_DOC_H_
|
||||
|
||||
Reference in New Issue
Block a user