⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 comexspeedbutton.pas

📁 类似QQ的源码程序
💻 PAS
字号:
unit COMExSpeedButton;
{
    Copyright 2006, Peter Millard

    This file is part of Exodus.

    Exodus is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation; either version 2 of the License, or
    (at your option) any later version.

    Exodus is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.

    You should have received a copy of the GNU General Public License
    along with Exodus; if not, write to the Free Software
    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
}


{-----------------------------------------------------------------------------}
{-----------------------------------------------------------------------------}
{ This is autogenerated code using the COMGuiGenerator. DO NOT MODIFY BY HAND }
{-----------------------------------------------------------------------------}
{-----------------------------------------------------------------------------}


{$WARN SYMBOL_PLATFORM OFF}

interface
uses
    ActiveX,Buttons,Classes,COMExFont,COMExPopupMenu,ComObj,Controls,Exodus_TLB,Forms,Graphics,StdCtrls,StdVcl,TntButtons,TntMenus;

type
    TExControlSpeedButton = class(TAutoObject, IExodusControl, IExodusControlSpeedButton)
    public
        constructor Create(control: TTntSpeedButton);

    private
        _control: TTntSpeedButton;

    protected
        function Get_ControlType: ExodusControlTypes; safecall;
        function Get_Name: Widestring; safecall;
        procedure Set_Name(const Value: Widestring); safecall;
        function Get_Tag: Integer; safecall;
        procedure Set_Tag(Value: Integer); safecall;
        function Get_Left: Integer; safecall;
        procedure Set_Left(Value: Integer); safecall;
        function Get_Top: Integer; safecall;
        procedure Set_Top(Value: Integer); safecall;
        function Get_Width: Integer; safecall;
        procedure Set_Width(Value: Integer); safecall;
        function Get_Height: Integer; safecall;
        procedure Set_Height(Value: Integer); safecall;
        function Get_Cursor: Integer; safecall;
        procedure Set_Cursor(Value: Integer); safecall;
        function Get_Hint: Widestring; safecall;
        procedure Set_Hint(const Value: Widestring); safecall;
        function Get_HelpType: Integer; safecall;
        procedure Set_HelpType(Value: Integer); safecall;
        function Get_HelpKeyword: Widestring; safecall;
        procedure Set_HelpKeyword(const Value: Widestring); safecall;
        function Get_HelpContext: Integer; safecall;
        procedure Set_HelpContext(Value: Integer); safecall;
        function Get_AllowAllUp: Integer; safecall;
        procedure Set_AllowAllUp(Value: Integer); safecall;
        function Get_BiDiMode: Integer; safecall;
        procedure Set_BiDiMode(Value: Integer); safecall;
        function Get_GroupIndex: Integer; safecall;
        procedure Set_GroupIndex(Value: Integer); safecall;
        function Get_Down: Integer; safecall;
        procedure Set_Down(Value: Integer); safecall;
        function Get_Caption: Widestring; safecall;
        procedure Set_Caption(const Value: Widestring); safecall;
        function Get_Enabled: Integer; safecall;
        procedure Set_Enabled(Value: Integer); safecall;
        function Get_Flat: Integer; safecall;
        procedure Set_Flat(Value: Integer); safecall;
        function Get_Font: IExodusControlFont; safecall;
        function Get_Layout: Integer; safecall;
        procedure Set_Layout(Value: Integer); safecall;
        function Get_Margin: Integer; safecall;
        procedure Set_Margin(Value: Integer); safecall;
        function Get_NumGlyphs: Integer; safecall;
        procedure Set_NumGlyphs(Value: Integer); safecall;
        function Get_ParentFont: Integer; safecall;
        procedure Set_ParentFont(Value: Integer); safecall;
        function Get_ParentShowHint: Integer; safecall;
        procedure Set_ParentShowHint(Value: Integer); safecall;
        function Get_ParentBiDiMode: Integer; safecall;
        procedure Set_ParentBiDiMode(Value: Integer); safecall;
        function Get_PopupMenu: IExodusControlPopupMenu; safecall;
        function Get_ShowHint: Integer; safecall;
        procedure Set_ShowHint(Value: Integer); safecall;
        function Get_Spacing: Integer; safecall;
        procedure Set_Spacing(Value: Integer); safecall;
        function Get_Transparent: Integer; safecall;
        procedure Set_Transparent(Value: Integer); safecall;
        function Get_Visible: Integer; safecall;
        procedure Set_Visible(Value: Integer); safecall;
    end;


{---------------------------------------}
{---------------------------------------}
{---------------------------------------}
implementation


constructor TExControlSpeedButton.Create(control: TTntSpeedButton);
begin
     _control := control; 
end;

function TExControlSpeedButton.Get_ControlType: ExodusControlTypes;
begin
    Result := ExodusControlSpeedButton;
end;

function TExControlSpeedButton.Get_Name: Widestring;
begin
      Result := _control.Name;
end;

procedure TExControlSpeedButton.Set_Name(const Value: Widestring);
begin
      _control.Name := Value;
end;

function TExControlSpeedButton.Get_Tag: Integer;
begin
      Result := _control.Tag;
end;

procedure TExControlSpeedButton.Set_Tag(Value: Integer);
begin
      _control.Tag := Value;
end;

function TExControlSpeedButton.Get_Left: Integer;
begin
      Result := _control.Left;
end;

procedure TExControlSpeedButton.Set_Left(Value: Integer);
begin
      _control.Left := Value;
end;

function TExControlSpeedButton.Get_Top: Integer;
begin
      Result := _control.Top;
end;

procedure TExControlSpeedButton.Set_Top(Value: Integer);
begin
      _control.Top := Value;
end;

function TExControlSpeedButton.Get_Width: Integer;
begin
      Result := _control.Width;
end;

procedure TExControlSpeedButton.Set_Width(Value: Integer);
begin
      _control.Width := Value;
end;

function TExControlSpeedButton.Get_Height: Integer;
begin
      Result := _control.Height;
end;

procedure TExControlSpeedButton.Set_Height(Value: Integer);
begin
      _control.Height := Value;
end;

function TExControlSpeedButton.Get_Cursor: Integer;
begin
      Result := _control.Cursor;
end;

procedure TExControlSpeedButton.Set_Cursor(Value: Integer);
begin
      _control.Cursor := Value;
end;

function TExControlSpeedButton.Get_Hint: Widestring;
begin
      Result := _control.Hint;
end;

procedure TExControlSpeedButton.Set_Hint(const Value: Widestring);
begin
      _control.Hint := Value;
end;

function TExControlSpeedButton.Get_HelpType: Integer;
begin
    if (_control.HelpType = htKeyword) then Result := 0;
    if (_control.HelpType = htContext) then Result := 1;
end;

procedure TExControlSpeedButton.Set_HelpType(Value: Integer);
begin
   if (Value = 0) then _control.HelpType := htKeyword;
   if (Value = 1) then _control.HelpType := htContext;
end;

function TExControlSpeedButton.Get_HelpKeyword: Widestring;
begin
      Result := _control.HelpKeyword;
end;

procedure TExControlSpeedButton.Set_HelpKeyword(const Value: Widestring);
begin
      _control.HelpKeyword := Value;
end;

function TExControlSpeedButton.Get_HelpContext: Integer;
begin
      Result := _control.HelpContext;
end;

procedure TExControlSpeedButton.Set_HelpContext(Value: Integer);
begin
      _control.HelpContext := Value;
end;

function TExControlSpeedButton.Get_AllowAllUp: Integer;
begin
    if (_control.AllowAllUp = False) then Result := 0;
    if (_control.AllowAllUp = True) then Result := 1;
end;

procedure TExControlSpeedButton.Set_AllowAllUp(Value: Integer);
begin
   if (Value = 0) then _control.AllowAllUp := False;
   if (Value = 1) then _control.AllowAllUp := True;
end;

function TExControlSpeedButton.Get_BiDiMode: Integer;
begin
    if (_control.BiDiMode = bdLeftToRight) then Result := 0;
    if (_control.BiDiMode = bdRightToLeft) then Result := 1;
    if (_control.BiDiMode = bdRightToLeftNoAlign) then Result := 2;
    if (_control.BiDiMode = bdRightToLeftReadingOnly) then Result := 3;
end;

procedure TExControlSpeedButton.Set_BiDiMode(Value: Integer);
begin
   if (Value = 0) then _control.BiDiMode := bdLeftToRight;
   if (Value = 1) then _control.BiDiMode := bdRightToLeft;
   if (Value = 2) then _control.BiDiMode := bdRightToLeftNoAlign;
   if (Value = 3) then _control.BiDiMode := bdRightToLeftReadingOnly;
end;

function TExControlSpeedButton.Get_GroupIndex: Integer;
begin
      Result := _control.GroupIndex;
end;

procedure TExControlSpeedButton.Set_GroupIndex(Value: Integer);
begin
      _control.GroupIndex := Value;
end;

function TExControlSpeedButton.Get_Down: Integer;
begin
    if (_control.Down = False) then Result := 0;
    if (_control.Down = True) then Result := 1;
end;

procedure TExControlSpeedButton.Set_Down(Value: Integer);
begin
   if (Value = 0) then _control.Down := False;
   if (Value = 1) then _control.Down := True;
end;

function TExControlSpeedButton.Get_Caption: Widestring;
begin
      Result := _control.Caption;
end;

procedure TExControlSpeedButton.Set_Caption(const Value: Widestring);
begin
      _control.Caption := Value;
end;

function TExControlSpeedButton.Get_Enabled: Integer;
begin
    if (_control.Enabled = False) then Result := 0;
    if (_control.Enabled = True) then Result := 1;
end;

procedure TExControlSpeedButton.Set_Enabled(Value: Integer);
begin
   if (Value = 0) then _control.Enabled := False;
   if (Value = 1) then _control.Enabled := True;
end;

function TExControlSpeedButton.Get_Flat: Integer;
begin
    if (_control.Flat = False) then Result := 0;
    if (_control.Flat = True) then Result := 1;
end;

procedure TExControlSpeedButton.Set_Flat(Value: Integer);
begin
   if (Value = 0) then _control.Flat := False;
   if (Value = 1) then _control.Flat := True;
end;

function TExControlSpeedButton.Get_Font: IExodusControlFont;
begin
      Result := TExControlFont.Create(TFont(_control.Font));
end;

function TExControlSpeedButton.Get_Layout: Integer;
begin
    if (_control.Layout = blGlyphLeft) then Result := 0;
    if (_control.Layout = blGlyphRight) then Result := 1;
    if (_control.Layout = blGlyphTop) then Result := 2;
    if (_control.Layout = blGlyphBottom) then Result := 3;
end;

procedure TExControlSpeedButton.Set_Layout(Value: Integer);
begin
   if (Value = 0) then _control.Layout := blGlyphLeft;
   if (Value = 1) then _control.Layout := blGlyphRight;
   if (Value = 2) then _control.Layout := blGlyphTop;
   if (Value = 3) then _control.Layout := blGlyphBottom;
end;

function TExControlSpeedButton.Get_Margin: Integer;
begin
      Result := _control.Margin;
end;

procedure TExControlSpeedButton.Set_Margin(Value: Integer);
begin
      _control.Margin := Value;
end;

function TExControlSpeedButton.Get_NumGlyphs: Integer;
begin
      Result := _control.NumGlyphs;
end;

procedure TExControlSpeedButton.Set_NumGlyphs(Value: Integer);
begin
      _control.NumGlyphs := Value;
end;

function TExControlSpeedButton.Get_ParentFont: Integer;
begin
    if (_control.ParentFont = False) then Result := 0;
    if (_control.ParentFont = True) then Result := 1;
end;

procedure TExControlSpeedButton.Set_ParentFont(Value: Integer);
begin
   if (Value = 0) then _control.ParentFont := False;
   if (Value = 1) then _control.ParentFont := True;
end;

function TExControlSpeedButton.Get_ParentShowHint: Integer;
begin
    if (_control.ParentShowHint = False) then Result := 0;
    if (_control.ParentShowHint = True) then Result := 1;
end;

procedure TExControlSpeedButton.Set_ParentShowHint(Value: Integer);
begin
   if (Value = 0) then _control.ParentShowHint := False;
   if (Value = 1) then _control.ParentShowHint := True;
end;

function TExControlSpeedButton.Get_ParentBiDiMode: Integer;
begin
    if (_control.ParentBiDiMode = False) then Result := 0;
    if (_control.ParentBiDiMode = True) then Result := 1;
end;

procedure TExControlSpeedButton.Set_ParentBiDiMode(Value: Integer);
begin
   if (Value = 0) then _control.ParentBiDiMode := False;
   if (Value = 1) then _control.ParentBiDiMode := True;
end;

function TExControlSpeedButton.Get_PopupMenu: IExodusControlPopupMenu;
begin
      Result := TExControlPopupMenu.Create(TTntPopupMenu(_control.PopupMenu));
end;

function TExControlSpeedButton.Get_ShowHint: Integer;
begin
    if (_control.ShowHint = False) then Result := 0;
    if (_control.ShowHint = True) then Result := 1;
end;

procedure TExControlSpeedButton.Set_ShowHint(Value: Integer);
begin
   if (Value = 0) then _control.ShowHint := False;
   if (Value = 1) then _control.ShowHint := True;
end;

function TExControlSpeedButton.Get_Spacing: Integer;
begin
      Result := _control.Spacing;
end;

procedure TExControlSpeedButton.Set_Spacing(Value: Integer);
begin
      _control.Spacing := Value;
end;

function TExControlSpeedButton.Get_Transparent: Integer;
begin
    if (_control.Transparent = False) then Result := 0;
    if (_control.Transparent = True) then Result := 1;
end;

procedure TExControlSpeedButton.Set_Transparent(Value: Integer);
begin
   if (Value = 0) then _control.Transparent := False;
   if (Value = 1) then _control.Transparent := True;
end;

function TExControlSpeedButton.Get_Visible: Integer;
begin
    if (_control.Visible = False) then Result := 0;
    if (_control.Visible = True) then Result := 1;
end;

procedure TExControlSpeedButton.Set_Visible(Value: Integer);
begin
   if (Value = 0) then _control.Visible := False;
   if (Value = 1) then _control.Visible := True;
end;




end.

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -