X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/ce00f59b5b169752d2f05ce3bb1a88ddc1b38b4c..11e3c6ef36393fb5863ea2f9601d8facd73acb12:/include/wx/richtext/richtextimagedlg.h diff --git a/include/wx/richtext/richtextimagedlg.h b/include/wx/richtext/richtextimagedlg.h index 968694eef8..3a0b91491f 100644 --- a/include/wx/richtext/richtextimagedlg.h +++ b/include/wx/richtext/richtextimagedlg.h @@ -2,10 +2,10 @@ // Name: wx/richtext/richtextimagedlg.h // Purpose: // Author: Mingquan Yang -// Modified by: +// Modified by: Julian Smart // Created: Wed 02 Jun 2010 11:27:23 CST // RCS-ID: -// Copyright: (c) Mingquan Yang +// Copyright: (c) Mingquan Yang, Julian Smart // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// @@ -14,51 +14,53 @@ #ifndef _RICHTEXTIMAGEDLG_H_ #define _RICHTEXTIMAGEDLG_H_ -/*! - * Includes - */ -#include "wx/richtext/richtextbuffer.h" - /*! * Forward declarations */ class WXDLLIMPEXP_FWD_CORE wxButton; class WXDLLIMPEXP_FWD_CORE wxComboBox; +class WXDLLIMPEXP_FWD_CORE wxCheckBox; class WXDLLIMPEXP_FWD_CORE wxTextCtrl; +/*! + * Includes + */ + +#include "wx/richtext/richtextbuffer.h" +#include "wx/richtext/richtextformatdlg.h" + /*! * Control identifiers */ ////@begin control identifiers -#define SYMBOL_WXRICHTEXTIMAGEDIALOG_STYLE wxDEFAULT_DIALOG_STYLE|wxTAB_TRAVERSAL -#define SYMBOL_WXRICHTEXTIMAGEDIALOG_TITLE _("Image Properties") -#define SYMBOL_WXRICHTEXTIMAGEDIALOG_IDNAME ID_WXRICHTEXTIMAGEPAGE -#define SYMBOL_WXRICHTEXTIMAGEDIALOG_SIZE wxSize(400, 300) -#define SYMBOL_WXRICHTEXTIMAGEDIALOG_POSITION wxDefaultPosition +#define SYMBOL_WXRICHTEXTOBJECTPROPERTIESDIALOG_STYLE wxDEFAULT_DIALOG_STYLE|wxTAB_TRAVERSAL +#define SYMBOL_WXRICHTEXTOBJECTPROPERTIESDIALOG_TITLE _("Object Properties") +#define SYMBOL_WXRICHTEXTOBJECTPROPERTIESDIALOG_IDNAME ID_RICHTEXTOBJECTPROPERTIESDIALOG +#define SYMBOL_WXRICHTEXTOBJECTPROPERTIESDIALOG_SIZE wxSize(400, 300) +#define SYMBOL_WXRICHTEXTOBJECTPROPERTIESDIALOG_POSITION wxDefaultPosition ////@end control identifiers - /*! - * wxRichTextImageDialog class declaration + * wxRichTextObjectPropertiesDialog class declaration */ -class WXDLLIMPEXP_RICHTEXT wxRichTextImageDialog: public wxDialog -{ - DECLARE_DYNAMIC_CLASS( wxRichTextImageDialog ) +class WXDLLIMPEXP_RICHTEXT wxRichTextObjectPropertiesDialog: public wxRichTextFormattingDialog +{ + DECLARE_DYNAMIC_CLASS( wxRichTextObjectPropertiesDialog ) DECLARE_EVENT_TABLE() public: /// Constructors - wxRichTextImageDialog(); - wxRichTextImageDialog( wxWindow* parent, wxWindowID id = SYMBOL_WXRICHTEXTIMAGEDIALOG_IDNAME, const wxString& caption = SYMBOL_WXRICHTEXTIMAGEDIALOG_TITLE, const wxPoint& pos = SYMBOL_WXRICHTEXTIMAGEDIALOG_POSITION, const wxSize& size = SYMBOL_WXRICHTEXTIMAGEDIALOG_SIZE, long style = SYMBOL_WXRICHTEXTIMAGEDIALOG_STYLE ); + wxRichTextObjectPropertiesDialog(); + wxRichTextObjectPropertiesDialog( wxRichTextObject* obj, wxWindow* parent, wxWindowID id = SYMBOL_WXRICHTEXTOBJECTPROPERTIESDIALOG_IDNAME, const wxString& caption = SYMBOL_WXRICHTEXTOBJECTPROPERTIESDIALOG_TITLE, const wxPoint& pos = SYMBOL_WXRICHTEXTOBJECTPROPERTIESDIALOG_POSITION, const wxSize& size = SYMBOL_WXRICHTEXTOBJECTPROPERTIESDIALOG_SIZE, long style = SYMBOL_WXRICHTEXTOBJECTPROPERTIESDIALOG_STYLE ); /// Creation - bool Create( wxWindow* parent, wxWindowID id = SYMBOL_WXRICHTEXTIMAGEDIALOG_IDNAME, const wxString& caption = SYMBOL_WXRICHTEXTIMAGEDIALOG_TITLE, const wxPoint& pos = SYMBOL_WXRICHTEXTIMAGEDIALOG_POSITION, const wxSize& size = SYMBOL_WXRICHTEXTIMAGEDIALOG_SIZE, long style = SYMBOL_WXRICHTEXTIMAGEDIALOG_STYLE ); + bool Create( wxRichTextObject* obj, wxWindow* parent, wxWindowID id = SYMBOL_WXRICHTEXTOBJECTPROPERTIESDIALOG_IDNAME, const wxString& caption = SYMBOL_WXRICHTEXTOBJECTPROPERTIESDIALOG_TITLE, const wxPoint& pos = SYMBOL_WXRICHTEXTOBJECTPROPERTIESDIALOG_POSITION, const wxSize& size = SYMBOL_WXRICHTEXTOBJECTPROPERTIESDIALOG_SIZE, long style = SYMBOL_WXRICHTEXTOBJECTPROPERTIESDIALOG_STYLE ); /// Destructor - ~wxRichTextImageDialog(); + ~wxRichTextObjectPropertiesDialog(); /// Initialises member variables void Init(); @@ -66,72 +68,28 @@ public: /// Creates the controls and sizers void CreateControls(); -////@begin wxRichTextImageDialog event handler declarations +////@begin wxRichTextObjectPropertiesDialog event handler declarations - /// wxEVT_COMMAND_BUTTON_CLICKED event handler for ID_RICHTEXTIMAGEDIALOG_PARA_UP - void OnRichtextimagedialogParaUpClick( wxCommandEvent& event ); +////@end wxRichTextObjectPropertiesDialog event handler declarations - /// wxEVT_COMMAND_BUTTON_CLICKED event handler for ID_RICHTEXTIMAGEDIALOG_DOWN - void OnRichtextimagedialogDownClick( wxCommandEvent& event ); - -////@end wxRichTextImageDialog event handler declarations - -////@begin wxRichTextImageDialog member function declarations +////@begin wxRichTextObjectPropertiesDialog member function declarations /// Retrieves bitmap resources wxBitmap GetBitmapResource( const wxString& name ); /// Retrieves icon resources wxIcon GetIconResource( const wxString& name ); -////@end wxRichTextImageDialog member function declarations +////@end wxRichTextObjectPropertiesDialog member function declarations /// Should we show tooltips? static bool ShowToolTips(); - /// Set the image attribute - void SetImageAttr(const wxRichTextAnchoredObjectAttr& attr); - wxRichTextImage* ApplyImageAttr(); - - /// Set the anchored object - void SetImageObject(wxRichTextImage *image, wxRichTextBuffer* buffer); - - virtual bool TransferDataFromWindow(); - virtual bool TransferDataToWindow(); -private: - /// Convert CM to MM - bool ConvertFromString(const wxString& string, int& ret, int scale); -private: - wxRichTextAnchoredObjectAttr m_attr; -////@begin wxRichTextImageDialog member variables - wxComboBox* m_alignment; - wxComboBox* m_float; - wxTextCtrl* m_width; - wxComboBox* m_unitsW; - wxTextCtrl* m_height; - wxComboBox* m_unitsH; - wxTextCtrl* m_offset; - wxComboBox* m_unitsOffset; - wxButton* m_saveButton; - wxButton* m_cancelButton; +////@begin wxRichTextObjectPropertiesDialog member variables /// Control identifiers enum { - ID_WXRICHTEXTIMAGEPAGE = 10015, - ID_COMBOBOX_ALIGN = 10016, - ID_RICHTEXTIMAGEDIALOG_FLOATING_MODE = 10017, - ID_RICHTEXTIMAGEDIALOG_WIDTH = 10018, - ID_RICHTEXTIMAGEDIALOG_UNITS_W = 10019, - ID_RICHTEXTIMAGEDIALOG_HEIGHT = 10020, - ID_RICHTEXTIMAGEDIALOG_UNITS_H = 10021, - ID_RICHTEXTIMAGEDIALOG_OFFSET = 10022, - ID_RICHTEXTIMAGEDIALOG_OFFSET_UNITS = 10023, - ID_RICHTEXTIMAGEDIALOG_PARA_UP = 10024, - ID_RICHTEXTIMAGEDIALOG_DOWN = 10025 + ID_RICHTEXTOBJECTPROPERTIESDIALOG = 10650 }; -////@end wxRichTextImageDialog member variables - - wxRichTextBuffer* m_buffer; - wxRichTextObject* m_image; - wxRichTextObject* m_parent; +////@end wxRichTextObjectPropertiesDialog member variables }; #endif