Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020 #ifndef XAP_UNIXDIALOG_IMAGE_H
00021 #define XAP_UNIXDIALOG_IMAGE_H
00022
00023 #include "xap_Dlg_Image.h"
00024
00025 class XAP_Frame;
00026
00027
00028
00029 class XAP_UnixDialog_Image: public XAP_Dialog_Image
00030 {
00031 public:
00032 XAP_UnixDialog_Image(XAP_DialogFactory * pDlgFactory, XAP_Dialog_Id id);
00033 virtual ~XAP_UnixDialog_Image(void);
00034
00035 virtual void runModal(XAP_Frame * pFrame);
00036
00037 static XAP_Dialog * static_constructor(XAP_DialogFactory *, XAP_Dialog_Id id);
00038 void setPositionToGUI(void);
00039 void setWrappingGUI(void);
00040 protected:
00041 void _constructWindowContents (GtkWidget * container);
00042 virtual GtkWidget * _constructWindow ();
00043 void _connectSignals ();
00044
00045 private:
00046
00047 typedef enum
00048 {
00049 BUTTON_OK = GTK_RESPONSE_OK,
00050 BUTTON_CANCEL = GTK_RESPONSE_CANCEL
00051 } ResponseId ;
00052
00053 void event_Ok ();
00054 void event_Cancel ();
00055 void doHeightSpin(void);
00056 void doWidthSpin(void);
00057 void doHeightEntry(void);
00058 void doWidthEntry(void);
00059 void setHeightEntry(void);
00060 void setWidthEntry(void);
00061 void adjustHeightForAspect(void);
00062 void adjustWidthForAspect(void);
00063 void aspectCheckbox();
00064 void wrappingChanged(void);
00065 void wrapTypeChanged(void);
00066
00067 static void s_HeightSpin_changed(GtkWidget * widget, XAP_UnixDialog_Image *dlg) ;
00068
00069 static void s_WidthSpin_changed(GtkWidget * widget, XAP_UnixDialog_Image *dlg) ;
00070
00071 static void s_HeightEntry_changed(GtkWidget * widget, XAP_UnixDialog_Image *dlg) ;
00072 static gboolean s_HeightEntry_FocusOut(GtkWidget * widget, GdkEvent *event, XAP_UnixDialog_Image *dlg);
00073 static gboolean s_WidthEntry_FocusOut(GtkWidget * widget, GdkEvent *event, XAP_UnixDialog_Image *dlg);
00074
00075 static void s_WidthEntry_changed(GtkWidget * widget, XAP_UnixDialog_Image *dlg) ;
00076
00077 static void s_aspect_clicked(GtkWidget * widget, XAP_UnixDialog_Image * dlg) ;
00078 static void s_wrapping_changed(GtkWidget * widget, XAP_UnixDialog_Image * dlg) ;
00079 static void s_wrapType_changed(GtkWidget * widget, XAP_UnixDialog_Image * dlg) ;
00080
00081 GtkWidget * mMainWindow;
00082 GtkWidget * m_wAspectCheck;
00083 GtkWidget * m_wHeightSpin;
00084 GtkWidget * m_wHeightEntry;
00085 GtkWidget * m_wWidthSpin;
00086 GtkWidget * m_wWidthEntry;
00087 GtkWidget * m_wTitleEntry;
00088 GtkWidget * m_wDescriptionEntry;
00089 GtkWidget * m_wrbInLine;
00090 GtkWidget * m_wrbNone;
00091 GtkWidget * m_wrbWrappedRight;
00092 GtkWidget * m_wrbWrappedLeft;
00093 GtkWidget * m_wrbWrappedBoth;
00094 GtkWidget * m_wrbPlaceParagraph;
00095 GtkWidget * m_wrbPlaceColumn;
00096 GtkWidget * m_wrbPlacePage;
00097 GtkWidget * m_wrbSquareWrap;
00098 GtkWidget * m_wrbTightWrap;
00099
00100
00101
00102 GtkAdjustment * m_oHeightSpin_adj;
00103 GtkAdjustment * m_oWidthSpin_adj;
00104 guint m_iHeightID;
00105 guint m_iWidthID;
00106 UT_sint32 m_iHeight;
00107 UT_sint32 m_iWidth;
00108 bool m_bAspect;
00109 double m_dHeightWidth;
00110 };
00111
00112 #endif