• This repository has been archived on 20/Jan/2020
  • Stars
    star
    147
  • Rank 243,465 (Top 5 %)
  • Language Pascal
  • License
    Apache License 2.0
  • Created over 8 years ago
  • Updated over 5 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

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

###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

More Repositories

1

govcl

Cross-platform Go/Golang GUI library.
Go
2,098
star
2

rproxy

简单的反向代理用于内网穿透,支持HTTP/HTTPS转发
Go
128
star
3

liblcl

A common cross-platform GUI library, the core uses Lazarus LCL.
Pascal
121
star
4

htmlparser

delphi html parser(代码是改自原wr960204的HtmlParser)
Pascal
69
star
5

dylib

Universal cross-platform dynamic link library call, support dll, so, dylib. Move from: github.com/ying32/govcl/vcl/dylib
Go
42
star
6

readability

readability for golang. 网页文章标题和正文抽取工具
Go
32
star
7

nim-vcl

cross-platform nim GUI
Nim
31
star
8

res2go-ide-plugin

res2go Lazarus IDE plug-in
Pascal
30
star
9

xldl

迅雷下载引擎SDK Go语言版
Go
27
star
10

JavaClassToDelphiUnit

解析JavaClass文件生成Delphi开发Android单元
Pascal
19
star
11

rust-vcl

cross-platform rust GUI
Rust
13
star
12

FMXWndProcHook

FMX下TForm的WndProc HOOK
Pascal
8
star
13

delphi-javascript

Automatically exported from code.google.com/p/delphi-javascript
Pascal
8
star
14

qqwry

纯真ip数据库查询
Go
7
star
15

alidayu

阿里大于最新sdk 2017-05-25
Go
7
star
16

ying32.github.io

Official website of GoVCL
Go
5
star
17

jxmarshal

json and xml Marshal/UnMarshal
Pascal
5
star
18

liblclbinres

此仓库只是用来存储golang的liblcl二进制包(This repository is only used to store golang liblcl binary package)
Go
5
star
19

xl7

xl7 sdk for Go, 迅雷7 Go语言SDK。这个版本的官方Demo都有问题,没具体研究过问题出在何处,推荐用老版本的SDK
Go
5
star
20

RTXCPluginForDelphiSDK

导入自:https://gitee.com/ying32/RTXCPluginForDelphiSDK
Pascal
4
star
21

IpoptPasHeader

Ipopt Pascal头文件
Pascal
3
star
22

babel

jsx编译和压缩
Go
3
star
23

YingBlog

自己的一个博客站点,学习golang的第二个作品
Go
2
star
24

sdnsserver

simple dns server
Go
2
star
25

dcef3

Automatically exported from code.google.com/p/dcef3
Pascal
2
star