Compare commits
12 Commits
26-1-27
...
ab7ee978e7
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
ab7ee978e7 | ||
|
|
e22a779dda | ||
|
|
dcdbf051d0 | ||
|
|
bcb56200c1 | ||
|
|
0811c0eabb | ||
|
|
415d9ab518 | ||
|
|
76be13001f | ||
|
|
814f42120c | ||
|
|
4fe4749826 | ||
|
|
2ff880c267 | ||
|
|
abcfc78596 | ||
|
|
bcbf890ebd |
63
.gitattributes
vendored
63
.gitattributes
vendored
@@ -1,63 +0,0 @@
|
||||
###############################################################################
|
||||
# Set default behavior to automatically normalize line endings.
|
||||
###############################################################################
|
||||
* text=auto
|
||||
|
||||
###############################################################################
|
||||
# Set default behavior for command prompt diff.
|
||||
#
|
||||
# This is need for earlier builds of msysgit that does not have it on by
|
||||
# default for csharp files.
|
||||
# Note: This is only used by command line
|
||||
###############################################################################
|
||||
#*.cs diff=csharp
|
||||
|
||||
###############################################################################
|
||||
# Set the merge driver for project and solution files
|
||||
#
|
||||
# Merging from the command prompt will add diff markers to the files if there
|
||||
# are conflicts (Merging from VS is not affected by the settings below, in VS
|
||||
# the diff markers are never inserted). Diff markers may cause the following
|
||||
# file extensions to fail to load in VS. An alternative would be to treat
|
||||
# these files as binary and thus will always conflict and require user
|
||||
# intervention with every merge. To do so, just uncomment the entries below
|
||||
###############################################################################
|
||||
#*.sln merge=binary
|
||||
#*.csproj merge=binary
|
||||
#*.vbproj merge=binary
|
||||
#*.vcxproj merge=binary
|
||||
#*.vcproj merge=binary
|
||||
#*.dbproj merge=binary
|
||||
#*.fsproj merge=binary
|
||||
#*.lsproj merge=binary
|
||||
#*.wixproj merge=binary
|
||||
#*.modelproj merge=binary
|
||||
#*.sqlproj merge=binary
|
||||
#*.wwaproj merge=binary
|
||||
|
||||
###############################################################################
|
||||
# behavior for image files
|
||||
#
|
||||
# image files are treated as binary by default.
|
||||
###############################################################################
|
||||
#*.jpg binary
|
||||
#*.png binary
|
||||
#*.gif binary
|
||||
|
||||
###############################################################################
|
||||
# diff behavior for common document formats
|
||||
#
|
||||
# Convert binary document formats to text before diffing them. This feature
|
||||
# is only available from the command line. Turn it on by uncommenting the
|
||||
# entries below.
|
||||
###############################################################################
|
||||
#*.doc diff=astextplain
|
||||
#*.DOC diff=astextplain
|
||||
#*.docx diff=astextplain
|
||||
#*.DOCX diff=astextplain
|
||||
#*.dot diff=astextplain
|
||||
#*.DOT diff=astextplain
|
||||
#*.pdf diff=astextplain
|
||||
#*.PDF diff=astextplain
|
||||
#*.rtf diff=astextplain
|
||||
#*.RTF diff=astextplain
|
||||
18
.gitignore
vendored
18
.gitignore
vendored
@@ -1,7 +1,11 @@
|
||||
build/*
|
||||
build64/*
|
||||
_temp/
|
||||
_bin/
|
||||
temp/
|
||||
bin/
|
||||
.vs/
|
||||
/build
|
||||
/demo
|
||||
/_temp
|
||||
/_bin
|
||||
/temp
|
||||
/bin
|
||||
/.vs
|
||||
*.db
|
||||
*.gitignore
|
||||
*.gitattributes
|
||||
*.tlog
|
||||
47
CLAUDE.md
47
CLAUDE.md
@@ -9,20 +9,27 @@ EzUI 是一个基于原生 Win32 消息机制和 Direct2D 的 C++ 桌面 UI 框
|
||||
## 构建命令
|
||||
|
||||
```bash
|
||||
build.bat # 构建 32 位静态库
|
||||
build64.bat # 构建 64 位静态库
|
||||
build_x86.bat # 构建 32 位静态库
|
||||
build_x64.bat # 构建 64 位静态库
|
||||
```
|
||||
|
||||
CMake 构建:
|
||||
```bash
|
||||
cmake -B build
|
||||
cmake -B build # 默认静态库
|
||||
cmake --build build
|
||||
```
|
||||
|
||||
静态库/动态库切换:
|
||||
```bash
|
||||
cmake -B build -DBUILD_SHARED_LIBS=ON # 动态库
|
||||
cmake -B build -DBUILD_SHARED_LIBS=OFF # 静态库(默认)
|
||||
# 动态库
|
||||
cmake -B build -DBUILD_SHARED_LIBS=ON
|
||||
|
||||
# 仅构建库(不构建 demo)
|
||||
cmake -B build -DBUILD_DEMO=OFF
|
||||
|
||||
# 编译为静态库
|
||||
cmake --build build/vs2022_x86 --target EzUI --config Debug
|
||||
cmake --build build/vs2022_x86 --target EzUI --config Release
|
||||
cmake --build build/vs2022_x64 --target EzUI --config Debug
|
||||
cmake --build build/vs2022_x64 --target EzUI --config Release
|
||||
|
||||
```
|
||||
|
||||
## 核心架构
|
||||
@@ -37,8 +44,11 @@ cmake -B build -DBUILD_SHARED_LIBS=OFF # 静态库(默认)
|
||||
所有控件继承自 `Control` 基类,核心控件包括:
|
||||
- 基础控件:`Label`, `Button`, `TextBox`, `PictureBox`
|
||||
- 选择控件:`CheckBox`, `RadioButton`, `ComboBox`
|
||||
- 布局容器:`HLayout`, `VLayout`, `HListView`, `VListView`, `TileListView`, `TabLayout`
|
||||
- 功能控件:`ScrollBar`, `Menu`, `NotifyIcon`, `ProgressBar`, `TreeView`, `Spacer`
|
||||
- 数据控件:`TableView`, `TreeView`, `ListView` 系列
|
||||
- 布局容器:`HLayout`, `VLayout`, `HListView`, `VListView`, `TileListView`, `TabLayout`, `PagedListView`
|
||||
- 功能控件:`ScrollBar`, `Menu`, `NotifyIcon`, `ProgressBar`, `Spacer`, `IFrame`, `ShadowBox`
|
||||
- 表格控件:`TableView`
|
||||
- 动画:`Animation` - 类似 Qt 的过渡动画系统
|
||||
|
||||
### 布局系统
|
||||
- **尺寸优先级**:比例尺寸 (`SetRateWidth/Height`) > 绝对尺寸 (`SetFixedSize`) > 控件内容大小
|
||||
@@ -51,6 +61,8 @@ cmake -B build -DBUILD_SHARED_LIBS=OFF # 静态库(默认)
|
||||
- `UISelector` - CSS 选择器匹配系统
|
||||
- `Direct2DRender` - Direct2D 绘图实现
|
||||
- `RenderTypes` - 颜色、对齐方式等绘图类型
|
||||
- `UIDef` - 框架内使用的宏定义集合
|
||||
- `EzUI.h` - 框架主接口头文件,定义事件类、枚举、全局资源等核心结构
|
||||
|
||||
### 事件系统
|
||||
- 支持事件冒泡机制,可实现事件捕获与穿透
|
||||
@@ -67,6 +79,18 @@ cmake -B build -DBUILD_SHARED_LIBS=OFF # 静态库(默认)
|
||||
- 控件树内存由父控件自动管理:`Attach`/`Detach`
|
||||
- 图片资源通过 `PtrManager` 自动释放
|
||||
- XML 布局加载后由 `UIManager` 管理生命周期
|
||||
- `add_resource_package` 函数支持资源打包为 `.res` 文件
|
||||
|
||||
### 调试技巧
|
||||
- 在 Debug 模式下运行时,按下 `F11` 可实时查看布局信息,高亮显示控件边界
|
||||
|
||||
## Demo 项目
|
||||
|
||||
- `helloWorld` - 基础示例
|
||||
- `QQ` - 仿 QQ 登录界面(含资源打包)
|
||||
- `kugou` - 酷狗音乐播放器(含 VLC 依赖和资源打包)
|
||||
- `ResPackage` - 资源打包工具
|
||||
- `Adminstor` / `DemoUi` - 管理界面示例
|
||||
|
||||
## 开发约定
|
||||
|
||||
@@ -74,4 +98,5 @@ cmake -B build -DBUILD_SHARED_LIBS=OFF # 静态库(默认)
|
||||
- 源文件位于 `sources/` 目录
|
||||
- 一切皆控件,纯代码组合 UI
|
||||
- 使用 CSS 驱动视觉,结构与样式分离
|
||||
- 中文注释,中文沟通
|
||||
- XML 解析使用 `tinyxml` 库
|
||||
|
||||
|
||||
13
README.md
13
README.md
@@ -184,16 +184,3 @@ label{ /*标签选择器*/
|
||||
|
||||
---
|
||||
|
||||
## 📖 学习 & 技术支持
|
||||
|
||||
- 视频教程:https://space.bilibili.com/240269358/video
|
||||
- QQ:718987717
|
||||
- QQ群:758485934
|
||||
- 邮箱:[19980103ly@gmail.com]/[19980103ly@gmail.com]
|
||||
- 微信:wx19980103yon
|
||||
|
||||
---
|
||||
|
||||
## 📄 License
|
||||
|
||||
|
||||
|
||||
Binary file not shown.
@@ -2,16 +2,6 @@
|
||||
// Microsoft Visual C++ 生成的包含文件。
|
||||
// 供 DemoUi.rc 使用
|
||||
//
|
||||
#define IDI_SMALL 101
|
||||
#define IDD_INPUT 102
|
||||
#define IDC_EDIT1 1000
|
||||
|
||||
// Next default values for new objects
|
||||
//
|
||||
#ifdef APSTUDIO_INVOKED
|
||||
#ifndef APSTUDIO_READONLY_SYMBOLS
|
||||
#define _APS_NEXT_RESOURCE_VALUE 104
|
||||
#define _APS_NEXT_COMMAND_VALUE 40001
|
||||
#define _APS_NEXT_CONTROL_VALUE 1001
|
||||
#define _APS_NEXT_SYMED_VALUE 101
|
||||
#endif
|
||||
#endif
|
||||
|
||||
@@ -18,4 +18,7 @@
|
||||
#include "EzUI/LayeredWindow.h"//分层窗口类-可以异型透明窗口
|
||||
#include "ezui/UIManager.h"//ui管理类(使用xml生成控件)
|
||||
#include "EzUI/Animation.h"
|
||||
#include "EzUI/TableView.h"
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -50,6 +50,10 @@ loginForm::loginForm() :LayeredWindow(320, 448)
|
||||
{
|
||||
umg.LoadXml("res/loginForm.htm");//加载xml里面的控件与样式
|
||||
umg.SetupUI(this);
|
||||
|
||||
// 通过资源ID加载图标 (在 app.rc 中定义 IDI_SMALL=101)
|
||||
HICON hIco = (HICON)::LoadImageW(GetModuleHandleW(nullptr), MAKEINTRESOURCEW(IDI_SMALL), IMAGE_ICON, 32, 32, 0);
|
||||
if (hIco) SetIcon(hIco);
|
||||
}
|
||||
|
||||
loginForm::~loginForm()
|
||||
|
||||
@@ -1,11 +1,28 @@
|
||||
#include "pch.h"
|
||||
#include "mainForm.h"
|
||||
|
||||
|
||||
void mainForm::OnNotify(Control* sender, EventArgs& args)
|
||||
{
|
||||
UIString btnName = sender->Name; // 控件id
|
||||
Event eventType = args.EventType; // 事件类型
|
||||
|
||||
// 针对管理界面的表格控件
|
||||
//if (btnName == "tableViewAdmin") {
|
||||
// switch (eventType)
|
||||
// {
|
||||
// case 8: break;
|
||||
// case Event::OnMouseUp://鼠标抬起
|
||||
// {
|
||||
// TableView* tableView = (TableView*)FindControl("tableViewAdmin"); //获取表格控件
|
||||
// }
|
||||
// break;
|
||||
// default:
|
||||
// std::cout << "表格事件:" << (long long)eventType << std::endl;
|
||||
// break;
|
||||
// }
|
||||
//}
|
||||
|
||||
switch (eventType)
|
||||
{
|
||||
case ezui::OnMouseDown: //鼠标按下
|
||||
@@ -49,10 +66,28 @@ void mainForm::OnNotify(Control* sender, EventArgs& args)
|
||||
}
|
||||
else if (btnName == "btnAdminTemp") { //管理页面的测试按钮
|
||||
TextBox* textAdmin = (TextBox*)FindControl("textAdminOutput"); //获取输出框
|
||||
//textAdmin->Insert(L"\n测试成功!", true);
|
||||
if (textAdmin) {
|
||||
textAdmin->Insert(L"\n测试成功!",true);
|
||||
textAdmin->GetScrollBar()->ScrollTo(1.0);
|
||||
}
|
||||
|
||||
TableView* tableView = (TableView*)FindControl("tableViewAdmin"); //获取表格控件
|
||||
if (tableView){
|
||||
int rowCount = tableView->GetRowCount(); //总行数
|
||||
// 表格增加一行数据
|
||||
tableView->InsertRow(rowCount);
|
||||
tableView->SetRowData(rowCount, { L"uid" + std::to_wstring(rowCount), L"192.168.200.131\n127.0.0" , L"", L"2026-02-25"});
|
||||
tableView->SetCellChecked(rowCount, 5, true);
|
||||
tableView->SetCellComboIndex(rowCount, 2, 0);
|
||||
|
||||
// 改变单元格颜色
|
||||
/*CellStyle style = tableView->GetCellStyle(1, 1);
|
||||
style.SetBackColor(Color(200, 230, 155));
|
||||
tableView->SetCellStyle(1, 1, style);*/
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
break;
|
||||
@@ -70,10 +105,6 @@ void mainForm::OnNotify(Control* sender, EventArgs& args)
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
if (args.EventType == Event::OnMouseDown) {
|
||||
|
||||
|
||||
}
|
||||
__super::OnNotify(sender, args);
|
||||
}
|
||||
@@ -83,12 +114,68 @@ void mainForm::OnClose(bool& close)
|
||||
Application::Exit();
|
||||
}
|
||||
|
||||
mainForm::mainForm() :LayeredWindow(1000, 750)
|
||||
void mainForm::OnMouseUp(ezui::MouseButton mbtn, const ezui::Point& point)
|
||||
{
|
||||
if (mbtn == ezui::MouseButton::Right) {
|
||||
// 右键弹起处理(可实现右键单击)
|
||||
TableView* tableView = (TableView*)FindControl("tableViewAdmin"); //获取表格控件
|
||||
if (tableView) {
|
||||
//表格
|
||||
int pRow = tableView->GetHoverRow(); //当前行号
|
||||
int pCol = tableView->GetHoverCol(); //当前列号
|
||||
if (pRow < 0 || pCol < 0) return; // 说明不在表格区域内
|
||||
|
||||
UIString celContent = tableView->GetData(pRow, pCol);
|
||||
//std::cout << "单元格内容: " << celContent.ansi() << std::endl;
|
||||
std::cout << "行列号为 (" << pRow << ", " << pCol << ") 当前列宽: " << tableView->GetColumnWidth(pCol) << std::endl;
|
||||
|
||||
}
|
||||
}
|
||||
ezui::Window::OnMouseUp(mbtn, point);
|
||||
}
|
||||
|
||||
// UI初始化
|
||||
mainForm::mainForm() :LayeredWindow(1500, 750)
|
||||
{
|
||||
SetResizable(true); // 启用窗口大小调整
|
||||
SetMiniSize(Size(600, 450)); // 设置最小尺寸
|
||||
umg.LoadXml("res/mainForm.htm");//加载xml里面的控件与样式
|
||||
umg.SetupUI(this);
|
||||
|
||||
// 通过资源ID加载图标 (在 app.rc 中定义 IDI_SMALL=101)
|
||||
HICON hIco = (HICON)::LoadImageW(GetModuleHandleW(nullptr), MAKEINTRESOURCEW(IDI_SMALL), IMAGE_ICON, 32, 32, 0);
|
||||
if (hIco) SetIcon(hIco);
|
||||
|
||||
// 如果是debug模式则创建控制台窗口用于输出调试信息
|
||||
#ifdef _DEBUG
|
||||
AllocConsole();
|
||||
FILE* fp = nullptr;
|
||||
freopen_s(&fp, "CONOUT$", "w", stdout);
|
||||
freopen_s(&fp, "CONOUT$", "w", stderr);
|
||||
std::cout << "调试模式控制台已启动!" << std::endl;
|
||||
#endif
|
||||
|
||||
// 初始化设置表格各项属性
|
||||
TableView* tableView = (TableView*)FindControl("tableViewAdmin"); //获取表格控件
|
||||
if (tableView) {
|
||||
tableView->SelectedRowBackColor = Color(200, 230, 255); // 设置选中行背景色
|
||||
//tableView->SetColumnType(5, ezui::CellType::CheckBox);
|
||||
tableView->SetColumnType(2, ezui::CellType::ComboBox); //设置第3列为下拉列表类型
|
||||
tableView->SetColumnComboItems(2, { L"默认", L"禁止" , L"验机" }); //设置第3列下拉列表内容
|
||||
tableView->SetDefaultTextAlign(Align::MiddleCenter); //设置默认对齐方式
|
||||
|
||||
//设置列宽
|
||||
std::vector<int> withs = {60, 130, 55, 95, 85, 85, 105, 70, 75, 80, 80, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95 };
|
||||
for(int i = 0; i < withs.size(); i++)
|
||||
tableView->SetColumnWidth(i, withs[i]);
|
||||
|
||||
// 单元格编辑完成(编辑结束时触发,提供旧值与新值)
|
||||
tableView->CellEditFinished = [](int row, int col, const UIString& oldValue, const UIString& newValue) {
|
||||
//std::cout << "完成编辑单元格内容: " << newValue.ansi() << ", " << oldValue.ansi() << std::endl;
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
mainForm::~mainForm()
|
||||
|
||||
@@ -4,17 +4,20 @@
|
||||
using namespace ezui;
|
||||
|
||||
|
||||
|
||||
// 主窗口
|
||||
class mainForm :public LayeredWindow
|
||||
{
|
||||
private:
|
||||
//ui管理类
|
||||
UIManager umg;
|
||||
protected:
|
||||
virtual void OnNotify(Control* sender, EventArgs& args)override;//重载事件通知
|
||||
virtual void OnClose(bool& close)override;//当窗口关闭的时候
|
||||
virtual void OnMouseUp(ezui::MouseButton mbtn, const ezui::Point& point) override; // 鼠标抬起
|
||||
public:
|
||||
//ui管理类
|
||||
UIManager umg;
|
||||
mainForm();
|
||||
virtual ~mainForm();
|
||||
|
||||
};
|
||||
|
||||
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 45 KiB After Width: | Height: | Size: 97 KiB |
@@ -32,6 +32,7 @@ namespace ezui {
|
||||
|
||||
VListView m_list;
|
||||
int m_index = -1;
|
||||
int m_pendingIndex = -1; // 延迟设置的索引(用于XML属性解析)
|
||||
void Init();
|
||||
protected:
|
||||
virtual void OnLayout()override;
|
||||
@@ -47,5 +48,7 @@ namespace ezui {
|
||||
//添加一个item并返回新item的下标
|
||||
int AddItem(const UIString& text);
|
||||
void RemoveItem(int index);
|
||||
//设置属性
|
||||
virtual void SetAttribute(const UIString& key, const UIString& value)override;
|
||||
};
|
||||
};
|
||||
|
||||
495
demo/Adminstor/ThirdParty/EzUI/include/EzUI/TableView.h
vendored
Normal file
495
demo/Adminstor/ThirdParty/EzUI/include/EzUI/TableView.h
vendored
Normal file
@@ -0,0 +1,495 @@
|
||||
#pragma once
|
||||
#include "Control.h"
|
||||
#include "Label.h"
|
||||
#include "TextBox.h"
|
||||
#include "CheckBox.h"
|
||||
#include "ComboBox.h"
|
||||
#include "VScrollBar.h"
|
||||
#include "HScrollBar.h"
|
||||
#include <functional>
|
||||
#include <algorithm>
|
||||
|
||||
namespace ezui {
|
||||
|
||||
// 第一列类型枚举
|
||||
enum class FirstColumnType {
|
||||
TextBox, // 空白文本框(默认)
|
||||
Index, // 不可编辑的序号(从1开始)
|
||||
CheckBox // 选择框
|
||||
};
|
||||
|
||||
// 单元格类型枚举
|
||||
enum class CellType {
|
||||
TextBox, // 文本框(默认)
|
||||
CheckBox, // 选择框
|
||||
ComboBox, // 下拉选择框
|
||||
ReadOnly // 不可编辑(可选中复制但不能修改)
|
||||
};
|
||||
|
||||
// 边框类型(复用框架的 StrokeStyle)
|
||||
// StrokeStyle::None - 无边框
|
||||
// StrokeStyle::Solid - 实线
|
||||
// StrokeStyle::Dash - 虚线
|
||||
|
||||
// 排序方向
|
||||
enum class SortOrder {
|
||||
None, // 未排序
|
||||
Ascending, // 升序
|
||||
Descending // 降序
|
||||
};
|
||||
|
||||
// 单元格独立样式(用于单独设置某个单元格的样式)
|
||||
struct CellStyle {
|
||||
Color BorderColor;
|
||||
StrokeStyle BorderStyle = StrokeStyle::None;
|
||||
Color BackColor;
|
||||
Color ForeColor;
|
||||
TextAlign Align = TextAlign::TopLeft;
|
||||
bool HasBorderColor = false;
|
||||
bool HasBorderStyle = false;
|
||||
bool HasBackColor = false;
|
||||
bool HasForeColor = false;
|
||||
bool HasTextAlign = false;
|
||||
|
||||
void SetBorderColor(const Color& color) {
|
||||
BorderColor = color;
|
||||
HasBorderColor = true;
|
||||
}
|
||||
void SetBorderStyle(StrokeStyle style) {
|
||||
BorderStyle = style;
|
||||
HasBorderStyle = true;
|
||||
}
|
||||
void SetBackColor(const Color& color) {
|
||||
BackColor = color;
|
||||
HasBackColor = true;
|
||||
}
|
||||
void SetForeColor(const Color& color) {
|
||||
ForeColor = color;
|
||||
HasForeColor = true;
|
||||
}
|
||||
void SetTextAlign(ezui::TextAlign align) {
|
||||
Align = align;
|
||||
HasTextAlign = true;
|
||||
}
|
||||
void Reset() {
|
||||
HasBorderColor = false;
|
||||
HasBorderStyle = false;
|
||||
HasBackColor = false;
|
||||
HasForeColor = false;
|
||||
HasTextAlign = false;
|
||||
}
|
||||
};
|
||||
|
||||
// 单元格数据
|
||||
struct CellData {
|
||||
UIString Text; // 单元格文本内容
|
||||
bool Checked = false; // 用于 CheckBox 类型
|
||||
int ComboIndex = -1; // 用于 ComboBox 类型,选中的索引
|
||||
CellStyle Style; // 单元格独立样式
|
||||
};
|
||||
|
||||
// 列信息
|
||||
struct ColumnInfo {
|
||||
UIString HeaderText; // 表头文字
|
||||
int Width = 100; // 列宽
|
||||
CellType Type = CellType::TextBox; // 单元格类型
|
||||
std::vector<UIString> ComboItems; // 下拉选项(仅 ComboBox 类型有效)
|
||||
SortOrder CurrentSort = SortOrder::None; // 当前排序状态
|
||||
TextAlign CellTextAlign = TextAlign::TopLeft; // 该列的默认对齐方式
|
||||
};
|
||||
|
||||
class UI_EXPORT TableView : public Control {
|
||||
private:
|
||||
// 滚动条
|
||||
VScrollBar m_vScrollBar;
|
||||
HScrollBar m_hScrollBar;
|
||||
|
||||
// 数据存储
|
||||
std::vector<ColumnInfo> m_columns; // 列信息
|
||||
std::vector<std::vector<CellData>> m_data; // 二维数据 [row][col]
|
||||
std::vector<int> m_rowHeights; // 每行高度
|
||||
std::vector<bool> m_rowChecked; // 每行的选中状态(第一列为CheckBox时使用)
|
||||
|
||||
// 第一列配置
|
||||
FirstColumnType m_firstColumnType = FirstColumnType::TextBox;
|
||||
int m_firstColumnWidth = 50; // 第一列宽度
|
||||
|
||||
// 表头配置
|
||||
int m_headerHeight = 30; // 表头高度
|
||||
bool m_headerSelectAll = false; // 表头全选状态
|
||||
|
||||
// 默认行高
|
||||
int m_defaultRowHeight = 30;
|
||||
|
||||
// 统一单元格样式
|
||||
int m_cellBorderSize = 1;
|
||||
StrokeStyle m_cellBorderStyle = StrokeStyle::Solid;
|
||||
Color m_cellBorderColor = Color::LightGray;
|
||||
Color m_cellBackColor = Color::White;
|
||||
Color m_cellForeColor = Color::Black;
|
||||
int m_cellFontSize = 14;
|
||||
std::wstring m_cellFontFamily = L"Microsoft YaHei";
|
||||
TextAlign m_cellTextAlign = TextAlign::TopLeft; // 默认对齐方式
|
||||
std::vector<TextAlign> m_rowTextAlign; // 每行的对齐方式(未设置时使用默认值)
|
||||
|
||||
// 表头样式
|
||||
Color m_headerBackColor = Color(0xFFE0E0E0);
|
||||
Color m_headerForeColor = Color::Black;
|
||||
|
||||
// 滚动偏移
|
||||
int m_scrollOffsetX = 0;
|
||||
int m_scrollOffsetY = 0;
|
||||
|
||||
// 内容大小缓存(供GetContentSize使用)
|
||||
mutable Size m_contentSize;
|
||||
|
||||
// 编辑状态
|
||||
bool m_editing = false;
|
||||
int m_editRow = -1;
|
||||
int m_editCol = -1;
|
||||
TextBox* m_editBox = nullptr;
|
||||
ComboBox* m_editCombo = nullptr;
|
||||
CheckBox* m_editCheck = nullptr;
|
||||
|
||||
// 列宽拖动
|
||||
bool m_draggingColumn = false;
|
||||
int m_dragColumnIndex = -1;
|
||||
int m_dragStartX = 0;
|
||||
int m_dragStartWidth = 0;
|
||||
|
||||
// 排序
|
||||
int m_sortColumnIndex = -1;
|
||||
|
||||
// 鼠标悬停
|
||||
int m_hoverRow = -1;
|
||||
int m_hoverCol = -1;
|
||||
|
||||
// 双击检测
|
||||
ULONGLONG m_lastClickTime = 0;
|
||||
int m_lastClickRow = -1;
|
||||
int m_lastClickCol = -1;
|
||||
|
||||
// 选中行(非CheckBox模式下,通过单击第一列选中的行)
|
||||
int m_selectedRow = -1;
|
||||
|
||||
// 编辑前的原始值(用于编辑完成回调)
|
||||
UIString m_editOriginalValue;
|
||||
|
||||
private:
|
||||
void Init();
|
||||
|
||||
// 计算总内容宽度
|
||||
int GetContentWidth() const;
|
||||
|
||||
// 计算总内容高度
|
||||
int GetContentHeight() const;
|
||||
|
||||
// 获取列起始X坐标(考虑滚动偏移)
|
||||
int GetColumnX(int colIndex) const;
|
||||
|
||||
// 获取行起始Y坐标(考虑滚动偏移)
|
||||
int GetRowY(int rowIndex) const;
|
||||
|
||||
// 根据坐标获取单元格位置
|
||||
bool HitTestCell(const Point& pt, int* outRow, int* outCol) const;
|
||||
|
||||
// 根据坐标检测是否在列边界上(用于拖动调整列宽)
|
||||
int HitTestColumnBorder(const Point& pt) const;
|
||||
|
||||
// 检测是否点击在垂直滚动条上
|
||||
bool HitTestVScrollBar(const Point& pt);
|
||||
|
||||
// 检测是否点击在水平滚动条上
|
||||
bool HitTestHScrollBar(const Point& pt);
|
||||
|
||||
// 绘制表头
|
||||
void DrawHeader(PaintEventArgs& args);
|
||||
|
||||
// 绘制单元格
|
||||
void DrawCells(PaintEventArgs& args);
|
||||
|
||||
// 绘制单个单元格
|
||||
void DrawCell(PaintEventArgs& args, int row, int col, const Rect& cellRect);
|
||||
|
||||
// 绘制第一列
|
||||
void DrawFirstColumn(PaintEventArgs& args, int row, const Rect& cellRect);
|
||||
|
||||
// 开始编辑单元格
|
||||
void BeginEdit(int row, int col);
|
||||
|
||||
// 结束编辑
|
||||
void EndEdit(bool save = true);
|
||||
|
||||
// 更新行高(根据内容)
|
||||
void UpdateRowHeight(int row);
|
||||
|
||||
// 计算文本需要的行数
|
||||
int CalculateTextLines(const UIString& text, int width) const;
|
||||
|
||||
// 刷新滚动条
|
||||
void RefreshScrollBars();
|
||||
|
||||
// 滚动偏移处理
|
||||
void OffsetX(int offset);
|
||||
void OffsetY(int offset);
|
||||
|
||||
// 执行排序
|
||||
void DoSort(int colIndex);
|
||||
|
||||
protected:
|
||||
virtual void OnPaint(PaintEventArgs& args) override;
|
||||
virtual void OnChildPaint(PaintEventArgs& args) override;
|
||||
virtual void OnLayout() override;
|
||||
virtual void OnMouseMove(const MouseEventArgs& args) override;
|
||||
virtual void OnMouseDown(const MouseEventArgs& args) override;
|
||||
virtual void OnMouseUp(const MouseEventArgs& args) override;
|
||||
virtual void OnMouseDoubleClick(const MouseEventArgs& args) override;
|
||||
virtual void OnMouseWheel(const MouseEventArgs& args) override;
|
||||
virtual void OnMouseLeave(const MouseEventArgs& args) override;
|
||||
virtual void OnSize(const SizeEventArgs& args) override;
|
||||
virtual void OnKeyDown(const KeyboardEventArgs& args) override;
|
||||
virtual void OnKeyChar(const KeyboardEventArgs& args) override;
|
||||
virtual const Size& GetContentSize() override;
|
||||
|
||||
public:
|
||||
// 选中行背景色(当第一列为CheckBox且被选中时使用,或者单击选中行时使用)
|
||||
Color SelectedRowBackColor = Color(0xFFADD8E6); // 浅蓝色
|
||||
|
||||
/*
|
||||
table->CellValueChanged = [](int row, int col, const UIString& value) {
|
||||
// 处理内容变化
|
||||
};
|
||||
*/
|
||||
// 单元格内容变化回调(内容变化时立即触发)
|
||||
// 参数: row, col, newValue
|
||||
std::function<void(int, int, const UIString&)> CellValueChanged = nullptr;
|
||||
|
||||
/*
|
||||
table->CellEditFinished = [](int row, int col, const UIString& oldValue, const UIString& newValue) {
|
||||
// 处理内容变化
|
||||
};
|
||||
*/
|
||||
// 单元格编辑完成回调(编辑结束时触发,比如TextBox失去焦点或按Enter时)
|
||||
// 参数: row, col, oldValue, newValue
|
||||
std::function<void(int, int, const UIString&, const UIString&)> CellEditFinished = nullptr;
|
||||
|
||||
/*
|
||||
tableView->RightClick= [tableView](int row, int col) {
|
||||
// 处理内容变化
|
||||
};
|
||||
*/
|
||||
// 鼠标右键单击回调
|
||||
// 参数: row, col (row=-1 表示点击在表头,col=-1 表示点击在第一列)
|
||||
std::function<void(int, int)> RightClick = nullptr;
|
||||
|
||||
public:
|
||||
TableView(Object* parentObject = nullptr);
|
||||
virtual ~TableView();
|
||||
|
||||
// ============ 表头设置 ============
|
||||
|
||||
// 设置表头(传入表头名数组)
|
||||
void SetHeaders(const std::vector<UIString>& headers);
|
||||
|
||||
// 获取表头数量(不包含第一列)
|
||||
int GetColumnCount() const;
|
||||
|
||||
// 设置表头高度
|
||||
void SetHeaderHeight(int height);
|
||||
|
||||
// 获取表头高度
|
||||
int GetHeaderHeight() const;
|
||||
|
||||
// ============ 第一列设置 ============
|
||||
|
||||
// 设置第一列类型
|
||||
void SetFirstColumnType(FirstColumnType type);
|
||||
|
||||
// 获取第一列类型
|
||||
FirstColumnType GetFirstColumnType() const;
|
||||
|
||||
// 设置第一列宽度
|
||||
void SetFirstColumnWidth(int width);
|
||||
|
||||
// 获取第一列宽度
|
||||
int GetFirstColumnWidth() const;
|
||||
|
||||
// ============ 列设置 ============
|
||||
|
||||
// 设置某列宽度
|
||||
void SetColumnWidth(int colIndex, int width);
|
||||
|
||||
// 获取某列宽度
|
||||
int GetColumnWidth(int colIndex) const;
|
||||
|
||||
// 获取所有列宽
|
||||
const std::vector<int> GetColumnWidths() const;
|
||||
|
||||
// 设置某列单元格类型
|
||||
void SetColumnType(int colIndex, CellType type);
|
||||
|
||||
// 获取某列单元格类型
|
||||
CellType GetColumnType(int colIndex) const;
|
||||
|
||||
// 设置某列的下拉选项(仅对 ComboBox 类型有效)
|
||||
void SetColumnComboItems(int colIndex, const std::vector<UIString>& items);
|
||||
|
||||
// ============ 行设置 ============
|
||||
|
||||
// 获取行数
|
||||
int GetRowCount() const;
|
||||
|
||||
// 添加行
|
||||
void AddRow();
|
||||
|
||||
// 插入行
|
||||
void InsertRow(int rowIndex);
|
||||
|
||||
// 删除行
|
||||
void RemoveRow(int rowIndex);
|
||||
|
||||
// 清空所有行
|
||||
void ClearRows();
|
||||
|
||||
// 添加列
|
||||
void AddColumn(const UIString& headerText = L"", int width = 100);
|
||||
|
||||
// 插入列
|
||||
void InsertColumn(int colIndex, const UIString& headerText = L"", int width = 100);
|
||||
|
||||
// 删除列
|
||||
void RemoveColumn(int colIndex);
|
||||
|
||||
// 获取行高
|
||||
int GetRowHeight(int rowIndex) const;
|
||||
|
||||
// 获取所有行高
|
||||
const std::vector<int> GetRowHeights() const;
|
||||
|
||||
// 设置默认行高
|
||||
void SetDefaultRowHeight(int height);
|
||||
|
||||
// ============ 数据操作 ============
|
||||
|
||||
// 设置单个单元格数据
|
||||
void SetData(int row, int col, const UIString& value);
|
||||
|
||||
// 获取单个单元格数据
|
||||
UIString GetData(int row, int col) const;
|
||||
|
||||
// 设置整行数据
|
||||
void SetRowData(int row, const std::vector<UIString>& values);
|
||||
|
||||
// 获取整行数据
|
||||
std::vector<UIString> GetRowData(int row) const;
|
||||
|
||||
// 获取整列数据
|
||||
std::vector<UIString> GetColData(int col) const;
|
||||
|
||||
// 设置全部数据(二维数组)
|
||||
void SetAllData(const std::vector<std::vector<UIString>>& data);
|
||||
|
||||
// 获取全部数据
|
||||
std::vector<std::vector<UIString>> GetAllData() const;
|
||||
|
||||
// 设置单元格 CheckBox 状态
|
||||
void SetCellChecked(int row, int col, bool checked);
|
||||
|
||||
// 获取单元格 CheckBox 状态
|
||||
bool GetCellChecked(int row, int col) const;
|
||||
|
||||
// 设置单元格 ComboBox 选中索引
|
||||
void SetCellComboIndex(int row, int col, int index);
|
||||
|
||||
// 获取单元格 ComboBox 选中索引
|
||||
int GetCellComboIndex(int row, int col) const;
|
||||
|
||||
// ============ 行选中(第一列为CheckBox时) ============
|
||||
|
||||
// 设置某行选中状态
|
||||
void SetRowChecked(int row, bool checked);
|
||||
|
||||
// 获取某行选中状态
|
||||
bool GetRowChecked(int row) const;
|
||||
|
||||
// 获取所有选中的行索引
|
||||
std::vector<int> GetCheckedRows() const;
|
||||
|
||||
// 获取当前选中的行(非CheckBox模式,通过单击第一列选中)
|
||||
int GetSelectedRow() const;
|
||||
|
||||
// 设置当前选中的行(非CheckBox模式)
|
||||
void SetSelectedRow(int row);
|
||||
|
||||
// 清除选中行(非CheckBox模式)
|
||||
void ClearSelection();
|
||||
|
||||
// 全选
|
||||
void SelectAll();
|
||||
|
||||
// 取消全选
|
||||
void DeselectAll();
|
||||
|
||||
// ============ 样式设置 ============
|
||||
|
||||
// 设置统一单元格样式
|
||||
void SetCellBorderSize(int size);
|
||||
void SetCellBorderStyle(StrokeStyle style);
|
||||
void SetCellBorderColor(const Color& color);
|
||||
void SetCellBackColor(const Color& color);
|
||||
void SetCellForeColor(const Color& color);
|
||||
void SetCellFontSize(int size);
|
||||
void SetCellFontFamily(const std::wstring& fontFamily);
|
||||
|
||||
// 设置单独单元格样式
|
||||
void SetCellStyle(int row, int col, const CellStyle& style);
|
||||
|
||||
// 获取单独单元格样式
|
||||
CellStyle GetCellStyle(int row, int col) const;
|
||||
|
||||
// 重置单独单元格样式(使用统一样式)
|
||||
void ResetCellStyle(int row, int col);
|
||||
|
||||
// 设置表头样式
|
||||
void SetHeaderBackColor(const Color& color);
|
||||
void SetHeaderForeColor(const Color& color);
|
||||
|
||||
// ============ 对齐方式设置 ============
|
||||
|
||||
// 设置默认对齐方式(影响所有未单独设置对齐方式的单元格)
|
||||
void SetDefaultTextAlign(TextAlign align);
|
||||
|
||||
// 设置某列的对齐方式
|
||||
void SetColumnTextAlign(int colIndex, TextAlign align);
|
||||
|
||||
// 设置某行的对齐方式
|
||||
void SetRowTextAlign(int rowIndex, TextAlign align);
|
||||
|
||||
// 设置单个单元格的对齐方式
|
||||
void SetCellTextAlign(int row, int col, TextAlign align);
|
||||
|
||||
// 获取单元格的对齐方式(考虑优先级:单元格 > 行 > 列 > 默认)
|
||||
TextAlign GetCellTextAlign(int row, int col) const;
|
||||
|
||||
// ============ 鼠标悬停信息 ============
|
||||
|
||||
// 获取鼠标当前悬停的行号(-1表示表头或未悬停在任何行)
|
||||
int GetHoverRow() const;
|
||||
|
||||
// 获取鼠标当前悬停的列号(-1表示第一列或未悬停在任何列)
|
||||
int GetHoverCol() const;
|
||||
|
||||
// 获取鼠标当前悬停的行列号(通过指针返回)
|
||||
void GetHoverCell(int* outRow, int* outCol) const;
|
||||
|
||||
// ============ 滚动条 ============
|
||||
|
||||
virtual ScrollBar* GetVScrollBar();
|
||||
virtual ScrollBar* GetHScrollBar();
|
||||
|
||||
// ============ 属性设置(XML支持) ============
|
||||
|
||||
virtual void SetAttribute(const UIString& key, const UIString& value) override;
|
||||
};
|
||||
|
||||
};
|
||||
@@ -11,7 +11,8 @@ namespace ezui {
|
||||
VScrollBar m_vScrollbar;
|
||||
int m_lastWidth = 0;
|
||||
int m_lastHeight = 0;
|
||||
bool m_multiLine = false;
|
||||
bool m_autoWrap = false; // 是否允许文字超宽时自动换行
|
||||
bool m_allowManualLineBreak = false; // 是否允许用户按Shift+Enter手动换行
|
||||
std::wstring m_text;//文字
|
||||
Size m_fontBox;
|
||||
bool m_down = false;//是否具有焦点中
|
||||
@@ -98,10 +99,12 @@ namespace ezui {
|
||||
virtual ScrollBar* GetScrollBar()override;
|
||||
//设置文字
|
||||
void SetText(const UIString& text);
|
||||
//是否多行显示
|
||||
//是否多行显示(兼容旧版:仅调用autoWrap参数)
|
||||
bool IsMultiLine();
|
||||
//设置是否多行显示
|
||||
void SetMultiLine(bool multiLine);
|
||||
// autoWrap: 文字超宽时是否自动换行
|
||||
// allowManualLineBreak: 是否允许用户按Shift+Enter手动换行
|
||||
void SetMultiLine(bool autoWrap, bool allowManualLineBreak = false);
|
||||
//设置为是否只读
|
||||
void SetReadOnly(bool bReadOnly);
|
||||
//是否为只读
|
||||
@@ -112,5 +115,7 @@ namespace ezui {
|
||||
void SetPlaceholderText(const UIString& text);
|
||||
//设置密码框占位符(建议单字符)
|
||||
void SetPasswordChar(const UIString& passwordChar);
|
||||
// 设置焦点并初始化光标到指定位置(-1表示文本末尾)
|
||||
void SetFocusAndCaret(int caretPos = -1);
|
||||
};
|
||||
};
|
||||
|
||||
@@ -16,6 +16,7 @@
|
||||
#include "ProgressBar.h"
|
||||
#include "Window.h"
|
||||
#include "ComboBox.h"
|
||||
#include "TableView.h"
|
||||
|
||||
namespace ezui {
|
||||
//主窗口中的内联页面类
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -1,4 +1,4 @@
|
||||
#pragma once
|
||||
#pragma once
|
||||
#include "EzUI.h"
|
||||
#include "Timer.h"
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#pragma once
|
||||
#pragma once
|
||||
#include "Window.h"
|
||||
#include "Resource.h"
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#pragma once
|
||||
#pragma once
|
||||
#include "EzUI.h"
|
||||
|
||||
namespace ezui {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#pragma once
|
||||
#pragma once
|
||||
#include "Window.h"
|
||||
#include "ShadowBox.h"
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#pragma once
|
||||
#pragma once
|
||||
#include "Label.h"
|
||||
|
||||
namespace ezui {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#pragma once
|
||||
#pragma once
|
||||
#include "Label.h"
|
||||
|
||||
namespace ezui {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#pragma once
|
||||
#pragma once
|
||||
#include "TextBox.h"
|
||||
#include "Label.h"
|
||||
#include "VListView.h"
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#pragma once
|
||||
#pragma once
|
||||
#include "EzUI.h"
|
||||
|
||||
namespace ezui {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#pragma once
|
||||
#pragma once
|
||||
#include "UIDef.h"
|
||||
#if USED_DIRECT2D
|
||||
#ifndef UI_EXPORT
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/*/
|
||||
/*/
|
||||
Author:yang
|
||||
Email:19980103ly@gmail.com/718987717@qq.com
|
||||
*/
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#pragma once
|
||||
#pragma once
|
||||
#include "EzUI.h"
|
||||
#include "UILoader.h"
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#pragma once
|
||||
#pragma once
|
||||
#include "Control.h"
|
||||
|
||||
namespace ezui {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#pragma once
|
||||
#pragma once
|
||||
#include "PagedListView.h"
|
||||
#include "HScrollBar.h"
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#pragma once
|
||||
#pragma once
|
||||
#include "Control.h"
|
||||
#include "ScrollBar.h"
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#pragma once
|
||||
#pragma once
|
||||
#include "Control.h"
|
||||
|
||||
namespace ezui {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#pragma once
|
||||
#pragma once
|
||||
#include "BorderlessWindow.h"
|
||||
#include "Bitmap.h"
|
||||
#include "Task.h"
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#pragma once
|
||||
#pragma once
|
||||
#include "EzUI.h"
|
||||
|
||||
namespace ezui {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#pragma once
|
||||
#pragma once
|
||||
#include "Menu.h"
|
||||
#include <shellapi.h>
|
||||
namespace ezui {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#pragma once
|
||||
#pragma once
|
||||
#include "Control.h"
|
||||
|
||||
namespace ezui {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#pragma once
|
||||
#pragma once
|
||||
#include "Control.h"
|
||||
#include "Timer.h"
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#pragma once
|
||||
#pragma once
|
||||
#include "Window.h"
|
||||
#include "BorderlessWindow.h"
|
||||
#include "LayeredWindow.h"
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#pragma once
|
||||
#pragma once
|
||||
#include "CheckBox.h"
|
||||
|
||||
namespace ezui {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#pragma once
|
||||
#pragma once
|
||||
#include <Windows.h>
|
||||
|
||||
namespace ezui {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#pragma once
|
||||
#pragma once
|
||||
#include "UIString.h"
|
||||
|
||||
namespace ezui {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#pragma once
|
||||
#pragma once
|
||||
#include "Control.h"
|
||||
#include "Animation.h"
|
||||
namespace ezui {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#pragma once
|
||||
#pragma once
|
||||
#include "Window.h"
|
||||
#include "Bitmap.h"
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#pragma once
|
||||
#pragma once
|
||||
#include "Control.h"
|
||||
|
||||
namespace ezui {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#pragma once
|
||||
#pragma once
|
||||
#include "Control.h"
|
||||
#include "Timer.h"
|
||||
#include "Animation.h"
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#pragma once
|
||||
#pragma once
|
||||
#include "EzUI.h"
|
||||
namespace ezui {
|
||||
namespace detail {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#pragma once
|
||||
#pragma once
|
||||
#include "Control.h"
|
||||
#include "VScrollBar.h"
|
||||
#include "Timer.h"
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#pragma once
|
||||
#pragma once
|
||||
#include "PagedListView.h"
|
||||
#include "VScrollBar.h"
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#pragma once
|
||||
#pragma once
|
||||
#include "EzUI.h"
|
||||
#include "Task.h"
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#pragma once
|
||||
#pragma once
|
||||
#include "HListView.h"
|
||||
#include "VListView.h"
|
||||
namespace ezui {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#pragma once
|
||||
#pragma once
|
||||
|
||||
#include <list>
|
||||
#include <vector>
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#pragma once
|
||||
#pragma once
|
||||
#include "Control.h"
|
||||
#include "Spacer.h"
|
||||
#include "HLayout.h"
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#pragma once
|
||||
#pragma once
|
||||
#include "UILoader.h"
|
||||
|
||||
namespace ezui {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#pragma once
|
||||
#pragma once
|
||||
#include "UIDef.h"
|
||||
#include <codecvt>
|
||||
#include <iomanip>
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#pragma once
|
||||
#pragma once
|
||||
#include "EzUI.h"
|
||||
namespace ezui {
|
||||
struct Style
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#pragma once
|
||||
#pragma once
|
||||
#include "Control.h"
|
||||
|
||||
namespace ezui {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#pragma once
|
||||
#pragma once
|
||||
#include "PagedListView.h"
|
||||
#include "VScrollBar.h"
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#pragma once
|
||||
#pragma once
|
||||
#include "Control.h"
|
||||
#include "ScrollBar.h"
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#pragma once
|
||||
#pragma once
|
||||
#include "Control.h"
|
||||
#include "ScrollBar.h"
|
||||
#include "Spacer.h"
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/*
|
||||
/*
|
||||
www.sourceforge.net/projects/tinyxml
|
||||
|
||||
This software is provided 'as-is', without any express or implied
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/*
|
||||
/*
|
||||
www.sourceforge.net/projects/tinyxml
|
||||
Original code by Lee Thomason (www.grinninglizard.com)
|
||||
|
||||
|
||||
@@ -1 +1 @@
|
||||
#include "pch.h"
|
||||
#include "pch.h"
|
||||
@@ -1,2 +1,2 @@
|
||||
#pragma once
|
||||
#pragma once
|
||||
#include "framework.h"
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
//{{NO_DEPENDENCIES}}
|
||||
//{{NO_DEPENDENCIES}}
|
||||
// Microsoft Visual C++ generated include file.
|
||||
// Used by DemoUi.rc
|
||||
|
||||
// <EFBFBD>¶<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>һ<EFBFBD><EFBFBD>Ĭ<EFBFBD><EFBFBD>ֵ
|
||||
// 新对象的下一组默认值
|
||||
//
|
||||
#ifdef APSTUDIO_INVOKED
|
||||
#ifndef APSTUDIO_READONLY_SYMBOLS
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#include "FileSystem.h"
|
||||
#include "FileSystem.h"
|
||||
namespace ezui {
|
||||
namespace File {
|
||||
bool Exists(const UIString& filename) {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#pragma once
|
||||
#pragma once
|
||||
#include "EzUI/EzUI.h"
|
||||
#include "EzUI/UIString.h"
|
||||
namespace ezui {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#include "mainFrom.h"
|
||||
#include "mainFrom.h"
|
||||
int APIENTRY wWinMain(_In_ HINSTANCE hInstance,
|
||||
_In_opt_ HINSTANCE hPrevInstance,
|
||||
_In_ LPWSTR lpCmdLine,
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#include "mainFrom.h"
|
||||
#include "mainFrom.h"
|
||||
#include "FileSystem.h"
|
||||
|
||||
const wchar_t* xml = LR"xml(
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#include "EzUI/Application.h"
|
||||
#include "EzUI/Application.h"
|
||||
#include "EzUI/VLayout.h"
|
||||
#include "EzUI/TextBox.h"
|
||||
#include "EzUI/Button.h"
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
//WIN32 desktop application UI framework (2d graphical library:direct2d,后期可能会采用其他跨平台的2d图形库对整个UI框架进行跨平台)
|
||||
//WIN32 desktop application UI framework (2d graphical library:direct2d,后期可能会采用其他跨平台的2d图形库对整个UI框架进行跨平台)
|
||||
|
||||
#include <Windows.h>
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#include "desktopLrcFrm.h"
|
||||
#include "desktopLrcFrm.h"
|
||||
|
||||
HWND GetDeskTopWnd() {
|
||||
HWND windowHandle = ::FindWindowW(L"Progman", L"Program Manager");
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#include "global.h"
|
||||
#include "global.h"
|
||||
#include "lrcPanel.h"
|
||||
#include "VlcPlayer.h"
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#include "mainFrm.h"
|
||||
#include "mainFrm.h"
|
||||
MainFrm::MainFrm() :Form(1020, 690)
|
||||
{
|
||||
InitForm();
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#pragma once
|
||||
#pragma once
|
||||
#include "global.h"
|
||||
#include "widgets.h"
|
||||
#include "vlcPlayer.h"
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#include "vlcPlayer.h"
|
||||
#include "vlcPlayer.h"
|
||||
void* lock_cb(void* opaque, void** planes)
|
||||
{
|
||||
VlcPlayer* vp = (VlcPlayer*)opaque;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#pragma once
|
||||
#pragma once
|
||||
#include "EzUI/Control.h"
|
||||
#include "EzUI/BorderlessWindow.h"
|
||||
#include "EzUI/Label.h"
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/*
|
||||
/*
|
||||
base64.cpp and base64.h
|
||||
base64 encoding and decoding with C++.
|
||||
More information at
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#pragma once
|
||||
#pragma once
|
||||
//
|
||||
// base64 encoding and decoding with C++.
|
||||
// Version: 2.rc.08 (release candidate)
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#include "global.h"
|
||||
#include "global.h"
|
||||
|
||||
namespace global {
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#pragma once
|
||||
#pragma once
|
||||
#include "EzUI/EzUI.h"
|
||||
#include "EzUI/TextBox.h"
|
||||
#include "EzUI/BorderlessWindow.h"
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#pragma once
|
||||
#pragma once
|
||||
#include <iostream>
|
||||
#include <string>
|
||||
#include <functional>
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#pragma once
|
||||
#pragma once
|
||||
#include <Windows.h>
|
||||
#include "Text.h"
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#pragma once
|
||||
#pragma once
|
||||
#include <functional>
|
||||
#include <fstream>
|
||||
#include <Windows.h>
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#pragma once
|
||||
#pragma once
|
||||
#include <string>
|
||||
#include <Windows.h>
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#pragma once
|
||||
#pragma once
|
||||
#include <iostream>
|
||||
|
||||
#include "FileSystem.h"
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#pragma once
|
||||
#pragma once
|
||||
#include <vector>
|
||||
#include <iostream>
|
||||
#include <string>
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#pragma once
|
||||
#pragma once
|
||||
#include <vector>
|
||||
#include <string>
|
||||
#include <Windows.h>
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#pragma once
|
||||
#pragma once
|
||||
#include "Text.h"
|
||||
#include "FileSystem.h"
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#pragma once
|
||||
#pragma once
|
||||
#include <Windows.h>
|
||||
#include <string>
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#pragma once
|
||||
#pragma once
|
||||
#include <string>
|
||||
#include <Windows.h>
|
||||
#include <functional>
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#pragma once
|
||||
#pragma once
|
||||
#include <map>
|
||||
#include <functional>
|
||||
#include <Windows.h>
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#pragma once
|
||||
#pragma once
|
||||
#include "Text.h"
|
||||
#include "FileSystem.h"
|
||||
#include <Windows.h>
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
//
|
||||
//
|
||||
// base64 encoding and decoding with C++.
|
||||
// Version: 2.rc.09 (release candidate)
|
||||
//
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#ifndef CURLINC_CURL_H
|
||||
#ifndef CURLINC_CURL_H
|
||||
#define CURLINC_CURL_H
|
||||
/***************************************************************************
|
||||
* _ _ ____ _
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#ifndef CURLINC_CURLVER_H
|
||||
#ifndef CURLINC_CURLVER_H
|
||||
#define CURLINC_CURLVER_H
|
||||
/***************************************************************************
|
||||
* _ _ ____ _
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#ifndef CURLINC_EASY_H
|
||||
#ifndef CURLINC_EASY_H
|
||||
#define CURLINC_EASY_H
|
||||
/***************************************************************************
|
||||
* _ _ ____ _
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user