Develop and Download Open Source Software

Browse CVS Repository

Diff of /gikonavigoeson/gikonavi/Giko.pas

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph | View Patch Patch

revision 1.480 by yoffy, Wed Oct 27 00:53:44 2004 UTC revision 1.481 by h677, Tue Nov 2 13:33:38 2004 UTC
# Line 990  type Line 990  type
990                  FResRangeMenuSelect     : Longint;                      ///< ResRangeButton で選択されている項目 (フォーマットは ResRange 互換)                  FResRangeMenuSelect     : Longint;                      ///< ResRangeButton で選択されている項目 (フォーマットは ResRange 互換)
991                  FStartUp : Boolean;                  FStartUp : Boolean;
992                  FIsHandledWheel : Boolean;                      ///< 既に受け取った WM_MOUSEWHEEL かどうか                  FIsHandledWheel : Boolean;                      ///< 既に受け取った WM_MOUSEWHEEL かどうか
                 FDefSelectComboBoxProc : TWndMethod;    //!< SelectComboBox デフォルトハンドラ  
993                  procedure SetBoardTreeNode( inBBS : TBBS );                  procedure SetBoardTreeNode( inBBS : TBBS );
994                  function SetCategoryListItem(ABBS2ch: TBBS): Integer;                  function SetCategoryListItem(ABBS2ch: TBBS): Integer;
995                  function SetBoardListItem(Category: TCategory): Integer;                  function SetBoardListItem(Category: TCategory): Integer;
# Line 1099  type Line 1098  type
1098                  procedure OnGestureMove(Sender: TObject);                  procedure OnGestureMove(Sender: TObject);
1099                  //! マウスジェスチャー終了                  //! マウスジェスチャー終了
1100                  procedure OnGestureEnd(Sender: TObject);                  procedure OnGestureEnd(Sender: TObject);
                 //! SelectComboBox ハンドラ  
                 procedure SelectComboBoxWndProc(var Message: TMessage);  
1101                  //! 絞り込み文字列設定                  //! 絞り込み文字列設定
1102                  procedure SetSelectWord( const text : string );                  procedure SetSelectWord( const text : string );
1103          protected          protected
# Line 1596  begin Line 1593  begin
1593          ReadToolBarSetting(ActionList, StdToolBar);          ReadToolBarSetting(ActionList, StdToolBar);
1594          ReadToolBarSetting(ActionList, ListToolBar);          ReadToolBarSetting(ActionList, ListToolBar);
1595          try          try
                 // SelectComboBox デフォルトハンドラ退避  
                 FDefSelectComboBoxProc := SelectComboBox.WindowProc;  
                 // ハンドラをフック  
                 SelectComboBox.WindowProc := SelectComboBoxWndProc;  
1596                  for i := ListToolBar.ControlCount - 1 downto 0 do                  for i := ListToolBar.ControlCount - 1 downto 0 do
1597                  begin                  begin
1598                          if ListToolBar.Controls[ i ].Action = SelectItemAction then                          if ListToolBar.Controls[ i ].Action = SelectItemAction then
# Line 9056  end; Line 9049  end;
9049    
9050  procedure TGikoForm.SelectComboBoxKeyDown(Sender: TObject; var Key: Word;  procedure TGikoForm.SelectComboBoxKeyDown(Sender: TObject; var Key: Word;
9051          Shift: TShiftState);          Shift: TShiftState);
9052    var
9053      IMC: HIMC;
9054      Len: integer;
9055      Str: string;
9056      tmp: string;
9057  begin  begin
9058    
9059          if Key = VK_Return then          if Key = VK_Return then
9060          begin          begin
9061                  ModifySelectList;                  ModifySelectList;
9062            end else if Key = 229 then begin
9063                    IMC := ImmGetContext(SelectComboBox.Handle); //コンテキスト取得
9064                    Len := ImmGetCompositionString(IMC, GCS_COMPSTR, nil, 0); //まず長さを取得
9065                    SetLength(Str, Len + 1); //Bufferのメモリを設定
9066                    ImmGetCompositionString(IMC, GCS_COMPSTR, PChar(Str), Len + 1); //まず長さを取得
9067                    ImmReleaseContext(SelectComboBox.Handle, IMC);  //コンテキスト解放
9068                    SetLength(Str, Len);
9069                    if SelectComboBox.SelLength > 0 then begin //選択中の文字列があるか
9070                            tmp := Copy(SelectComboBox.Text, 1, SelectComboBox.SelStart);
9071                            Str := tmp + Str + Copy(SelectComboBox.Text, SelectComboBox.SelStart + SelectComboBox.SelLength + 1, Length(SelectComboBox.Text));
9072                    end else
9073                            Str := SelectComboBox.Text + Str;
9074    
9075                    SetSelectWord(Str);
9076          end else if Length( SelectComboBox.Text ) = 0 then          end else if Length( SelectComboBox.Text ) = 0 then
9077          begin          begin
9078                  {* SelectComboBox.Textが空でも、入力途中でEscしたとか                  {* SelectComboBox.Textが空でも、入力途中でEscしたとか
# Line 10884  end; Line 10896  end;
10896  function TGikoForm.WebBrowserOnMouseDown(Sender: TObject): WordBool;  function TGikoForm.WebBrowserOnMouseDown(Sender: TObject): WordBool;
10897  var  var
10898          p :TPoint;          p :TPoint;
         i : Integer;  
10899          e: IHTMLElement;          e: IHTMLElement;
         a: IHTMLElement;  
10900          document: IHTMLDocument2;          document: IHTMLDocument2;
10901          docAll: IHTMLElementCollection;          docAll: IHTMLElementCollection;
10902          firstElement: IHTMLElement;          firstElement: IHTMLElement;
# Line 11919  begin Line 11929  begin
11929    
11930  end;  end;
11931    
 procedure TGikoForm.SelectComboBoxWndProc(var Message: TMessage);  
 var  
   IMC: HIMC;  
   Len: integer;  
   Str: string;  
   W: Word;  
   CH, CL : Char;  
   tmp: string;  
 begin  
   
         //Message.LParam and $FF0000 <> 0はキーボード入力に限定するため  
         if (Message.Msg = WM_CHAR) and (Message.LParam and $FF0000 <> 0) then begin  
                 W := TWMKey(Message).CharCode;  
                 //if W > 31 then begin  
                         if W > 255 then begin  
                                 CL := Chr(Lo(W));  
                                 CH := Chr(Hi(W));  
                                 Str := CH + CL;  
                         end else  
                                 Str := Chr(Lo(W));  
   
                         SetSelectWord( Str );  
                 //end;  
                 Message.Result := 0;  
         end else if (Message.Msg = WM_IME_COMPOSITION) and ((Message.LParam and GCS_RESULTREADSTR) <> 0) then begin  
                 IMC := ImmGetContext(SelectComboBox.Handle); //コンテキスト取得  
                 Len := ImmGetCompositionString(IMC, GCS_RESULTREADSTR, nil, 0); //まず長さを取得  
                 SetLength(Str, Len + 1); //Bufferのメモリを設定  
                 ImmGetCompositionString(IMC, GCS_RESULTREADSTR, PChar(Str), Len + 1); //Bufferにコピー  
                 ImmReleaseContext(SelectComboBox.Handle, IMC);  //コンテキスト解放  
                 SetLength(Str, Len);  
   
                 SetSelectWord( Str );  
         end else if (Message.Msg = WM_IME_COMPOSITION) and ((Message.LParam and GCS_COMPSTR) <> 0) then begin  
                 IMC := ImmGetContext(SelectComboBox.Handle); //コンテキスト取得  
                 Len := ImmGetCompositionString(IMC, GCS_COMPSTR, nil, 0); //まず長さを取得  
                 SetLength(Str, Len + 1); //Bufferのメモリを設定  
                 ImmGetCompositionString(IMC, GCS_COMPSTR, PChar(Str), Len + 1); //まず長さを取得  
                 ImmReleaseContext(SelectComboBox.Handle, IMC);  //コンテキスト解放  
                 SetLength(Str, Len);  
                 if SelectComboBox.SelLength > 0 then begin //選択中の文字列があるか  
                         tmp := Copy(SelectComboBox.Text, 1, SelectComboBox.SelStart);  
                         Str := tmp + Str + Copy(SelectComboBox.Text, SelectComboBox.SelStart + SelectComboBox.SelLength + 1, Length(SelectComboBox.Text));  
                 end else  
                         Str := SelectComboBox.Text + Str;  
   
                 SetSelectWord(Str);  
         end;  
   
         FDefSelectComboBoxProc(Message);  
           
 end;  
11932    
11933  initialization  initialization
11934                                  OleInitialize(nil);                                  OleInitialize(nil);

Legend:
Removed from v.1.480  
changed lines
  Added in v.1.481

Back to OSDN">Back to OSDN
ViewVC Help
Powered by ViewVC 1.1.26