Git Product home page Git Product logo

directui's Introduction

directui

前言

本项目将开源项目[duilib](GitHub - duilib/duilib)以及[gtkduilib](GitHub - progmboy/gtkduilib)两个项目的源码进行整合。提供统一接口,以便duilib能够以统一的接口运行在不同的操作系统平台以及国产化的操作系统。项目中采用了c++11标准编写代码,在涉及的常量字符串中使用u8(这是c++11的字符串常量前缀)作为前缀,表示字符串以utf8的编码方式进行内存存储。这样同一份代码无论是在windows操作系统还是linux操作系统,使用gcc还是vs或是其它编译器进行编译,字符串都是以utf8编码的格式编译到目标文件中。由于windows操作系统平台使用A和W两种版本的API函数,Linux操作系统的API默认使用utf8编码,对于操作系统API的调用在windows操作系统平台只需要utf8编码的字符串转换为UCS2,然后调用windows操作系统的W版本API如CreateWindowW、GetTextMetricsW、CreateFontIndirectW等。

简介

项目目标是将duilib及gtkduilib两个项目进行整合,提供统一的接口。实现一个适合windows、linux以及国产化操作系统的duilib项目,通过简单的xml就能够实现界面效果。为了实现源码能够在不同操作系统,不同的编译器进行编译的目标,所有源码文件的编码格式默认都是UTF8+BOM,这样能够保证无论使用gcc还是vs、在windows还是linux操作系统或是国产化操作系统上进行编译时都不会有编译错误。若使用其它的文件编码格式,源码中存在汉字时可能会造成不同编译器在编译过程中出现错误。

效果示例

目前已将[duilib](GitHub - duilib/duilib)原版本中部分示例完成了移植,在不同操作系统平台展示出一致的效果。

  • windows 操作系统

360safe_win list_win

  • Ubuntu 20

360safe_ubuntu list_ubuntu

  • deepin

360safe_deepin list_deepin

  • 银河麒麟

360safe_kylin

list_kylin

  • UOS

技术交流

欢迎添加微信进行技术交流 微信联系方式

TODO

  • DrawHtml功能目前已完成window操作系统的W版本修改工作。Linux已完成DrawHtml大部分功能移植,但是对于选中文本背景色功能还未实现

  • Edit控件不使用原版中的代码,使用自绘控件功能,目前windows已完成Edit部分功能开发;可支持输入法输入文本,backspace删除文字、delete删除文字、home光标定位、end光标定位功能,但不支持全选。Linux只能显示文字,还不能输入文本。

  • Duilib原版本中的其它示例的移植

  • Tree控件

directui's People

Contributors

mxway 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.