Skip to content

Commit

Permalink
New: ウィンドウ一覧ダイアログ
Browse files Browse the repository at this point in the history
[patchunicode:#1072] Contributed by Moca


git-svn-id: https://svn.code.sf.net/p/sakura-editor/code/sakura/trunk2@4176 f7ce1907-e4c7-47ca-9f76-12c87ed2c91c
  • Loading branch information
novice123 committed Mar 4, 2017
1 parent 4958830 commit f216507
Show file tree
Hide file tree
Showing 25 changed files with 464 additions and 5 deletions.
4 changes: 3 additions & 1 deletion resource/MainMenu.ini
Original file line number Diff line number Diff line change
Expand Up @@ -319,8 +319,10 @@
1,1,31360,R,
1,2,1,,
1,1,31370,U,
1,1,31337,D,
1,2,1,,
1,3,29001,,
1,0,34060,A,
2,3,29001,,
0,0,34059,H,
1,1,31440,O,
1,1,31441,S,
Expand Down
Binary file modified resource/mytool.bmp
Binary file not shown.
8 changes: 8 additions & 0 deletions sakura/sakura.vcproj
Original file line number Diff line number Diff line change
Expand Up @@ -2749,6 +2749,14 @@
RelativePath="..\sakura_core\dlg\CDlgTagsMake.h"
>
</File>
<File
RelativePath="..\sakura_core\dlg\CDlgWindowList.cpp"
>
</File>
<File
RelativePath="..\sakura_core\dlg\CDlgWindowList.h"
>
</File>
<File
RelativePath="..\sakura_core\dlg\CDlgWinSize.cpp"
>
Expand Down
6 changes: 6 additions & 0 deletions sakura/sakura_vc2003.vcproj
Original file line number Diff line number Diff line change
Expand Up @@ -2057,6 +2057,12 @@
<File
RelativePath="..\sakura_core\dlg\CDlgTagsMake.h">
</File>
<File
RelativePath="..\sakura_core\dlg\CDlgWindowList.cpp">
</File>
<File
RelativePath="..\sakura_core\dlg\CDlgWindowList.h">
</File>
<File
RelativePath="..\sakura_core\dlg\CDlgWinSize.cpp">
</File>
Expand Down
1 change: 1 addition & 0 deletions sakura_core/Funccode_define.h
Original file line number Diff line number Diff line change
Expand Up @@ -328,6 +328,7 @@
#define F_NEXTWINDOW 31340
#define F_PREVWINDOW 31341
#define F_WINLIST 31336
#define F_DLGWINLIST 31337
#define F_MAXIMIZE_V 31350
#define F_MINIMIZE_ALL 31351
#define F_MAXIMIZE_H 31352
Expand Down
1 change: 1 addition & 0 deletions sakura_core/Funccode_enum.h
Original file line number Diff line number Diff line change
Expand Up @@ -329,6 +329,7 @@ enum EFunctionCode{
F_NEXTWINDOW = 31340,
F_PREVWINDOW = 31341,
F_WINLIST = 31336,
F_DLGWINLIST = 31337,
F_MAXIMIZE_V = 31350,
F_MINIMIZE_ALL = 31351,
F_MAXIMIZE_H = 31352,
Expand Down
1 change: 1 addition & 0 deletions sakura_core/Funccode_x.hsrc
Original file line number Diff line number Diff line change
Expand Up @@ -415,6 +415,7 @@ F_TOPMOST = 31334, //
F_NEXTWINDOW = 31340, //���̃E�B���h�E �H
F_PREVWINDOW = 31341, //�O�̃E�B���h�E �H
F_WINLIST = 31336, //�E�B���h�E�ꗗ �Ȃ�
F_DLGWINLIST = 31337, //�E�B���h�E�ꗗ�_�C�A���O �Ȃ�
F_MAXIMIZE_V = 31350, //�c�����ɍő剻 �Ȃ�
F_MINIMIZE_ALL = 31351, //���ׂčŏ��� �Ȃ�
F_MAXIMIZE_H = 31352, //�������ɍő剻 �Ȃ�
Expand Down
1 change: 1 addition & 0 deletions sakura_core/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -172,6 +172,7 @@ dlg/CDlgReplace.o \
dlg/CDlgSetCharSet.o \
dlg/CDlgTagJumpList.o \
dlg/CDlgTagsMake.o \
dlg/CDlgWindowList.o \
dlg/CDlgWinSize.o \
doc/CBlockComment.o \
doc/CDocEditor.o \
Expand Down
2 changes: 1 addition & 1 deletion sakura_core/String_define.h
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@
#define F_WINDOW_TOPMENU 34058
#define F_HELP_TOPMENU 34059

// #define F_RESERVED 34060
#define F_WINDOW_LIST_SUBMENU 34060
// #define F_RESERVED 34061
// #define F_RESERVED 34062
// #define F_RESERVED 34063
Expand Down
13 changes: 13 additions & 0 deletions sakura_core/_main/CControlTray.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
#include "debug/CRunningTimer.h"
#include "dlg/CDlgOpenFile.h"
#include "dlg/CDlgAbout.h" //Nov. 21, 2000 JEPROtest
#include "dlg/CDlgWindowList.h"
#include "plugin/CPluginManager.h"
#include "plugin/CJackManager.h"
#include "io/CTextStream.h"
Expand Down Expand Up @@ -542,6 +543,18 @@ LRESULT CControlTray::DispatchEvent(
}
return 0;

case MYWM_DLGWINLIST:
{
static CDlgWindowList dlg;
if (dlg.GetHwnd() == NULL) {
dlg.DoModal(m_hInstance, hwnd, 0);
}else{
::SetForegroundWindow(dlg.GetHwnd());
::BringWindowToTop(dlg.GetHwnd());
}
}
return 0;

case WM_CREATE:
m_hWnd = hwnd;
hwndHtmlHelp = NULL;
Expand Down
1 change: 1 addition & 0 deletions sakura_core/cmd/CViewCommander.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -592,6 +592,7 @@ BOOL CViewCommander::HandleCommand(
case F_TRACEOUT: Command_TRACEOUT((const wchar_t*)lparam1, (int)lparam2, (int)lparam3);break; //マクロ用アウトプットウィンドウに表示 maru 2006.04.26
case F_TOPMOST: Command_WINTOPMOST( lparam1 );break; //常に手前に表示 Moca
case F_WINLIST: Command_WINLIST( nCommandFrom );break; /* ウィンドウ一覧ポップアップ表示処理 */ // 2006.03.23 fon // 2006.05.19 genta 引数追加
case F_DLGWINLIST: Command_DLGWINLIST();break; // ウィンドウ一覧表示
case F_GROUPCLOSE: Command_GROUPCLOSE();break; /* グループを閉じる */ // 2007.06.20 ryoji 追加
case F_NEXTGROUP: Command_NEXTGROUP();break; /* 次のグループ */ // 2007.06.20 ryoji 追加
case F_PREVGROUP: Command_PREVGROUP();break; /* 前のグループ */ // 2007.06.20 ryoji 追加
Expand Down
1 change: 1 addition & 0 deletions sakura_core/cmd/CViewCommander.h
Original file line number Diff line number Diff line change
Expand Up @@ -375,6 +375,7 @@ class CViewCommander{
void Command_TRACEOUT( const wchar_t* outputstr , int, int ); //マクロ用アウトプットウィンドウに表示 maru 2006.04.26
void Command_WINTOPMOST( LPARAM ); // 常に手前に表示 2004.09.21 Moca
void Command_WINLIST( int nCommandFrom ); /* ウィンドウ一覧ポップアップ表示処理 */ // 2006.03.23 fon // 2006.05.19 genta 引数追加
void Command_DLGWINLIST( void ); // ウィンドウ一覧ダイアログ // 2015.03.07 Moca
void Command_GROUPCLOSE( void ); /* グループを閉じる */ // 2007.06.20 ryoji
void Command_NEXTGROUP( void ); /* 次のグループ */ // 2007.06.20 ryoji
void Command_PREVGROUP( void ); /* 前のグループ */ // 2007.06.20 ryoji
Expand Down
12 changes: 12 additions & 0 deletions sakura_core/cmd/CViewCommander_Window.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,18 @@ void CViewCommander::Command_WINLIST( int nCommandFrom )
}


/*! ウィンドウ一覧表示
*/
void CViewCommander::Command_DLGWINLIST( void )
{
DWORD dwPid;
HWND hwnd = GetDllShareData().m_sHandles.m_hwndTray;
::GetWindowThreadProcessId(hwnd, &dwPid);
::AllowSetForegroundWindow(dwPid);
::PostMessage(hwnd, MYWM_DLGWINLIST, 0, 0);
}


/*! @brief 重ねて表示

@date 2002.01.08 YAZAKI 「左右に並べて表示」すると、
Expand Down
3 changes: 3 additions & 0 deletions sakura_core/config/system_constants.h
Original file line number Diff line number Diff line change
Expand Up @@ -748,6 +748,9 @@ enum e_PM_SETCARETPOS_SELECTSTATE {
//! タイプ別を削除
#define MYWM_DEL_TYPESETTING (WM_APP+224)

//! ウィンドウ一覧表示
#define MYWM_DLGWINLIST (WM_APP+225)

/* 再変換対応 */ // 20020331 aroka
#ifndef WM_IME_REQUEST
#define MYWM_IME_REQUEST 0x288 // ==WM_IME_REQUEST
Expand Down
Loading

0 comments on commit f216507

Please sign in to comment.