OSDN Git Service

レスポップアップ位置の調整を設定可能にした。
authorh677 <h677>
Wed, 22 Aug 2007 15:04:23 +0000 (15:04 +0000)
committerh677 <h677>
Wed, 22 Aug 2007 15:04:23 +0000 (15:04 +0000)
レスポップアップのアンカーはずれから消えるまでのWaitを設定可能にした。

Giko.pas
KuroutSetting.dfm
KuroutSetting.pas
ResPopupBrowser.pas
Setting.pas
gikoNavi.res

index 329deca..f8efb89 100644 (file)
--- a/Giko.pas
+++ b/Giko.pas
@@ -1323,6 +1323,10 @@ begin
 
     //\92u\8a·\90Ý\92è\83t\83@\83C\83\8b\82Ì\93Ç\82Ý\8d\9e\82Ý
     ReplaceDM.LoadFromFile(GikoSys.GetReplaceFileName);
+
+    //\83\8c\83X\83|\83b\83v\83A\83b\83v\8fÁ\8b\8e\83^\83C\83}\81[
+    ResPopupClearTimer.Interval := GikoSys.Setting.RespopupWait;
+
     // D&D\82ð\8eó\82¯\8eæ\82é
     DragAcceptFiles(Self.Handle, True);
 end;
index 4dfd486..52f3750 100644 (file)
@@ -21,8 +21,8 @@ object KuroutOption: TKuroutOption
     Top = 0
     Width = 517
     Height = 393
-    ActivePage = TabSheet2
-    TabIndex = 3
+    ActivePage = RespopupTabSheet
+    TabIndex = 4
     TabOrder = 0
     object TabSheet1: TTabSheet
       Caption = #35443#32048#35373#23450#65297
@@ -579,6 +579,112 @@ object KuroutOption: TKuroutOption
         end
       end
     end
+    object RespopupTabSheet: TTabSheet
+      Caption = #35443#32048#35373#23450'5'
+      ImageIndex = 4
+      object RespopuGroupBox: TGroupBox
+        Left = 8
+        Top = 16
+        Width = 473
+        Height = 105
+        Caption = #12524#12473#12509#12483#12503#12450#12483#12503
+        TabOrder = 0
+        object Label16: TLabel
+          Left = 16
+          Top = 48
+          Width = 292
+          Height = 12
+          Caption = '( '#12510#12454#12473#12459#12540#12477#12523#20301#32622#12363#12425#12398#12378#12425#12375#20301#32622' -25 px '#65374' 25'#12288'px)'
+        end
+        object Label19: TLabel
+          Left = 192
+          Top = 72
+          Width = 108
+          Height = 12
+          Caption = '(100 ms '#65374' 5000 ms)'
+        end
+        object DeltaXLabeledEdit: TLabeledEdit
+          Left = 120
+          Top = 24
+          Width = 49
+          Height = 20
+          EditLabel.Width = 97
+          EditLabel.Height = 12
+          EditLabel.Caption = #12509#12483#12503#12450#12483#12503#20301#32622' X'
+          LabelPosition = lpLeft
+          LabelSpacing = 10
+          TabOrder = 0
+          Text = '0'
+          OnExit = DeltaXLabeledEditExit
+        end
+        object DeltaYLabeledEdit: TLabeledEdit
+          Left = 304
+          Top = 24
+          Width = 49
+          Height = 20
+          EditLabel.Width = 97
+          EditLabel.Height = 12
+          EditLabel.Caption = #12509#12483#12503#12450#12483#12503#20301#32622' Y'
+          LabelPosition = lpLeft
+          LabelSpacing = 10
+          TabOrder = 1
+          Text = '0'
+          OnExit = DeltaYLabeledEditExit
+        end
+        object DeltaXUpDown: TUpDown
+          Left = 169
+          Top = 24
+          Width = 16
+          Height = 20
+          Associate = DeltaXLabeledEdit
+          Min = -25
+          Max = 25
+          Position = 0
+          TabOrder = 2
+          Wrap = False
+        end
+        object DeltaYUpDown: TUpDown
+          Left = 353
+          Top = 24
+          Width = 16
+          Height = 20
+          Associate = DeltaYLabeledEdit
+          Min = -25
+          Max = 25
+          Position = 0
+          TabOrder = 3
+          Wrap = False
+        end
+        object RespopupWaitLabeledEdit: TLabeledEdit
+          Left = 76
+          Top = 66
+          Width = 92
+          Height = 20
+          EditLabel.Width = 52
+          EditLabel.Height = 12
+          EditLabel.Caption = #12463#12522#12450'Wait'
+          LabelPosition = lpLeft
+          LabelSpacing = 10
+          TabOrder = 4
+          Text = '100'
+          OnExit = RespopupWaitLabeledEditExit
+        end
+        object RespopupWaitUpDown: TUpDown
+          Left = 168
+          Top = 66
+          Width = 17
+          Height = 20
+          Associate = RespopupWaitLabeledEdit
+          Min = 100
+          Max = 5000
+          Increment = 100
+          Position = 100
+          TabOrder = 5
+          Thousands = False
+          Wrap = False
+        end
+      end
+    end
   end
   object OkBotton: TButton
     Left = 224
index 845f43b..4fc5b36 100644 (file)
@@ -83,6 +83,16 @@ type
     Label15: TLabel;
     LogGroupBox: TGroupBox;
     CheckDatFileCheckBox: TCheckBox;
+    RespopupTabSheet: TTabSheet;
+    RespopuGroupBox: TGroupBox;
+    DeltaXLabeledEdit: TLabeledEdit;
+    DeltaYLabeledEdit: TLabeledEdit;
+    DeltaXUpDown: TUpDown;
+    DeltaYUpDown: TUpDown;
+    Label16: TLabel;
+    RespopupWaitLabeledEdit: TLabeledEdit;
+    RespopupWaitUpDown: TUpDown;
+    Label19: TLabel;
        procedure OkBottonClick(Sender: TObject);
        procedure FormCreate(Sender: TObject);
        procedure CDeleteButtonClick(Sender: TObject);
@@ -96,6 +106,9 @@ type
     procedure MoveHistoryMaxEditExit(Sender: TObject);
     procedure AHandredLabeledEditExit(Sender: TObject);
     procedure ExtListLabeledEditExit(Sender: TObject);
+    procedure DeltaXLabeledEditExit(Sender: TObject);
+    procedure DeltaYLabeledEditExit(Sender: TObject);
+    procedure RespopupWaitLabeledEditExit(Sender: TObject);
   private
        { Private \90é\8c¾ }
        procedure SetValue;
@@ -160,6 +173,10 @@ begin
     ExtListLabeledEdit.Text := GikoSys.Setting.ExtList;
     // Folder.idx\93Ç\82Ý\8d\9e\82Ý\8e\9edat\83`\83F\83b\83N
     CheckDatFileCheckBox.Checked := GikoSys.Setting.CheckDatFile;
+    DeltaXUpDown.Position := GikoSys.Setting.RespopupDeltaX;
+    DeltaYUpDown.Position := GikoSys.Setting.RespopupDeltaY;
+    RespopupWaitUpDown.Position := GikoSys.Setting.RespopupWait;
+
 end;
 
 procedure TKuroutOption.SaveSetting;
@@ -204,6 +221,11 @@ begin
     GikoSys.Setting.ExtList := ExtListLabeledEdit.Text;
     // Folder.idx\93Ç\82Ý\8d\9e\82Ý\8e\9edat\83`\83F\83b\83N
     GikoSys.Setting.CheckDatFile := CheckDatFileCheckBox.Checked;
+
+    GikoSys.Setting.RespopupDeltaX := StrToInt(DeltaXLabeledEdit.Text);
+    GikoSys.Setting.RespopupDeltaY := StrToInt(DeltaYLabeledEdit.Text);
+    GikoSys.Setting.RespopupWait := StrToInt(RespopupWaitLabeledEdit.Text);
+    GikoForm.ResPopupClearTimer.Interval := GikoSys.Setting.RespopupWait;
 end;
 
 procedure TKuroutOption.RecvBufferSizeExit(Sender: TObject);
@@ -235,6 +257,9 @@ begin
     MoveHistoryMaxEditExit(Sender);
     AHandredLabeledEditExit(Sender);
     ExtListLabeledEditExit(Sender);
+    DeltaXLabeledEditExit(Sender);
+    DeltaYLabeledEditExit(Sender);
+    RespopupWaitLabeledEditExit(Sender);
     PostColumnData();
        SaveSetting;
 end;
@@ -454,8 +479,38 @@ begin
     if AnsiEndsStr(';', ExtListLabeledEdit.Text) then begin
         ExtListLabeledEdit.Text :=
             Copy(ExtListLabeledEdit.Text, 0,
-                Length(ExtListLabeledEdit.Text) - 1); 
+                Length(ExtListLabeledEdit.Text) - 1);
     end;
 end;
+// \83\8c\83X\83|\83b\83v\83A\83b\83v\88Ê\92uX
+procedure TKuroutOption.DeltaXLabeledEditExit(Sender: TObject);
+begin
+       if not GikoSys.IsNumeric(DeltaXLabeledEdit.Text) then
+               DeltaXLabeledEdit.Text := IntToStr(GikoSys.Setting.RespopupDeltaX);
+    if StrToInt(DeltaXLabeledEdit.Text) < DeltaXUpDown.Min then
+        DeltaXLabeledEdit.Text := IntToStr(DeltaXUpDown.Min);
+    if StrToInt(DeltaXLabeledEdit.Text) > DeltaXUpDown.Max then
+        DeltaXLabeledEdit.Text:= IntToStr(DeltaXUpDown.Max);
+end;
+// \83\8c\83X\83|\83b\83v\83A\83b\83v\88Ê\92uY
+procedure TKuroutOption.DeltaYLabeledEditExit(Sender: TObject);
+begin
+       if not GikoSys.IsNumeric(DeltaYLabeledEdit.Text) then
+        DeltaYLabeledEdit.Text := IntToStr(GikoSys.Setting.RespopupDeltaY);
+    if StrToInt(DeltaYLabeledEdit.Text) < DeltaYUpDown.Min then
+        DeltaYLabeledEdit.Text := IntToStr(DeltaYUpDown.Min);
+    if StrToInt(DeltaYLabeledEdit.Text) > DeltaYUpDown.Max then
+        DeltaYLabeledEdit.Text := IntToStr(DeltaYUpDown.Max);
+end;
+
+procedure TKuroutOption.RespopupWaitLabeledEditExit(Sender: TObject);
+begin
+       if not GikoSys.IsNumeric(RespopupWaitLabeledEdit.Text) then
+               RespopupWaitLabeledEdit.Text := IntToStr(GikoSys.Setting.RespopupWait);
+    if StrToInt(RespopupWaitLabeledEdit.Text) < RespopupWaitUpDown.Min then
+               RespopupWaitLabeledEdit.Text := IntToStr(RespopupWaitUpDown.Min);
+    if StrToInt(RespopupWaitLabeledEdit.Text) > RespopupWaitUpDown.Max then
+               RespopupWaitLabeledEdit.Text := IntToStr(RespopupWaitUpDown.Max);
+end;
 
 end.
index 0c24a6e..11fd7ad 100644 (file)
@@ -55,12 +55,6 @@ type
 implementation
 uses MojuUtils, GikoSystem, Setting, Giko, GikoDataModule, Preview;
 
-const
-    // \97v\96]\82É\82æ\82Á\82Ä\82Í\95Ï\8dX\82Å\82«\82é\82æ\82¤\82É\82·\82é\81B
-    // \83}\83E\83X\83J\81[\83\\83\8b\82©\82ç\82Ì\82¸\82ç\82µ\88Ê\92u
-    DIV_X = 12;
-    DIV_Y = 8;
-
 constructor TResPopupBrowser.Create(AOwner: TComponent);
 begin
        inherited Create(AOwner);
@@ -162,7 +156,7 @@ procedure TResPopupBrowser.Write(ADocument: String; OnlyTitle: Boolean = False);
 var
        p: TPoint;
     doc: Variant;
-       ARect, rect: TRect;
+       ARect: TRect;
     FDispHtmlDocument: DispHTMLDocument;
 begin
     try
@@ -266,6 +260,7 @@ var
     ele: IHTMLElement2;
     h, w, dx1, dx2, dy1, dy2: Integer;
     MaxWidth, MaxHeight: Integer;
+    DIV_X, DIV_Y: Integer;
 begin
        GetCursorpos(p);
     ele := ((Self.Document as IHTMLDocument2).body as IHTMLElement2);
@@ -277,6 +272,9 @@ begin
         w := ele.scrollWidth + 10;
     end;
 
+    DIV_X := GikoSys.Setting.RespopupDeltaX;
+    DIV_Y := GikoSys.Setting.RespopupDeltaY;
+    
     dx1 := 0; dx2 := 0;
     dy1 := 0; dy2 := 0;
 
index 0e8175f..e2e1589 100644 (file)
@@ -454,6 +454,12 @@ type
         FCheckDatFile: Boolean;
         //! \93¯ID\83\8c\83X\83A\83\93\83J\81[\95\\8e¦
         FLimitResCountMessage: Boolean;
+        //! \83\8c\83X\83|\83b\83v\83A\83b\83v\95\\8e¦\88Ê\92udeltaX
+        FRespopupDeltaX: Integer;
+        //! \83\8c\83X\83|\83b\83v\83A\83b\83v\95\\8e¦\88Ê\92udeltaY
+        FRespopupDeltaY: Integer;
+        //! \83\8c\83X\83|\83b\83v\83A\83b\83v\83^\83C\83}\81[
+        FRespopupWait: Integer;
                function GetMainCoolSet(Index: Integer): TCoolSet;
                function GetBoardCoolSet(Index: Integer): TCoolSet;
                function GetBrowserCoolSet(Index: Integer): TCoolSet;
@@ -814,6 +820,12 @@ type
         //! \83C\83\93\83f\83b\83N\83X\93Ç\82Ý\8d\9e\82Ý\8e\9edat\83t\83@\83C\83\8b\83`\83F\83b\83N
         property CheckDatFile: Boolean read FCheckDatFile write FCheckDatFile;
         property LimitResCountMessage: Boolean read FLimitResCountMessage write FLimitResCountMessage;
+        //! \83\8c\83X\83|\83b\83v\83A\83b\83v\95\\8e¦\88Ê\92udeltaX
+        property  RespopupDeltaX: Integer read FRespopupDeltaX write FRespopupDeltaX;
+        //! \83\8c\83X\83|\83b\83v\83A\83b\83v\95\\8e¦\88Ê\92udeltaY
+        property RespopupDeltaY: Integer read FRespopupDeltaY write FRespopupDeltaY;
+        //! \83\8c\83X\83|\83b\83v\83A\83b\83v\83^\83C\83}\81[
+        property RespopupWait: Integer read FRespopupWait write FRespopupWait;
 end;
 
 
@@ -1153,6 +1165,10 @@ begin
         if (FPopupPosition = gppCenter) then begin
             FPopupPosition := gppTop;
         end;
+        FRespopupDeltaX := ini.ReadInteger('Browser', 'RespopupDelteX', 5);
+        FRespopupDeltaY := ini.ReadInteger('Browser', 'RespopupDelteY', 5);
+        FRespopupWait   := ini.ReadInteger('Browser', 'RespopupWait', 1000);
+
                //\83A\83h\83\8c\83X\83o\81[
                FURLDisplay := ini.ReadBool('AddressBar', 'URLDisplay', False);
                FAddressBarTabStop := ini.ReadBool('AddressBar', 'TabStop', True);
@@ -1526,6 +1542,9 @@ begin
 
                //\83|\83b\83v\83A\83b\83v\88Ê\92u
                ini.WriteInteger('Browser', 'PopupPosition', Ord(FPopupPosition));
+        ini.WriteInteger('Browser', 'RespopupDelteX', FRespopupDeltaX);
+        ini.WriteInteger('Browser', 'RespopupDelteY', FRespopupDeltaY);
+        ini.WriteInteger('Browser', 'RespopupWait', FRespopupWait);
 
                //\83A\83h\83\8c\83X\83o\81[
                ini.WriteBool('AddressBar', 'URLDisplay', FURLDisplay);
index 215e833..b0fd3a3 100644 (file)
Binary files a/gikoNavi.res and b/gikoNavi.res differ