Giter VIP home page Giter VIP logo

ajunlonglive / duilib-for-delphi Goto Github PK

View Code? Open in Web Editor NEW

This project forked from ying32/duilib-for-delphi

0.0 0.0 0.0 62.45 MB

DDuilib是一个建立在C++开源项目duilib之上,且最大限度不去修改duilib源代码从而可以应用在Delphi或者FreePascal中构建Direcut UI的开源项目(作者已弃坑)。

License: Apache License 2.0

JavaScript 2.86% C++ 32.69% C 6.17% PHP 3.59% CSS 0.30% Pascal 50.21% HTML 4.18%

duilib-for-delphi's Introduction

###DDuilib


目录


项目介绍

什么是DDuilib(原名“Duilib for Delphi”)? DDuilib是一个建立在C++开源项目duilib之上,且最大限度不去修改duilib源代码从而可以应用在Delphi或者FreePascal中构建 DirectUI的开源项目。在此也非常感谢duilib作者的辛劳,没有他的库也许就没有现在这DDuilib 更多关于项目的开发可以访问我的博客

其它说明

用作项目时,同一个Form(Window)能不使用VCL混合就不混合,切记。

考虑到github经常被墙和访问慢的缘故,这里使用了2个地址存放代码以满足不同用户访问: 1、Github项目地址 2、OSC项目地址

--重要说明--

所有的代码都是在DelphiXE6下编写的,后来考虑到低版本的用户无法使用,就对代码做了兼容性调整,目前可以应用在Delphi7或者高于Delphi7版本和FreePascal中。
由于Delphi版本过多,可能有些没有照顾到,大家可以向我提出,我会第一时间修改。
这里作者不推荐使用不支持Unicode的Delphi版本。
另有时候可能没有太多时间对非Unicode版本做兼容性测试,希望大家见谅,但一有空就会修复兼容性问题。

初次使用

使用DDuilib需要具备一定的Delphi基础,其次,最好了解下duilib以及如何建立UI的xml布局文件,这样学习起来会少走很多弯路。此外DDuilib分为两个版本,一个是以库形式提供不需要安装,另一个则是以VCL组件形式提供。

简单示例:完整示例可查看Duilib for Delphi入门

另外做了个VCL版本的,在DDulib目录下DDuilibVcl组件工程,每个窗口分别添加TDDuiForm组件,并指定相应的布局资源及文件资源。使用此组件可以简化创建窗口部分并可以和VCL相结合。

安装DDuilib组件:
安装前,需要将DDuilib依赖的Duilib_ud.dll或者Duilib.dll放入与bpl相同目录,或者环境变量路径中。
下般默认是放公共的Bpl目录中,例如:C:\Users\Public\Documents\Embarcadero\Studio\14.0\Bpl\

// dpr文件
program Apps;

uses
  DuiWindowImplBase;

constructor TAppsWindow.Create;
begin
  inherited Create('MainWindow.xml', 'skin\Apps');
  CreateWindow(0, 'Apps', UI_WNDSTYLE_FRAME, WS_EX_WINDOWEDGE);
end;

destructor TAppsWindow.Destroy;
begin
  inherited;
end;

function TAppsWindow.DoCreateControl(pstrStr: string): CControlUI;
begin
  Result := nil;
end;

procedure TAppsWindow.DoHandleMessage(var Msg: TMessage; var bHandled: BOOL);
begin
  inherited;
end;

procedure TAppsWindow.DoInitWindow;
begin
  inherited;
end;

procedure TAppsWindow.DoNotify(var Msg: TNotifyUI);
var
  LType, LCtlName: string;
begin
  inherited;
  LType := Msg.sType;
  LCtlName := Msg.pSender.Name;
  if LType.Equals(DUI_MSGTYPE_CLICK) then
  begin
    if LCtlName.Equals(kclosebtn) then
      DuiApplication.Terminate
    else if LCtlName.Equals(krestorebtn) then
      Restore
    else if LCtlName.Equals(kmaxbtn) then
      Maximize
    else if LCtlName.Equals(kminbtn) then
      Minimize;
  end;
end;

{$R *.res}

begin
  DuiApplication.Initialize;
  AppsWindow := TAppsWindow.Create;
  AppsWindow.Show;
  DuiApplication.Run;
  AppsWindow.Free;
end.

自行编译

正常情况下本人已经提供了编译好后的各个版本duilib二进制,存放在Duilib\bin目录下。 现已提供本人修改过后的duilib源码,工程是用vs2013编译的

目录详情

  • 1、 DDuilib
    • duilib for Delphi源目录。
  • 2、 CppConvert
    • 原Duilib头文件转换工具代码
  • 3、Demo
    • Demo工程目录
  • 4、Duilib
    • 存放原duilib工程目录。
    • 4.1、 bin
      • 存放编译后的二进制及图片和xml资源,里面有的包含原duilib的资源文件
    • 4.2、 Duilib
      • 存放duilib c++工程源码
  • 5、ThirdParty
    • 存放一些第三方的库或者二进制文件
  • 6、Screenshot
    • 例程截图相关

截图

QQDemo截图1
QQDemo截图2
应用程序管理截图
PC管家截图
QQ旋风
QQ登录界面
播放器1,只展示不开源
播放器2,只展示不开源

作者信息

ying32

duilib-for-delphi's People

Contributors

ying32 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.