00001 #pragma once 00002 00003 #include "MFCBase.h" 00004 00009 // 00010 namespace jbxwl { 00011 00012 using namespace jbxl; 00013 00014 00015 class CExDocument; 00016 class CExTextView; 00017 class CExTextFrame; 00018 class CAppCallBack; 00019 00020 00021 00023 // CExTextView ビュー 00024 00025 class CExTextView : public CScrollView 00026 { 00027 protected: 00028 CExTextView(); // 動的生成に使用されるプロテクト コンストラクタ 00029 DECLARE_DYNCREATE(CExTextView) 00030 00031 // アトリビュート 00032 public: 00033 00034 CDocument* pDoc; 00035 CExTextFrame* pFrame; 00036 CAppCallBack* pApp; 00037 00038 CString Title; 00039 00040 RECT clientRect; // クライアント領域 00041 double sizeXYRate; // クライアント領域のサイズ(全体)の縦横比率 (Y/X).下位クラスで定義する必要がある. 00042 double clientRate; // クライアント領域の倍率(X方向を基準にする) 00043 00044 int xsize; // 00045 int ysize; // 00046 00047 int origXSize; // 本来の画像を表示した場合の Xサイズ.下位クラスで定義する必要がある. 00048 int origYSize; // 本来の画像を表示した場合の Yサイズ.下位クラスで定義する必要がある. 00049 int initXSize; // 最初に表示された時のクライアント領域の Xサイズ 00050 int initYSize; // 最初に表示された時のクライアント領域の Yサイズ 00051 int prevXSize; // 直前のクライアント領域の Xサイズ 00052 int prevYSize; // 直前のクライアント領域の Yサイズ 00053 00054 bool cnstSize; // ウィンドウサイズ固定か? 00055 bool cnstXSize; // ウィンドウのXサイズ固定か? 00056 bool cnstYSize; // ウィンドウのYサイズ固定か? 00057 bool cnstXYRate; // ウィンドウは sizeXYRate依存 00058 int maxXSize; // ウィンドウの最大Xサイズ 00059 int maxYSize; // ウィンドウの最大Yサイズ 00060 00061 bool doReSize; // ウィンドウのリサイズ許可 00062 00063 protected: 00064 bool activeWin; // ウィンドウはアクティブか? 00065 00066 // オペレーション 00067 public: 00068 POINT SetWindowSize(int xs, int ys, BOOL first=TRUE); // クライアントサイズを指定して,ウィンドを配置する. 00069 POINT GetWindowSize(POINT pt); // クライアントサイズから,ウィンドウサイズを得る. 00070 POINT GetClientSize(POINT pt); // ウィンドウサイズから,クライアントサイズを得る. 00071 POINT GetWindowReSize(POINT pt); // ウィンドウのサイズを条件に合わせて再計算する 00072 POINT ExecWindowReSize(int xs, int ys); // ウィンドウを条件に合わせてリサイズする 00073 void SetTitle(LPCTSTR title); 00074 00075 virtual POINT GetWindowDisplaySize(POINT pt) { return pt;} // ウィンドウが画面に収まるように大きさを再計算する 00076 00077 // オーバーライド 00078 00079 //{{AFX_VIRTUAL(CExTextView) 00080 public: 00081 virtual void OnInitialUpdate(); 00082 virtual void OnDraw(CDC* pDC); 00083 00084 protected: 00085 virtual void OnActivateView(BOOL bActivate, CScrollView* pActivateView, CScrollView* pDeactiveView); 00086 //}}AFX_VIRTUAL 00087 00088 // インプリメンテーション 00089 public: 00090 virtual ~CExTextView(); 00091 00092 protected: 00093 //{{AFX_MSG(CExTextView) 00094 afx_msg void OnSize(UINT nType, int cx, int cy); 00095 //}}AFX_MSG 00096 DECLARE_MESSAGE_MAP() 00097 public: 00098 afx_msg BOOL OnEraseBkgnd(CDC* pDC); 00099 }; 00100 00101 00102 00104 00105 //{{AFX_INSERT_LOCATION}} 00106 00107 00108 } // namespace