wxWidgets/include/wx/richtext/richtextimagedlg.h
Vadim Zeitlin ce00f59b5b No changes whatsoever, just remove trailing whitespace.
There are no real changes in this commit but it removes all trailing white
space from our source files. This avoids problems when applying patches and
making diffs and it would be nice to prevent it from reappearing.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65680 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-09-30 11:44:45 +00:00

139 lines
4.4 KiB
C++

/////////////////////////////////////////////////////////////////////////////
// Name: wx/richtext/richtextimagedlg.h
// Purpose:
// Author: Mingquan Yang
// Modified by:
// Created: Wed 02 Jun 2010 11:27:23 CST
// RCS-ID:
// Copyright: (c) Mingquan Yang
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
#include "wx/dialog.h"
#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 wxTextCtrl;
/*!
* 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
////@end control identifiers
/*!
* wxRichTextImageDialog class declaration
*/
class WXDLLIMPEXP_RICHTEXT wxRichTextImageDialog: public wxDialog
{
DECLARE_DYNAMIC_CLASS( wxRichTextImageDialog )
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 );
/// 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 );
/// Destructor
~wxRichTextImageDialog();
/// Initialises member variables
void Init();
/// Creates the controls and sizers
void CreateControls();
////@begin wxRichTextImageDialog event handler declarations
/// wxEVT_COMMAND_BUTTON_CLICKED event handler for ID_RICHTEXTIMAGEDIALOG_PARA_UP
void OnRichtextimagedialogParaUpClick( wxCommandEvent& event );
/// wxEVT_COMMAND_BUTTON_CLICKED event handler for ID_RICHTEXTIMAGEDIALOG_DOWN
void OnRichtextimagedialogDownClick( wxCommandEvent& event );
////@end wxRichTextImageDialog event handler declarations
////@begin wxRichTextImageDialog member function declarations
/// Retrieves bitmap resources
wxBitmap GetBitmapResource( const wxString& name );
/// Retrieves icon resources
wxIcon GetIconResource( const wxString& name );
////@end wxRichTextImageDialog 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;
/// 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
};
////@end wxRichTextImageDialog member variables
wxRichTextBuffer* m_buffer;
wxRichTextObject* m_image;
wxRichTextObject* m_parent;
};
#endif
// _RICHTEXTIMAGEDLG_H_