File tree Expand file tree Collapse file tree 3 files changed +21
-0
lines changed
Expand file tree Collapse file tree 3 files changed +21
-0
lines changed Original file line number Diff line number Diff line change @@ -69,6 +69,7 @@ namespace apn::filter_drag
6969 {
7070 MY_TRACE_FUNC (" " );
7171
72+ read_int (root, " gripper_height" , hive.gripper_height );
7273 read_bool (root, " use_shift" , keyboard_hook.use_shift );
7374 read_bool (root, " use_ctrl" , keyboard_hook.use_ctrl );
7475 read_bool (root, " use_alt" , keyboard_hook.use_alt );
@@ -117,6 +118,7 @@ namespace apn::filter_drag
117118 {
118119 MY_TRACE_FUNC (" " );
119120
121+ write_int (root, " gripper_height" , hive.gripper_height );
120122 write_bool (root, " use_shift" , keyboard_hook.use_shift );
121123 write_bool (root, " use_ctrl" , keyboard_hook.use_ctrl );
122124 write_bool (root, " use_alt" , keyboard_hook.use_alt );
Original file line number Diff line number Diff line change @@ -20,6 +20,11 @@ namespace apn::filter_drag
2020 //
2121 std::wstring config_file_name;
2222
23+ //
24+ // グリッパーのサイズです。
25+ //
26+ int32_t gripper_height = 16 ;
27+
2328 //
2429 // メッセージボックスを表示します。
2530 //
Original file line number Diff line number Diff line change @@ -102,16 +102,30 @@ namespace apn::filter_drag
102102 //
103103 FilterHolder get_src_filter (const POINT& pos, const ObjectHolder& object) const
104104 {
105+ // ペインを走査します。
105106 for (size_t i = 0 ; i < panes.size (); i++)
106107 {
108+ // ペイン外の場合は何もしません。
107109 if (!::PtInRect (&panes[i], pos)) continue ;
108110
111+ // グリッパーのサイズが有効の場合は
112+ if (hive.gripper_height > 0 )
113+ {
114+ // グリッパー外の場合は何もしません。
115+ if (pos.y - panes[i].top > hive.gripper_height ) continue ;
116+ }
117+
118+ // フィルタ構造体を作成します。
109119 FilterHolder filter (object, (int32_t )i);
120+
121+ // フィルタがドラッグ可能な場合はフィルタ構造体を返します。
110122 if (filter.is_moveable ()) return filter;
111123
112124 break ;
113125 }
114126
127+ // ドラッグできるフィルタが見つからなかった場合は
128+ // 無効なフィルタ構造体を返します。
115129 return FilterHolder (object, -1 );
116130 }
117131
You can’t perform that action at this time.
0 commit comments