diff --git a/NEWS.md b/NEWS.md
index a00c9b35..77e56d47 100644
--- a/NEWS.md
+++ b/NEWS.md
@@ -5,6 +5,10 @@ Red Panda C++ Version 1.1.5
- enhancement: double clicking a non-text file in the project's view, will open it with external program
- fix: correctly update the start postion of selection after code completion
- enhancement: add a demo template for raylib/rdrawing predefined colors
+ - enhancement: add select current word command in the Selection menu
+ - change: add Selection menu
+ - enhancement: add memory view rows/columns settings in the settings dialog -> debugger -> general panel
+ - enhancement: add "Go to Line..." in the Code menu
Red Panda C++ Version 1.1.4
diff --git a/RedPandaIDE/RedPandaIDE_pt.ts b/RedPandaIDE/RedPandaIDE_pt.ts
index 4f185d83..bc1efddf 100644
--- a/RedPandaIDE/RedPandaIDE_pt.ts
+++ b/RedPandaIDE/RedPandaIDE_pt.ts
@@ -784,6 +784,18 @@
+
+
+
+
+
+
+
+
+
+
+
+
Debugger
@@ -4496,6 +4508,26 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
NewClassDialog
diff --git a/RedPandaIDE/RedPandaIDE_zh_CN.ts b/RedPandaIDE/RedPandaIDE_zh_CN.ts
index c6f7c999..3f79395b 100644
--- a/RedPandaIDE/RedPandaIDE_zh_CN.ts
+++ b/RedPandaIDE/RedPandaIDE_zh_CN.ts
@@ -188,17 +188,17 @@ p, li { white-space: pre-wrap; }
BacktraceModel
-
+
函数
-
+
文件名
-
+
行
@@ -244,37 +244,37 @@ p, li { white-space: pre-wrap; }
BreakpointModel
-
+
文件名
-
+
行
-
+
条件
-
+
保存文件'%1'失败。
-
+
无法写入文件'%1'.
-
+
JSON文件'%1':%2中存在错误:%3
-
+
无法读取文件'%1'.
@@ -1110,7 +1110,22 @@ Are you really want to continue?
显示详细调试器日志
-
+
+
+ 内存视图
+
+
+
+
+ 内存视图行数
+
+
+
+
+ 内存视图列数
+
+
+
程序收到信号停止时缺省打开CPU窗口
@@ -1119,17 +1134,17 @@ Are you really want to continue?
在调试主控台中显示gdb输出注解
-
+
自动保存
-
+
自动保存断点
-
+
自动保存监视
@@ -1138,27 +1153,27 @@ Are you really want to continue?
反汇编代码样式
-
+
CPU信息窗口
-
+
反汇编代码样式
-
+
Intel
-
+
AT&&T
-
+
以混合模式显示反汇编代码
@@ -1224,7 +1239,7 @@ Are you really want to continue?
无法在"%1"找到gdb server
-
+
执行以求值
@@ -1233,22 +1248,22 @@ Are you really want to continue?
不在当前语境中
-
+
编译
-
+
源文件比程序文件新。
-
+
重新编译?
-
+
收到信号"%1":
@@ -1319,9 +1334,9 @@ Are you really want to continue?
打印文档
-
-
-
+
+
+
Ctrl+单击以获取更多信息
@@ -1330,27 +1345,27 @@ Are you really want to continue?
未找到符号'%1'!
-
+
找不到astyle程序
-
+
找不到astyle程序"%1".
-
+
断点条件
-
+
输入当前断点的生效条件:
-
+
只读
@@ -3840,13 +3855,13 @@ Are you really want to continue?
小熊猫C++
-
-
+
+
-
+
编译器
@@ -3865,8 +3880,8 @@ Are you really want to continue?
工具
-
-
+
+
运行
@@ -3876,27 +3891,27 @@ Are you really want to continue?
编辑
-
-
-
+
+
+
项目
-
-
+
+
监视
-
-
+
+
结构
-
-
+
+
文件
@@ -3905,69 +3920,69 @@ Are you really want to continue?
资源
-
-
-
-
-
+
+
+
+
+
调试
-
+
求值
-
+
调试主控台
-
+
调用栈
-
+
断点
-
+
局部变量
-
-
-
+
+
+
查找
-
+
历史:
-
+
重新查找
-
+
替换为:
-
+
替换
-
+
关闭
@@ -3977,13 +3992,13 @@ Are you really want to continue?
运行
-
-
+
+
代码
-
+
窗口
@@ -4001,133 +4016,138 @@ Are you really want to continue?
新建
-
+
Ctrl+N
-
+
打开...
-
+
Ctrl+O
-
+
保存
-
+
Ctrl+S
-
+
另存为...
-
+
另存为
-
+
全部保存
-
+
Ctrl+Shift+S
-
+
选项
-
-
-
+
+
+
编译
-
-
+
+
工具输出
-
-
+
+
选择输入文件
-
+
...
-
+
工具面板
-
+
Git
-
+
+
+ 选择
+
+
+
F9
-
+
F10
-
+
恢复
-
+
Ctrl+Z
-
+
重做
-
+
Ctrl+Y
-
+
剪切
-
+
Ctrl+X
-
+
@@ -4135,279 +4155,279 @@ Are you really want to continue?
复制
-
+
Ctrl+C
-
+
粘贴
-
+
Ctrl+V
-
+
选择全部
-
+
Ctrl+A
-
+
缩进
-
+
取消缩进
-
+
切换注释
-
+
Ctrl+/
-
+
全部收起
-
+
全部展开
-
+
使用ANSI编码
-
+
使用UTF-8编码
-
+
自动检测
-
+
转换为ANSI编码
-
+
转换为UTF-8编码
-
-
+
+
编译运行
-
+
F11
-
-
+
+
全部重编译
-
+
F12
-
+
停止执行
-
+
F6
-
+
F5
-
+
单步跳过
-
+
F7
-
+
单步进入
-
-
-
+
+
+
试题集
-
-
-
+
+
+
新建试题集
-
-
+
+
添加试题
-
-
+
+
删除试题
-
-
-
+
+
+
保存试题集
-
-
-
+
+
+
载入试题集
-
+
内存
-
+
Address:
地址表达式:
-
+
取消
-
-
+
+
TODO
-
-
+
+
书签
-
-
-
+
+
+
试题
-
-
+
+
添加试题案例
-
-
+
+
Remove Problem Set
删除试题集
-
-
+
+
打开答案源代码文件
-
-
+
+
Run Current Case
运行所有案例
-
+
测试案例验证选项
-
+
%v/%m
-
+
输出
-
+
输入
-
+
期望输出
-
+
帮助
-
+
重构
-
+
视图
@@ -4416,583 +4436,593 @@ Are you really want to continue?
工具窗口
-
+
主工具栏
-
+
编译器配置集
-
+
管理器
-
+
消息
-
+
忽略空格
-
-
+
+
新建源代码文件
-
+
Tab
-
+
Shift+Tab
-
+
F8
-
+
单步跳出
-
+
Ctrl+F8
-
+
执行到光标处
-
+
Ctrl+F5
-
+
继续执行
-
+
F4
-
+
添加监视
-
+
打开CPU信息窗口...
-
+
退出
-
+
查找...
-
+
Ctrl+F
-
+
在文件中查找...
-
+
Ctrl+Shift+F
-
+
替换
-
+
Ctrl+R
-
+
查找下一个
-
+
F3
-
+
查找前一个
-
+
Shift+F3
-
+
删除监视值
-
+
Remove All
删除全部监视值
-
+
修改监视值
-
+
对代码重新排版
-
+
Ctrl+Shift+A
-
+
前一次编辑位置
-
+
Ctrl+Alt+Left
-
+
后一次编辑位置
-
+
Ctrl+Alt+Right
-
+
Ctrl+W
-
+
全部关闭
-
+
Ctrl+Shift+W
-
+
最大化编辑器
-
+
Ctrl+F11
-
+
下一窗口
-
+
Ctrl+Tab
-
+
前一窗口
-
+
Ctrl+Shift+Tab
-
+
切换断点
-
+
Ctrl+F4
-
-
+
+
删除所有断点
-
+
设置断点条件...
-
+
跳转到声明处
-
+
Ctrl+Shift+G
-
+
跳转到定义处
-
+
Ctrl+G
-
+
查找符号的引用
-
+
打开所在的文件夹
-
+
Ctrl+B
-
+
打开命令行窗口
-
+
文件属性...
-
+
关闭项目
-
+
项目属性
-
+
新建项目...
-
-
+
+
新建项目文件
-
+
F1
-
+
向上移动选中的行
-
+
Ctrl+Shift+Up
-
+
向下移动选中的行
-
+
Ctrl+Shift+Down
-
+
转换为UTF-8 BOM编码
-
+
使用UTF-8 BOM编码
-
+
编译器选项...
-
+
切换管理器面板
-
+
Ctrl+F9
-
+
切换消息面板
-
+
Ctrl+F10
-
+
Raylib教程
+
+
+
+ 选中当前单词
+
+
+
+
+ 跳转到行...
+
新建文件
-
+
添加到项目...
-
+
从项目删除
-
+
查看Makefile
-
+
清理构建文件
-
+
在浏览器中打开
-
+
在终端中打开
-
+
关于
-
-
+
+
重命名符号
-
+
Shift+F6
-
+
打印...
-
+
Ctrl+P
-
-
+
+
导出为RTF
-
-
+
+
导出为HTML
-
+
移动到其他视图
-
+
Ctrl+M
-
-
+
+
C++参考手册
-
+
C参考手册
-
+
显示全部工具面板
-
+
Create Repository
创建Git仓库
-
+
提交(Commit)
-
+
撤销(Revert)
-
+
回滚(Reset)
-
+
添加文件
-
+
还原(Restore)
-
+
官方网站
-
+
分支切换(Switch)
-
+
合并(Merge)
-
-
+
+
Log
显示日志(Log)
-
+
远程仓库...
-
+
取回(Fetch)
-
+
拉取(Pull)
-
+
推送(Push)
-
+
隐藏不支持的文件
-
+
切换块注释
-
+
Alt+Shift+A
-
+
匹配当前括号
-
+
Ctrl+]
@@ -5001,50 +5031,50 @@ Are you really want to continue?
工具窗口栏
-
+
状态栏
-
+
Ctrl+Backspace
-
+
中断
-
-
+
+
删除到单词开头
-
+
Ctrl+Shift+B
-
+
删除到单词结尾
-
+
Ctrl+Shift+E
-
+
Add Class...
新建类...
-
-
+
+
New Header
新建头文件...
@@ -5054,47 +5084,47 @@ Are you really want to continue?
插入行
-
+
删除当前行
-
+
Ctrl+D
-
+
复制当前行
-
+
Ctrl+E
-
+
删除当前单词
-
+
Ctrl+Shift+D
-
+
删除到行尾
-
+
Ctrl+Del
-
+
删除到行首
@@ -5103,27 +5133,27 @@ Are you really want to continue?
C/C++参考
-
+
EGE图形库手册
-
+
添加书签
-
+
删除书签
-
+
修改书签说明
-
+
在文件视图中定位
@@ -5132,7 +5162,7 @@ Are you really want to continue?
打开文件夹
-
+
运行参数...
@@ -5356,9 +5386,19 @@ Are you really want to continue?
全部复制
-
-
-
+
+
+ 跳转到行
+
+
+
+
+ 行
+
+
+
+
+
@@ -5377,7 +5417,7 @@ Are you really want to continue?
-
+
试题集%1
@@ -5451,15 +5491,15 @@ Are you really want to continue?
-
-
+
+
书签描述
-
-
+
+
描述:
@@ -5589,7 +5629,7 @@ Are you really want to continue?
-
+
删除
@@ -5683,7 +5723,7 @@ Are you really want to continue?
-
+
需要保存吗?
@@ -5707,7 +5747,7 @@ Are you really want to continue?
-
+
保存失败
@@ -5747,104 +5787,104 @@ Are you really want to continue?
无标题%1
-
+
修改监视表达式
-
+
监视表达式
-
+
您真的要清除该文件的所有断点吗?
-
+
新建项目
-
+
关闭'%1'以打开新项目?
-
+
文件夹不存在
-
+
文件夹'%1'不存在。是否创建?
-
+
无法创建文件夹
-
+
创建文件夹'%1'失败。
-
+
-
+
文件夹%1不是空的。
-
+
你真的要删除它吗?
-
+
改变工作文件夹
-
+
File '%1' is not in the current working folder
文件'%1'不在当前工作文件夹中。
-
+
是否将工作文件夹改设为'%1'?
-
+
无法提交
-
+
Git需要用信息进行提交。
-
+
选择输入数据文件
-
-
+
+
所有文件 (*.*)
-
+
Choose Expected Input Data File
选择期望输出文件
@@ -5854,61 +5894,61 @@ Are you really want to continue?
第%1行
-
-
-
+
+
+
选择工作文件夹
-
-
+
+
头文件已存在
-
-
+
+
头文件"%1"已存在!
-
+
源文件已存在!
-
+
源文件"%1"已存在!
-
+
无法提交!
-
+
下列文件处于冲突状态,请解决后重新添加和提交:
-
+
提交信息
-
+
提交信息:
-
+
提交失败
-
+
提交信息不能为空!
@@ -5917,53 +5957,53 @@ Are you really want to continue?
小熊猫Dev-C++项目文件 (*.dev)
-
+
新建项目失败
-
+
无法使用模板创建项目
-
+
删除文件
-
+
同时从硬盘上删除文件?
-
+
无标题
-
+
新的项目文件名
-
+
文件名:
-
+
文件已存在!
-
+
文件'%1'已经存在!
-
+
添加到项目
@@ -5978,75 +6018,75 @@ Are you really want to continue?
本操作会删除此试题的所有案例。
-
+
小熊猫C++项目文件(*.dev)
-
+
重命名出错
-
+
符号'%1'在系统头文件中定义,无法修改。
-
+
新名称
-
-
+
+
替换出错
-
+
无法打开文件'%1'进行替换!
-
+
内容和上次查找时不一致。
-
+
RTF格式文件 (*.rtf)
-
+
HTML文件 (*.html)
-
+
当前的试题集不是空的。
-
+
试题%1
-
-
+
+
试题集文件 (*.pbs)
-
+
载入失败
-
+
试题案例%1
@@ -6066,7 +6106,7 @@ Are you really want to continue?
-
+
错误
@@ -6131,7 +6171,7 @@ Are you really want to continue?
-
+
确认转换
@@ -6139,7 +6179,7 @@ Are you really want to continue?
-
+
当前编辑器中的文件将会使用%1编码保存。<br />这项操作无法被撤回。<br />你确定要继续吗?
@@ -6154,18 +6194,18 @@ Are you really want to continue?
输入监视表达式
-
+
(%1/%2)正在解析文件"%3"
-
-
+
+
完成%1个文件的解析,用时%2秒
-
+
(每秒%1个文件)
@@ -7449,7 +7489,7 @@ Are you really want to continue?
生成调试信息(-g3)
-
+
您同意小熊猫C++在PATH路径中寻找gcc编译器吗?
@@ -7558,23 +7598,23 @@ Are you really want to continue?
只生成汇编代码(-S)
-
-
+
+
确认
-
+
在验证编译器设置"%1"时遇到了下列问题:
-
+
在配置中保留这些文件夹可能会导致编译出错。
-
+
是否让小熊猫C++删除这些配置,并尝试重新建立配置?
@@ -7583,13 +7623,13 @@ Are you really want to continue?
如果仍然保留这些设置,可能会导致编译错误。<br /><br />请选择“是”,除非您清楚的知道选择“否”的后果,
-
-
+
+
未配置编译器设置。
-
+
您需要小熊猫C++在下列位置搜索编译器吗:<br />%1<br />%2
@@ -7976,12 +8016,12 @@ Are you really want to continue?
RegisterModel
-
+
寄存器
-
+
值
@@ -8409,14 +8449,14 @@ Are you really want to continue?
性能
-
+
编译器配置集
-
+
@@ -8428,7 +8468,7 @@ Are you really want to continue?
自动链接
-
+
@@ -8504,15 +8544,15 @@ Are you really want to continue?
杂项
-
-
+
+
程序运行
-
+
试题集
@@ -8994,49 +9034,49 @@ Are you really want to continue?
WatchModel
-
+
保存文件'%1'失败。
-
+
无法写入文件'%1'.
-
+
JSON文件'%1':%2中存在错误:%3
-
-
+
+
执行以求值
-
-
+
+
在当前作用域中无效
-
+
无法读取文件'%1'.
-
+
表达式
-
+
类型
-
+
值
diff --git a/RedPandaIDE/RedPandaIDE_zh_TW.ts b/RedPandaIDE/RedPandaIDE_zh_TW.ts
index 97ad747d..2fc23e9e 100644
--- a/RedPandaIDE/RedPandaIDE_zh_TW.ts
+++ b/RedPandaIDE/RedPandaIDE_zh_TW.ts
@@ -784,6 +784,18 @@
+
+
+
+
+
+
+
+
+
+
+
+
Debugger
@@ -4496,6 +4508,26 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
NewClassDialog
diff --git a/RedPandaIDE/compiler/compilerinfo.cpp b/RedPandaIDE/compiler/compilerinfo.cpp
index b106d2a1..2ff153a2 100644
--- a/RedPandaIDE/compiler/compilerinfo.cpp
+++ b/RedPandaIDE/compiler/compilerinfo.cpp
@@ -267,3 +267,17 @@ bool GCCCompilerInfo::forceUTF8InDebugger()
{
return false;
}
+
+GCCUTF8CompilerInfo::GCCUTF8CompilerInfo():CompilerInfo(COMPILER_GCC_UTF8)
+{
+}
+
+bool GCCUTF8CompilerInfo::supportConvertingCharset()
+{
+ return true;
+}
+
+bool GCCUTF8CompilerInfo::forceUTF8InDebugger()
+{
+ return true;
+}
diff --git a/RedPandaIDE/compiler/compilerinfo.h b/RedPandaIDE/compiler/compilerinfo.h
index de4cc80e..302cb418 100644
--- a/RedPandaIDE/compiler/compilerinfo.h
+++ b/RedPandaIDE/compiler/compilerinfo.h
@@ -7,6 +7,7 @@
#include
#define COMPILER_CLANG "Clang"
#define COMPILER_GCC "GCC"
+#define COMPILER_GCC_UTF8 "GCC_UTF8"
#define CC_CMD_OPT_ANSI "cc_cmd_opt_ansi"
#define CC_CMD_OPT_NO_ASM "cc_cmd_opt_no_asm"
@@ -122,6 +123,13 @@ public:
bool forceUTF8InDebugger() override;
};
+class GCCUTF8CompilerInfo: public CompilerInfo{
+public:
+ GCCUTF8CompilerInfo();
+ bool supportConvertingCharset() override;
+ bool forceUTF8InDebugger() override;
+};
+
#endif // COMPILERINFO_H
diff --git a/RedPandaIDE/debugger.cpp b/RedPandaIDE/debugger.cpp
index f602db68..595d6b27 100644
--- a/RedPandaIDE/debugger.cpp
+++ b/RedPandaIDE/debugger.cpp
@@ -235,7 +235,11 @@ void Debugger::refreshAll()
refreshWatchVars();
sendCommand("-stack-list-variables", "--all-values");
if (memoryModel()->startAddress()>0)
- sendCommand("-data-read-memory",QString("%1 x 1 8 8 ").arg(memoryModel()->startAddress()));
+ sendCommand("-data-read-memory",QString("%1 x 1 %2 %3 ")
+ .arg(memoryModel()->startAddress())
+ .arg(pSettings->debugger().memoryViewRows())
+ .arg(pSettings->debugger().memoryViewColumns())
+ );
}
RegisterModel *Debugger::registerModel() const
@@ -2509,6 +2513,7 @@ MemoryModel::MemoryModel(int dataPerLine, QObject *parent):
void MemoryModel::updateMemory(const QStringList &value)
{
+ int maxDataPerLine=-1;
QRegExp delimiter("(\\s+)");
QList newModel;
for (int i=0;istartAddress = stringToHex(dataLst[0],isOk);
if (isOk) {
+ if (dataLst.length()-1>maxDataPerLine)
+ maxDataPerLine = dataLst.length()-1;
for (int j=1;j0 && newModel.count()== mLines.count() &&
- newModel[0]->startAddress == mLines[0]->startAddress) {
+ newModel[0]->startAddress == mLines[0]->startAddress &&
+ maxDataPerLine==mDataPerLine) {
for (int i=0;i0)
+ mDataPerLine=maxDataPerLine;
mLines = newModel;
endResetModel();
}
diff --git a/RedPandaIDE/mainwindow.cpp b/RedPandaIDE/mainwindow.cpp
index 13f4f9c8..d00e6d72 100644
--- a/RedPandaIDE/mainwindow.cpp
+++ b/RedPandaIDE/mainwindow.cpp
@@ -454,6 +454,7 @@ void MainWindow::updateEditorActions()
ui->actionRemove_Bookmark->setEnabled(false);
ui->actionModify_Bookmark_Description->setEnabled(false);
+ ui->actionGo_to_Line->setEnabled(false);
ui->actionLocate_in_Files_View->setEnabled(false);
} else {
ui->actionAuto_Detect->setEnabled(true);
@@ -505,6 +506,7 @@ void MainWindow::updateEditorActions()
ui->actionRemove_Bookmark->setEnabled(e->hasBookmark(line));
ui->actionModify_Bookmark_Description->setEnabled(e->hasBookmark(line));
+ ui->actionGo_to_Line->setEnabled(true);
ui->actionLocate_in_Files_View->setEnabled(!e->isNew());
}
@@ -4040,6 +4042,8 @@ void MainWindow::onEditorContextMenu(const QPoint& pos)
menu.addAction(ui->actionRemove_Bookmark);
menu.addAction(ui->actionModify_Bookmark_Description);
menu.addSeparator();
+ menu.addAction(ui->actionGo_to_Line);
+ menu.addSeparator();
menu.addAction(ui->actionFile_Properties);
//these actions needs parser
@@ -4058,6 +4062,8 @@ void MainWindow::onEditorContextMenu(const QPoint& pos)
menu.addAction(ui->actionAdd_bookmark);
menu.addAction(ui->actionRemove_Bookmark);
menu.addAction(ui->actionModify_Bookmark_Description);
+ menu.addSeparator();
+ menu.addAction(ui->actionGo_to_Line);
}
ui->actionLocate_in_Files_View->setEnabled(!editor->isNew());
ui->actionBreakpoint_property->setEnabled(editor->hasBreakpoint(line));
@@ -5227,7 +5233,11 @@ void MainWindow::onDebugMemoryAddressInput()
if (!s.isEmpty()) {
// connect(mDebugger, &Debugger::memoryExamineReady,
// this, &MainWindow::onMemoryExamineReady);
- mDebugger->sendCommand("-data-read-memory",QString("%1 x 1 8 8 ").arg(s));
+ mDebugger->sendCommand("-data-read-memory",QString("%1 x 1 %2 %3 ")
+ .arg(s)
+ .arg(pSettings->debugger().memoryViewRows())
+ .arg(pSettings->debugger().memoryViewColumns())
+ );
}
}
@@ -8015,3 +8025,28 @@ void MainWindow::on_actionRaylib_Manual_triggered()
}
}
+
+void MainWindow::on_actionSelect_Word_triggered()
+{
+ Editor* e=mEditorList->getEditor();
+ if (e) {
+ e->selectWord();
+ }
+}
+
+
+void MainWindow::on_actionGo_to_Line_triggered()
+{
+ Editor* e=mEditorList->getEditor();
+ if (!e)
+ return;
+ bool ok;
+ int lineNo=QInputDialog::getInt(e,tr("Go to Line"),tr("Line"),
+ e->caretY(),1,e->document()->count(),
+ 1,&ok);
+ if (ok && lineNo!=e->caretY()) {
+ e->setCaretPosition(lineNo,1);
+ e->setFocus();
+ }
+}
+
diff --git a/RedPandaIDE/mainwindow.h b/RedPandaIDE/mainwindow.h
index 966cc5e0..d9a28648 100644
--- a/RedPandaIDE/mainwindow.h
+++ b/RedPandaIDE/mainwindow.h
@@ -695,6 +695,10 @@ private slots:
void on_actionRaylib_Manual_triggered();
+ void on_actionSelect_Word_triggered();
+
+ void on_actionGo_to_Line_triggered();
+
private:
Ui::MainWindow *ui;
EditorList *mEditorList;
diff --git a/RedPandaIDE/mainwindow.ui b/RedPandaIDE/mainwindow.ui
index 7003ec6f..d9a09a5e 100644
--- a/RedPandaIDE/mainwindow.ui
+++ b/RedPandaIDE/mainwindow.ui
@@ -182,7 +182,6 @@
-
@@ -193,8 +192,6 @@
-
-
@@ -223,6 +220,7 @@
+
@@ -323,8 +321,19 @@
+
+
@@ -3168,6 +3177,16 @@
Raylib Manual
+
+
+ Select Word
+
+
+
+
+ Go to Line...
+
+
diff --git a/RedPandaIDE/qsynedit/KeyStrokes.cpp b/RedPandaIDE/qsynedit/KeyStrokes.cpp
index ea99faa2..4996cf38 100644
--- a/RedPandaIDE/qsynedit/KeyStrokes.cpp
+++ b/RedPandaIDE/qsynedit/KeyStrokes.cpp
@@ -189,15 +189,16 @@ void SynEditKeyStrokes::resetDefaults()
add(SynEditorCommand::ecScrollDown, Qt::Key_Down, Qt::ControlModifier);
add(SynEditorCommand::ecLeft, Qt::Key_Left, Qt::NoModifier);
add(SynEditorCommand::ecSelLeft, Qt::Key_Left, Qt::ShiftModifier);
- add(SynEditorCommand::ecSelLeft, Qt::Key_Left, Qt::ShiftModifier | Qt::AltModifier);
add(SynEditorCommand::ecWordLeft, Qt::Key_Left, Qt::ControlModifier);
add(SynEditorCommand::ecSelWordLeft, Qt::Key_Left, Qt::ShiftModifier|Qt::ControlModifier);
add(SynEditorCommand::ecRight, Qt::Key_Right, Qt::NoModifier);
add(SynEditorCommand::ecSelRight, Qt::Key_Right, Qt::ShiftModifier);
- add(SynEditorCommand::ecSelRight, Qt::Key_Right, Qt::ShiftModifier | Qt::AltModifier);
add(SynEditorCommand::ecWordRight, Qt::Key_Right, Qt::ControlModifier);
add(SynEditorCommand::ecSelWordRight, Qt::Key_Right, Qt::ShiftModifier|Qt::ControlModifier);
+// add(SynEditorCommand::ecExpandSelection, Qt::Key_Right, Qt::ShiftModifier|Qt::AltModifier);
+// add(SynEditorCommand::ecShrinkSelection, Qt::Key_Left, Qt::ShiftModifier | Qt::AltModifier);
+
add(SynEditorCommand::ecPageDown, Qt::Key_PageDown, Qt::NoModifier);
add(SynEditorCommand::ecSelPageDown, Qt::Key_PageDown, Qt::ShiftModifier);
add(SynEditorCommand::ecPageBottom, Qt::Key_PageDown, Qt::ControlModifier);
diff --git a/RedPandaIDE/qsynedit/KeyStrokes.h b/RedPandaIDE/qsynedit/KeyStrokes.h
index e7808444..a7157e46 100644
--- a/RedPandaIDE/qsynedit/KeyStrokes.h
+++ b/RedPandaIDE/qsynedit/KeyStrokes.h
@@ -91,6 +91,8 @@ enum class SynEditorCommand {
ecCopy = 201, // Copy selection to clipboard
ecSelWord = 202,
ecSelectAll = 203, // Select entire contents of editor, cursor to end
+ ecExpandSelection = 204, // expand selection
+ ecShrinkSelection = 205, // shrink selection
ecScrollUp = 211, // Scroll up one line leaving cursor position unchanged.
ecScrollDown = 212, // Scroll down one line leaving cursor position unchanged.
diff --git a/RedPandaIDE/qsynedit/SynEdit.cpp b/RedPandaIDE/qsynedit/SynEdit.cpp
index adab86d1..72ec0126 100644
--- a/RedPandaIDE/qsynedit/SynEdit.cpp
+++ b/RedPandaIDE/qsynedit/SynEdit.cpp
@@ -367,84 +367,84 @@ int SynEdit::maxScrollWidth() const
return std::max(maxLen-mCharsInWindow+1, 1);
}
-bool SynEdit::getHighlighterAttriAtRowCol(const BufferCoord &XY, QString &Token, PSynHighlighterAttribute &Attri)
+bool SynEdit::getHighlighterAttriAtRowCol(const BufferCoord &pos, QString &token, PSynHighlighterAttribute &attri)
{
- SynHighlighterTokenType TmpType;
- int TmpKind, TmpStart;
- return getHighlighterAttriAtRowColEx(XY, Token, TmpType, TmpKind,TmpStart, Attri);
+ SynHighlighterTokenType tmpType;
+ int tmpKind, tmpStart;
+ return getHighlighterAttriAtRowColEx(pos, token, tmpType, tmpKind,tmpStart, attri);
}
-bool SynEdit::getHighlighterAttriAtRowCol(const BufferCoord &XY, QString &Token, bool &tokenFinished, SynHighlighterTokenType &TokenType, PSynHighlighterAttribute &Attri)
+bool SynEdit::getHighlighterAttriAtRowCol(const BufferCoord &pos, QString &token, bool &tokenFinished, SynHighlighterTokenType &tokenType, PSynHighlighterAttribute &attri)
{
- int PosX, PosY, endPos, Start;
- QString Line;
- PosY = XY.line - 1;
- if (mHighlighter && (PosY >= 0) && (PosY < mDocument->count())) {
- Line = mDocument->getString(PosY);
- if (PosY == 0) {
+ int posX, posY, endPos, start;
+ QString line;
+ posY = pos.line - 1;
+ if (mHighlighter && (posY >= 0) && (posY < mDocument->count())) {
+ line = mDocument->getString(posY);
+ if (posY == 0) {
mHighlighter->resetState();
} else {
- mHighlighter->setState(mDocument->ranges(PosY-1));
+ mHighlighter->setState(mDocument->ranges(posY-1));
}
- mHighlighter->setLine(Line, PosY);
- PosX = XY.ch;
- if ((PosX > 0) && (PosX <= Line.length())) {
+ mHighlighter->setLine(line, posY);
+ posX = pos.ch;
+ if ((posX > 0) && (posX <= line.length())) {
while (!mHighlighter->eol()) {
- Start = mHighlighter->getTokenPos() + 1;
- Token = mHighlighter->getToken();
- endPos = Start + Token.length()-1;
- if ((PosX >= Start) && (PosX <= endPos)) {
- Attri = mHighlighter->getTokenAttribute();
- if (PosX == endPos)
+ start = mHighlighter->getTokenPos() + 1;
+ token = mHighlighter->getToken();
+ endPos = start + token.length()-1;
+ if ((posX >= start) && (posX <= endPos)) {
+ attri = mHighlighter->getTokenAttribute();
+ if (posX == endPos)
tokenFinished = mHighlighter->getTokenFinished();
else
tokenFinished = false;
- TokenType = mHighlighter->getTokenType();
+ tokenType = mHighlighter->getTokenType();
return true;
}
mHighlighter->next();
}
}
}
- Token = "";
- Attri = PSynHighlighterAttribute();
+ token = "";
+ attri = PSynHighlighterAttribute();
tokenFinished = false;
return false;
}
-bool SynEdit::getHighlighterAttriAtRowColEx(const BufferCoord &XY, QString &Token, SynHighlighterTokenType &TokenType, SynTokenKind &TokenKind, int &Start, PSynHighlighterAttribute &Attri)
+bool SynEdit::getHighlighterAttriAtRowColEx(const BufferCoord &pos, QString &token, SynHighlighterTokenType &tokenType, SynTokenKind &tokenKind, int &start, PSynHighlighterAttribute &attri)
{
- int PosX, PosY, endPos;
- QString Line;
- PosY = XY.line - 1;
- if (mHighlighter && (PosY >= 0) && (PosY < mDocument->count())) {
- Line = mDocument->getString(PosY);
- if (PosY == 0) {
+ int posX, posY, endPos;
+ QString line;
+ posY = pos.line - 1;
+ if (mHighlighter && (posY >= 0) && (posY < mDocument->count())) {
+ line = mDocument->getString(posY);
+ if (posY == 0) {
mHighlighter->resetState();
} else {
- mHighlighter->setState(mDocument->ranges(PosY-1));
+ mHighlighter->setState(mDocument->ranges(posY-1));
}
- mHighlighter->setLine(Line, PosY);
- PosX = XY.ch;
- if ((PosX > 0) && (PosX <= Line.length())) {
+ mHighlighter->setLine(line, posY);
+ posX = pos.ch;
+ if ((posX > 0) && (posX <= line.length())) {
while (!mHighlighter->eol()) {
- Start = mHighlighter->getTokenPos() + 1;
- Token = mHighlighter->getToken();
- endPos = Start + Token.length()-1;
- if ((PosX >= Start) && (PosX <= endPos)) {
- Attri = mHighlighter->getTokenAttribute();
- TokenKind = mHighlighter->getTokenKind();
- TokenType = mHighlighter->getTokenType();
+ start = mHighlighter->getTokenPos() + 1;
+ token = mHighlighter->getToken();
+ endPos = start + token.length()-1;
+ if ((posX >= start) && (posX <= endPos)) {
+ attri = mHighlighter->getTokenAttribute();
+ tokenKind = mHighlighter->getTokenKind();
+ tokenType = mHighlighter->getTokenType();
return true;
}
mHighlighter->next();
}
}
}
- Token = "";
- Attri = PSynHighlighterAttribute();
- TokenKind = 0;
- TokenType = SynHighlighterTokenType::Default;
+ token = "";
+ attri = PSynHighlighterAttribute();
+ tokenKind = 0;
+ tokenType = SynHighlighterTokenType::Default;
return false;
}
@@ -1514,24 +1514,38 @@ void SynEdit::setSelWord()
setWordBlock(caretXY());
}
-void SynEdit::setWordBlock(BufferCoord Value)
+void SynEdit::setWordBlock(BufferCoord value)
{
// if (mOptions.testFlag(eoScrollPastEol))
// Value.Char =
// else
// Value.Char = std::max(Value.Char, 1);
- Value.line = minMax(Value.line, 1, mDocument->count());
- Value.ch = std::max(Value.ch, 1);
- QString TempString = mDocument->getString(Value.line - 1); //needed for CaretX = LineLength +1
- if (Value.ch > TempString.length()) {
- internalSetCaretXY(BufferCoord{TempString.length()+1, Value.line});
+ value.line = minMax(value.line, 1, mDocument->count());
+ value.ch = std::max(value.ch, 1);
+ QString TempString = mDocument->getString(value.line - 1); //needed for CaretX = LineLength +1
+ if (value.ch > TempString.length()) {
+ internalSetCaretXY(BufferCoord{TempString.length()+1, value.line});
return;
}
- BufferCoord v_WordStart = wordStartEx(Value);
- BufferCoord v_WordEnd = wordEndEx(Value);
- if ((v_WordStart.line == v_WordEnd.line) && (v_WordStart.ch < v_WordEnd.ch))
- setCaretAndSelection(v_WordEnd, v_WordStart, v_WordEnd);
+ BufferCoord vWordStart = wordStartEx(value);
+ BufferCoord vWordEnd = wordEndEx(value);
+ if ((vWordStart.line == vWordEnd.line) && (vWordStart.ch < vWordEnd.ch))
+ setCaretAndSelection(vWordEnd, vWordStart, vWordEnd);
+}
+
+void SynEdit::doExpandSelection(const BufferCoord &pos)
+{
+ if (selAvail()) {
+ //todo
+ } else {
+ setWordBlock(pos);
+ }
+}
+
+void SynEdit::doShrinkSelection(const BufferCoord &pos)
+{
+ //todo
}
int SynEdit::findCommentStartLine(int searchStartLine)
@@ -5834,6 +5848,12 @@ void SynEdit::ExecuteCommand(SynEditorCommand Command, QChar AChar, void *pData)
case SynEditorCommand::ecSelectAll:
doSelectAll();
break;
+ case SynEditorCommand::ecExpandSelection:
+ doExpandSelection(caretXY());
+ break;
+ case SynEditorCommand::ecShrinkSelection:
+ doShrinkSelection(caretXY());
+ break;
case SynEditorCommand::ecDeleteLastChar:
doDeleteLastChar();
break;
@@ -6332,7 +6352,7 @@ void SynEdit::mouseDoubleClickEvent(QMouseEvent *event)
QAbstractScrollArea::mouseDoubleClickEvent(event);
QPoint ptMouse = event->pos();
if (ptMouse.x() >= mGutterWidth + 2) {
- setWordBlock(caretXY());
+ setSelWord();
mStateFlags.setFlag(SynStateFlag::sfDblClicked);
}
}
diff --git a/RedPandaIDE/qsynedit/SynEdit.h b/RedPandaIDE/qsynedit/SynEdit.h
index 1e871e84..e6a9ecd6 100644
--- a/RedPandaIDE/qsynedit/SynEdit.h
+++ b/RedPandaIDE/qsynedit/SynEdit.h
@@ -227,6 +227,7 @@ public:
BufferCoord wordEndEx(const BufferCoord& XY);
BufferCoord prevWordPos();
BufferCoord prevWordPosEx(const BufferCoord& XY);
+
void commandProcessor(SynEditorCommand Command, QChar AChar = QChar(), void * pData = nullptr);
//Caret
void showCaret();
@@ -256,14 +257,14 @@ public:
int maxScrollWidth() const;
int maxScrollHeight() const;
- bool getHighlighterAttriAtRowCol(const BufferCoord& XY, QString& Token,
- PSynHighlighterAttribute& Attri);
- bool getHighlighterAttriAtRowCol(const BufferCoord& XY, QString& Token,
- bool& tokenFinished, SynHighlighterTokenType& TokenType,
- PSynHighlighterAttribute& Attri);
- bool getHighlighterAttriAtRowColEx(const BufferCoord& XY, QString& Token,
- SynHighlighterTokenType& TokenType, SynTokenKind &TokenKind, int &Start,
- PSynHighlighterAttribute& Attri);
+ bool getHighlighterAttriAtRowCol(const BufferCoord& pos, QString& token,
+ PSynHighlighterAttribute& attri);
+ bool getHighlighterAttriAtRowCol(const BufferCoord& pos, QString& token,
+ bool& tokenFinished, SynHighlighterTokenType& tokenType,
+ PSynHighlighterAttribute& attri);
+ bool getHighlighterAttriAtRowColEx(const BufferCoord& pos, QString& token,
+ SynHighlighterTokenType& tokenType, SynTokenKind &tokenKind, int &start,
+ PSynHighlighterAttribute& attri);
void beginUndoBlock();
void endUndoBlock();
@@ -287,6 +288,9 @@ public:
virtual void selectAll() {
commandProcessor(SynEditorCommand::ecSelectAll);
}
+ virtual void selectWord() {
+ commandProcessor(SynEditorCommand::ecSelWord);
+ }
virtual void tab() { commandProcessor(SynEditorCommand::ecTab);}
virtual void shifttab() { commandProcessor(SynEditorCommand::ecShiftTab);}
virtual void toggleComment() { commandProcessor(SynEditorCommand::ecToggleComment);}
@@ -566,7 +570,10 @@ private:
void deleteFromTo(const BufferCoord& start, const BufferCoord& end);
void setSelWord();
- void setWordBlock(BufferCoord Value);
+ void setWordBlock(BufferCoord value);
+
+ void doExpandSelection(const BufferCoord& pos);
+ void doShrinkSelection(const BufferCoord& pos);
int calcIndentSpaces(int line, const QString& lineText, bool addIndent);
diff --git a/RedPandaIDE/settings.cpp b/RedPandaIDE/settings.cpp
index 7de1a441..9f8675b9 100644
--- a/RedPandaIDE/settings.cpp
+++ b/RedPandaIDE/settings.cpp
@@ -1974,6 +1974,14 @@ void Settings::CompilerSet::setProperties(const QString &binDir)
delimPos2++;
mVersion = output.mid(delimPos1,delimPos2-delimPos1);
+// //fix for mingw64 gcc
+// double versionValue;
+// bool ok;
+// versionValue = mVersion.toDouble(&ok);
+// if (ok && versionValue>=12) {
+// mCompilerType=COMPILER_GCC_UTF8;
+// }
+
// Find compiler builder
delimPos1 = delimPos2;
while ((delimPos1 < output.length()) && !(output[delimPos1] == '('))
@@ -3376,6 +3384,26 @@ void Settings::Debugger::setGDBServerPort(int newGDBServerPort)
mGDBServerPort = newGDBServerPort;
}
+int Settings::Debugger::memoryViewRows() const
+{
+ return mMemoryViewRows;
+}
+
+void Settings::Debugger::setMemoryViewRows(int newMemoryViewRows)
+{
+ mMemoryViewRows = newMemoryViewRows;
+}
+
+int Settings::Debugger::memoryViewColumns() const
+{
+ return mMemoryViewColumns;
+}
+
+void Settings::Debugger::setMemoryViewColumns(int newMemoryViewColumns)
+{
+ mMemoryViewColumns = newMemoryViewColumns;
+}
+
bool Settings::Debugger::autosaveBreakpoints() const
{
return mAutosaveBreakpoints;
@@ -3433,6 +3461,8 @@ void Settings::Debugger::doSave()
saveValue("open_cpu_info_when_signaled",mOpenCPUInfoWhenSignaled);
saveValue("use_gdb_server", mUseGDBServer);
saveValue("gdb_server_port",mGDBServerPort);
+ saveValue("memory_view_rows",mMemoryViewRows);
+ saveValue("memory_view_columns",mMemoryViewColumns);
}
@@ -3461,6 +3491,8 @@ void Settings::Debugger::doLoad()
mUseGDBServer = boolValue("use_gdb_server", true);
#endif
mGDBServerPort = intValue("gdb_server_port",41234);
+ mMemoryViewRows = intValue("memory_view_rows",8);
+ mMemoryViewColumns = intValue("memory_view_columns",8);
}
Settings::History::History(Settings *settings):_Base(settings, SETTING_HISTORY)
diff --git a/RedPandaIDE/settings.h b/RedPandaIDE/settings.h
index 88210f6e..2da80028 100644
--- a/RedPandaIDE/settings.h
+++ b/RedPandaIDE/settings.h
@@ -1135,6 +1135,12 @@ public:
int GDBServerPort() const;
void setGDBServerPort(int newGDBServerPort);
+ int memoryViewRows() const;
+ void setMemoryViewRows(int newMemoryViewRows);
+
+ int memoryViewColumns() const;
+ void setMemoryViewColumns(int newMemoryViewColumns);
+
private:
bool mEnableDebugConsole;
bool mShowDetailLog;
@@ -1151,6 +1157,8 @@ public:
bool mOpenCPUInfoWhenSignaled;
bool mUseGDBServer;
int mGDBServerPort;
+ int mMemoryViewRows;
+ int mMemoryViewColumns;
// _Base interface
protected:
diff --git a/RedPandaIDE/settingsdialog/debuggeneralwidget.cpp b/RedPandaIDE/settingsdialog/debuggeneralwidget.cpp
index c19eca89..427647de 100644
--- a/RedPandaIDE/settingsdialog/debuggeneralwidget.cpp
+++ b/RedPandaIDE/settingsdialog/debuggeneralwidget.cpp
@@ -55,6 +55,8 @@ void DebugGeneralWidget::doLoad()
ui->grpUseGDBServer->setChecked(pSettings->debugger().useGDBServer());
#endif
ui->spinGDBServerPort->setValue(pSettings->debugger().GDBServerPort());
+ ui->spinMemoryViewRows->setValue(pSettings->debugger().memoryViewRows());
+ ui->spinMemoryViewColumns->setValue(pSettings->debugger().memoryViewColumns());
}
void DebugGeneralWidget::doSave()
@@ -76,6 +78,8 @@ void DebugGeneralWidget::doSave()
pSettings->debugger().setUseGDBServer(ui->grpUseGDBServer->isChecked());
#endif
pSettings->debugger().setGDBServerPort(ui->spinGDBServerPort->value());
+ pSettings->debugger().setMemoryViewRows(ui->spinMemoryViewRows->value());
+ pSettings->debugger().setMemoryViewColumns(ui->spinMemoryViewColumns->value());
pSettings->debugger().save();
pMainWindow->updateDebuggerSettings();
}
diff --git a/RedPandaIDE/settingsdialog/debuggeneralwidget.ui b/RedPandaIDE/settingsdialog/debuggeneralwidget.ui
index 28a4d4fd..3d157511 100644
--- a/RedPandaIDE/settingsdialog/debuggeneralwidget.ui
+++ b/RedPandaIDE/settingsdialog/debuggeneralwidget.ui
@@ -7,7 +7,7 @@
0
0
704
- 563
+ 774
@@ -197,6 +197,120 @@
+ -
+
+
+ Memory View
+
+
+
+ 7
+
+
+ 7
+
+
-
+
+
+
+ 0
+
+
+ 0
+
+
+ 0
+
+
+ 0
+
+
-
+
+
+ Memory View Rows
+
+
+
+ -
+
+
+ 1
+
+
+ 999
+
+
+ 8
+
+
+
+ -
+
+
+ Qt::Horizontal
+
+
+
+ 40
+ 20
+
+
+
+
+
+
+
+ -
+
+
+
+ 0
+
+
+ 0
+
+
+ 0
+
+
+ 0
+
+
-
+
+
+ Memory View Columns
+
+
+
+ -
+
+
+ 1
+
+
+ 8
+
+
+
+ -
+
+
+ Qt::Horizontal
+
+
+
+ 437
+ 20
+
+
+
+
+
+
+
+
+
+
-
@@ -220,19 +334,19 @@
- -
-
-
- Show CPU Window when signal received
-
-
-
-
CPU Window
+
-
+
+
+ Show CPU Window when signal received
+
+
+
-