| 1 |
//--------------------------------------------------------------------------- |
| 2 |
|
| 3 |
#ifndef MFormH |
| 4 |
#define MFormH |
| 5 |
//--------------------------------------------------------------------------- |
| 6 |
#include <Classes.hpp> |
| 7 |
#include <Controls.hpp> |
| 8 |
#include <StdCtrls.hpp> |
| 9 |
#include <Forms.hpp> |
| 10 |
#include <Menus.hpp> |
| 11 |
#include <ComCtrls.hpp> |
| 12 |
#include <ExtCtrls.hpp> |
| 13 |
#include <Dialogs.hpp> |
| 14 |
|
| 15 |
#include "gshhs.hpp" |
| 16 |
#include <ToolWin.hpp> |
| 17 |
#include <Buttons.hpp> |
| 18 |
|
| 19 |
//--------------------------------------------------------------------------- |
| 20 |
class TMainForm : public TForm |
| 21 |
{ |
| 22 |
__published: // IDE 管理のコンポーネント |
| 23 |
TMainMenu *MainMenu; |
| 24 |
TStatusBar *StatusBar; |
| 25 |
TScrollBox *ScrollBox; |
| 26 |
TMenuItem *FileF1; |
| 27 |
TMenuItem *LoadGSHHSdata; |
| 28 |
TOpenDialog *OpenDialog; |
| 29 |
TPaintBox *PaintBox; |
| 30 |
TTimer *Timer; |
| 31 |
TMenuItem *ViewV1; |
| 32 |
TMenuItem *ZoomIn; |
| 33 |
TMenuItem *ZoomOut; |
| 34 |
TToolBar *ToolBar; |
| 35 |
TToolButton *ToolButton1; |
| 36 |
TToolButton *ToolButton2; |
| 37 |
TToolButton *ToolButton3; |
| 38 |
TToolButton *ToolButton4; |
| 39 |
TToolButton *ToolButton5; |
| 40 |
void __fastcall LoadGSHHSdataClick(TObject *Sender); |
| 41 |
void __fastcall PaintBoxPaint(TObject *Sender); |
| 42 |
void __fastcall PaintBoxMouseDown(TObject *Sender, TMouseButton Button, |
| 43 |
TShiftState Shift, int X, int Y); |
| 44 |
void __fastcall PaintBoxMouseMove(TObject *Sender, TShiftState Shift, |
| 45 |
int X, int Y); |
| 46 |
void __fastcall OnTimer(TObject *Sender); |
| 47 |
void __fastcall PaintBoxMouseUp(TObject *Sender, TMouseButton Button, |
| 48 |
TShiftState Shift, int X, int Y); |
| 49 |
void __fastcall ZoomInClick(TObject *Sender); |
| 50 |
void __fastcall ZoomOutClick(TObject *Sender); |
| 51 |
|
| 52 |
private: // ユーザー宣言 |
| 53 |
GPolygon polygon[5]; |
| 54 |
double min_lon, max_lat; |
| 55 |
double mag; |
| 56 |
|
| 57 |
int DragX, DragY; // スクロール移動速度 |
| 58 |
int MoveX, MoveY; // スクロール移動速度 |
| 59 |
bool isDragging; |
| 60 |
|
| 61 |
void LonLat2Screen(double lon, double lat, int &x, int &y); |
| 62 |
void Screen2LonLat(int x, int y, double &lon, double &lat); |
| 63 |
void SetZoom(double m); |
| 64 |
|
| 65 |
public: // ユーザー宣言 |
| 66 |
__fastcall TMainForm(TComponent* Owner); |
| 67 |
}; |
| 68 |
//--------------------------------------------------------------------------- |
| 69 |
extern PACKAGE TMainForm *MainForm; |
| 70 |
//--------------------------------------------------------------------------- |
| 71 |
#endif |