Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
58 changes: 58 additions & 0 deletions TeXmacs/tests/tmu/0310.tmu
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
<TMU|<tuple|1.1.0|2026.2.5>>

<style|<tuple|generic|chinese|table-captions-above|number-europe|preview-ref>>

<\body>
本讲义围绕钢结构轴心受力构件展开,涵盖轴心受拉与受压构件的核心知识点,包含<strong|知识框架脑图>、<strong|核心知识点讲解>、<strong|典型例题解析>三部分,贴合钢结构设计原理课程教学要求,兼顾理论推导与工程应用,可用于课堂授课、课后复习及设计参考。

<\enumerate>
<item><strong|定义>:仅承受通过截面形心轴线的轴向力,分<strong|轴心拉杆>(受拉)和<strong|轴心压杆>(受压)。

<item><strong|截面分类>

<\itemize>
<item>实腹式:整体连通,含热轧型钢(圆管 / 角钢 / H 型钢等)、组合截面(型钢 / 钢板拼接)、冷弯型钢(轻钢结构专用);型钢截面分<strong|强轴(<math|x> 轴,惯性矩大)<strong|和>弱轴(<math|y> 轴,惯性矩小)>。

<item>格构式:由肢件 + 缀件组成,常用双肢;实轴(<math|y> 轴)过肢件腹板,虚轴(<math|x> 轴)过缀件,易实现两主轴等稳定性,适用于大轴压荷载。
</itemize>

<item><strong|选型原则>:满足强度 / 刚度 / 稳定的前提下,用料经济、制作简便、便于连接,优先<strong|宽肢薄壁>截面(提高抗弯刚度和稳定)。
</enumerate>

<math|<tabular|<tformat|<table|<row|<cell|I<rsub|x>>|<cell|=<frac|1|12>\<times\>19\<times\><around|(|17.2+2\<times\>1.6|)><rsup|3>-<frac|1|12>\<times\><around|(|19-1|)>\<times\>17.2<rsup|3>>>|<row|<cell|>|<cell|=<frac|1|12>\<times\>19\<times\><around|(|17.2+3.2|)><rsup|3>-<frac|1|12>\<times\>18\<times\>17.2<rsup|3>>>|<row|<cell|>|<cell|=<frac|1|12>\<times\>19\<times\>20.4<rsup|3>-<frac|1|12>\<times\>18\<times\>17.2<rsup|3>>>|<row|<cell|>|<cell|=<frac|1|12>\<times\>19\<times\>8489.664-<frac|1|12>\<times\>18\<times\>5088.448>>|<row|<cell|>|<cell|=<frac|161303.616|12>-<frac|91592.064|12>>>|<row|<cell|>|<cell|=<frac|13441.97-7632.67|12>>>|<row|<cell|>|<cell|=5809.3*c*m<rsup|4>*<space|1em><around|(|<text|保留1位小数,约>5809*c*m<rsup|4>|)>>>>>>>

\;

<math|<tabular|<tformat|<cwith|1|4|4|4|cell-halign|c>|<cwith|1|4|4|4|cell-rborder|1ln>|<cwith|1|4|5|5|cell-halign|c>|<cwith|1|4|5|5|cell-rborder|1ln>|<cwith|1|4|6|6|cell-halign|c>|<cwith|1|4|6|6|cell-rborder|1ln>|<cwith|1|1|1|6|cell-tborder|1ln>|<cwith|1|1|1|6|cell-bborder|1ln>|<cwith|2|2|1|6|cell-bborder|1ln>|<cwith|3|3|1|6|cell-bborder|1ln>|<cwith|4|4|1|6|cell-bborder|1ln>|<cwith|1|4|1|3|cell-tborder|1ln>|<cwith|1|4|1|3|cell-bborder|1ln>|<cwith|1|4|1|3|cell-lborder|1ln>|<cwith|1|4|1|3|cell-rborder|1ln>|<cwith|1|4|4|4|cell-lborder|1ln>|<cwith|1|4|1|6|font|Noto CJK SC>|<cwith|4|4|6|6|font-base-size|8>|<table|<row|<cell|序号>|<cell|截面形式>|<cell|图例>|<cell|<text|当 >\<lambda\><rsub|y>\<geqslant\>\<lambda\><rsub|z><text|时>>|<cell|<text|当 >\<lambda\><rsub|y>\<less\>\<lambda\><rsub|z><text|时>>|<cell|<text|式中的 >\<lambda\><rsub|z>>>|<row|<cell|1>|<cell|等边双角钢>|<cell|图4-7a>|<cell|\<lambda\><rsub|y z> =\<lambda\><rsub|y>*<around*|[|1+0.16<around*|(|<frac|\<lambda\><rsub|z>|\<lambda\><rsub|y>>|)><rsup|2>|]>>|<cell|\<lambda\><rsub|y z>=\<lambda\><rsub|z>*<around*|[|1+0.16<around*|(|<frac|\<lambda\><rsub|y>|\<lambda\><rsub|z>>|)><rsup|2>|]>>|<cell|\<lambda\><rsub|z>=3.9*<frac|b|t>>>|<row|<cell|2>|<cell|长肢相拼的不等边双角钢>|<cell|图4-7b>|<cell|\<lambda\><rsub|y z>=\<lambda\><rsub|y>*<around*|[|1+0.25<around*|(|<frac|\<lambda\><rsub|z>|\<lambda\><rsub|y>>|)><rsup|2>|]>>|<cell|\<lambda\><rsub|y z>=\<lambda\><rsub|z>*<around*|[|1+0.25<around*|(|<frac|\<lambda\><rsub|y>|\<lambda\><rsub|z>>|)><rsup|2>|]>>|<cell|\<lambda\><rsub|z>=5.1*<frac|b<rsub|2>|t>>>|<row|<cell|3>|<cell|短肢相拼的不等边双角钢>|<cell|图4-7c>|<cell|\<lambda\><rsub|y z>=\<lambda\><rsub|y>*<around*|[|1+0.06<around*|(|<frac|\<lambda\><rsub|z>|\<lambda\><rsub|y>>|)><rsup|2>|]>>|<cell|\<lambda\><rsub|y z>=\<lambda\><rsub|z>*<around*|[|1+0.06<around*|(|<frac|\<lambda\><rsub|y>|\<lambda\><rsub|z>>|)><rsup|2>|]>>|<cell|\<lambda\><rsub|z>=3.7*<frac|b<rsub|1>|t>>>>>>>

\;

<math|A=2\<times\>250\<times\>12+250\<times\>8=8000*<space|0.17em>m*m<rsup|2>>,\

<math|A<rsub|n>=8000-100\<times\>8=7200*<with|math-font-family|rm|m m><rsup|2>>,\

<math|I<rsub|x><space|0.17em>=<space|0.17em><tfrac|1|12><around*|[|b*<around*|(|h+2*t|)><rsup|3>-<around*|(|b-t<rsub|w>|)>*<space|0.17em>h<rsub|w><rsup|3>|]>=<frac|1|12>*<around*|[|250\<times\>274<rsup|3>-242\<times\>250<rsup|3>|]>=11345\<times\>10<rsup|4>*m*m<rsup|4>>,

<\equation*>
I<rsub|y>=2\<times\><frac|1|12>*t*b<rsup|3>+<frac|1|12>*h<rsub|w>*t<rsub|w><rsup|3>=2\<times\><frac|1|12>\<times\>12\<times\>250<rsup|3>+<frac|1|12>\<times\>250\<times\>8<rsup|3>=3126\<times\>10<rsup|4>*m*m<rsup|4>,
</equation*>

<equation*|(教材忽略了腹板对惯性矩的影响,得到结果非常接近I<rsub|y>=2\<times\><frac|1|12>t<with|mode|text| >b<rsup|3>=3125\<times\>10<rsup|4>mm)>

<\equation*>
i<rsub|x>=<sqrt|<frac|I<rsub|x>|A>>=11.91<text|cm>,<space|1em>i<rsub|y>=<sqrt|<frac|I<rsub|y>|A>>=6.25<text|cm>.
</equation*>

工字钢,翼缘为焰切边,则查表E-1,为b类截面,

<surround|| |<math|<\aligned>
<tformat|<cwith|1|-1|1|1|cell-hmode|exact>|<cwith|1|-1|2|2|cell-hmode|exact>|<cwith|1|-1|1|1|cell-width|160515tmpt>|<cwith|1|-1|2|2|cell-width|292740tmpt>|<table|<row|<cell|\<varepsilon\><rsub|k>>|<cell|=<sqrt|<frac|235|f<rsub|y>>>=<sqrt|<frac|235|355>>=0.8136,>>|<row|<cell|\<lambda\><rsub|0>>|<cell|=<frac|\<lambda\><rsub|m a x>|\<varepsilon\><rsub|k>>=<frac|50.4|0.8136>\<approx\>62,查表E-4,\<varphi\>=0.796,>>|<row|<cell|<frac|N|\<varphi\>*A>>|<cell|=<frac|2000\<times\>10<rsup|3>|0.796\<times\>8000>\<approx\>314*N/m*m<rsup|2>,>>|<row|<cell|<frac|314-305|305>\<times\>100%>|<cell|=2.95%\<less\>5%,<space|1em>满*足.(实际规范不允许有任何偏差)>>>>
</aligned>>>
</body>

<\initial>
<\collection>
<associate|page-screen-margin|false>
<associate|stem-doc-id|63992928-5153-4E50-878E-3D6F738EE6C0>
</collection>
</initial>
51 changes: 51 additions & 0 deletions devel/0310.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
# [0310] 修复演讲模式下移动光标导致Windows任务栏闪烁的问题

## 1 相关文档
- [dddd.md](dddd.md) - 任务文档模板

## 2 任务相关的代码文件
- `src/Edit/Interface/edit_interface.cpp`
- `src/Plugins/Qt/qt_tm_widget.cpp`

## 3 如何测试

### 3.1 确定性测试(单元测试)
```bash
xmake test test_all_integrated
```

### 3.2 非确定性测试(文档验证)
```bash
xmake run mogan
```
1. 启动 Mogan,打开 TeXmacs/tests/tmu/0310.tmu。
2. 通过菜单栏“视图 -> 演讲模式”进入全屏。
3. 在屏幕内随意移动鼠标,或者点击不同的文档元素(文本、公式等)。
4. 观察 Windows 底部的任务栏是否会闪烁。
5. 按下 `Esc` 退出全屏,在文中多种环境中进行切换,检查焦点工具栏是否正常恢复并与当前光标位置的环境相符。

## 4 如何提交

提交前执行以下最少步骤:

```bash
bin\format.bat
xmake build mogan-gui
```

## 5 What
修复了在全屏演讲模式下,移动光标会触发 Windows 任务栏闪烁的问题。

1. 在 C++ 核心逻辑中,阻止了全屏模式下向 Qt 层发送不必要的菜单和工具栏更新(`update_menus`)。
2. 在退出全屏模式时,强制触发一次菜单更新,以同步当前光标环境状态。
3. 修正了 Qt 层级针对 `set_full_screen` 的重复设置问题,并在 `install_main_menu` 中移除了会破坏隐藏状态的 `setVisible(true)` 强制调用。

## 6 Why
Mogan 在光标移动跨越不同内容环境(如文本、公式等)时,会自动触发界面状态的更新,向 GUI 层发送重新构建工具栏与菜单的指令。在普通窗口模式下,这是正常的功能展示;但在全屏演讲模式下,尽管工具栏在视觉上是被隐藏的,Qt 侧依然会接收指令执行销毁和重建旧控件的操作,进而触发 `QMainWindow` 的布局重算(Layout Recalculation)。

在 Windows 系统中,DWM (桌面窗口管理器) 判定隐藏任务栏的标准是当前激活窗口是否填满屏幕且无边框。Qt 在重算布局的微小瞬间打破了这一平衡状态,导致 Windows 误认为全屏失效,将系统任务栏绘制了出来,从而在肉眼上表现为闪烁。

## 7 How
1. **源头拦截重绘指令**:在 `src/Edit/Interface/edit_interface.cpp` 的 `edit_interface_rep::update_menus()` 函数开头,加入 `get_server()->in_full_screen_mode()` 判断。若在全屏模式则直接返回,切断所有 `SERVER(...)` 通信。这从逻辑源头消除了不可见控件的刷新开销。
2. **恢复同步状态**:在同一个文件内的 `edit_interface_rep::full_screen_mode(bool flag)` 退出全屏分支中,主动调用 `notify_change(THE_MENUS)`。保证退出全屏的那一刻,界面能拉取最新的菜单和工具栏布局,避免显示过期工具栏。
3. **修复 Qt 端实现**:在 `src/Plugins/Qt/qt_tm_widget.cpp` 中,为 `set_full_screen` 加入重复检查;并修改 `install_main_menu`,避免在更新菜单时强制让隐藏的菜单栏可见。
9 changes: 9 additions & 0 deletions src/Edit/Interface/edit_interface.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -816,6 +816,12 @@ edit_interface_rep::update_menus () {
bool is_startup= is_startup_tab_buffer (buf->buf->name);
bool is_chat = is_chat_tab_buffer (buf->buf->name);
bench_start ("update_menus");

if (get_server ()->in_full_screen_mode ()) {
bench_end ("update_menus");
return;
}

if (!is_startup && !is_chat)
SERVER (menu_main ("(horizontal (link texmacs-menu))"));
if (!is_startup && !is_chat)
Expand Down Expand Up @@ -1284,6 +1290,9 @@ void
edit_interface_rep::full_screen_mode (bool flag) {
full_screen= flag;
send_invalidate_all (this);
if (!flag) {
notify_change (THE_MENUS);
}
}

void
Expand Down
Loading