Solution46
LibWindow::CWndList クラス

ウィンドウリストクラス [詳解]

#include "CWndList.h"

LibWindow::CWndList の継承関係図
Inheritance graph
LibWindow::CWndList 連携図
Collaboration graph

公開メンバ関数

 CWndList () noexcept
 コンストラクタ [詳解]
 
 CWndList (CWndList &&rcInstance) noexcept
 ムーブコンストラクタ [詳解]
 
virtual ~CWndList () noexcept
 デストラクタ [詳解]
 
virtual void Clear () noexcept override
 クリア関数 [詳解]
 
virtual bool CreateListWindow (HWND hParent=nullptr, HMENU hMenu=nullptr) noexcept
 エレメントウィンドウリスト作成関数 [詳解]
 
virtual int GetCurrentIndex () const noexcept
 カレントインデックス取得関数 [詳解]
 
virtual bool SetCurrentIndex (int nIndex) noexcept
 カレントインデックス設定関数 [詳解]
 
virtual int GetShowCurrentIndex () const noexcept
 表示状態カレントインデックス取得関数 [詳解]
 
virtual CWndElementGetShowCurrentElement () const noexcept
 表示状態カレントエレメントウィンドウ取得関数 [詳解]
 
virtual CWndElementGetCurrentElement () const noexcept
 カレントエレメントウィンドウ取得関数 [詳解]
 
virtual bool SetCurrentElement (CWndElement *pcElement) noexcept
 カレントエレメントウィンドウ設定関数 [詳解]
 
virtual CWndElementGetElementWindow (HWND hWnd) const noexcept
 エレメントウィンドウ取得関数 [詳解]
 
virtual bool RemoveElementWindow (CWndElement *pcElement) noexcept
 エレメントウィンドウ削除関数 [詳解]
 
virtual bool InitElementListConfig (CJsonConfig &rcConfig, CWndElement *(*pfnCreateElement)(), wchar_t const *pszElementName) noexcept
 エレメントウィンドウリスト構成情報初期化関数 [詳解]
 
virtual bool ResumeElementListConfig (CJsonConfig &rcConfig, wchar_t const *pszElementName) noexcept
 エレメントウィンドウリスト構成情報復元関数 [詳解]
 
virtual bool SaveElementListConfig (CJsonConfig &rcConfig, wchar_t const *pszElementName) noexcept
 エレメントウィンドウリスト構成情報保存関数 [詳解]
 
virtual bool GetChildElementListInfo (CWndPane *pcParent, SChildPaneInfo &rsChildInfo) noexcept
 子エレメントウィンドウリスト情報取得関数 [詳解]
 
virtual int GetElementListOrderIndex (CWndPane *pcPane, int *pnOrder) noexcept
 エレメントウィンドウリストオーダー番号取得関数 [詳解]
 
virtual CWndPaneGetElementListOrderPane (int *pnOrder) noexcept
 エレメントウィンドウリストオーダー番号ペインウィンドウ取得関数 [詳解]
 
virtual bool ShowElementListAll (CWndPane *pcParent, bool bShow) noexcept
 全エレメントウィンドウリスト表示関数 [詳解]
 
virtual bool DeleteElementListAll (CWndPane *pcParent) noexcept
 全エレメントウィンドウリスト削除関数 [詳解]
 
virtual bool AppendElementWindow (HWND hParent, CWndElement *pcElement) noexcept
 エレメントウィンドウ追加関数 [詳解]
 
virtual CWndElementAppendNewElementWindow (HWND hParent, CWndElement *(*pfnCreateElement)()) noexcept
 新規エレメントウィンドウ追加関数 [詳解]
 
virtual bool AppendElementListDebugSubMenu (HMENU hMenu, CWndPane *pcParent, wchar_t const *pszElementName, WORD wIdNew) noexcept
 エレメントウィンドウリストデバッグサブメニュー追加関数 [詳解]
 
- 基底クラス LibCommon::CArray< Type > に属する継承公開メンバ関数
 CArray () noexcept
 コンストラクタ [詳解]
 
 CArray (Type const &rElement) noexcept
 コンストラクタ [詳解]
 
 CArray (Type const *pBuffer, int nCount) noexcept
 コンストラクタ [詳解]
 
 CArray (std::initializer_list< Type const > const &rcInitializer) noexcept
 コンストラクタ [詳解]
 
 CArray (CArray const &rcInstance) noexcept
 コピーコンストラクタ [詳解]
 
 CArray (CArray &&rcInstance) noexcept
 ムーブコンストラクタ [詳解]
 
virtual ~CArray () noexcept
 デストラクタ [詳解]
 
virtual Type * GetBuffer () noexcept
 配列要素バッファ取得関数 [詳解]
 
virtual int GetSize () const noexcept
 バッファサイズ取得関数 [詳解]
 
virtual int GetCount () const noexcept
 配列要素数取得関数 [詳解]
 
virtual int GetSegmentSize () const noexcept
 セグメントサイズ取得関数 [詳解]
 
virtual CArrayoperator= (CArray const &rcInstance) noexcept
 コピー代入演算子オーバーロード関数 [詳解]
 
virtual CArrayoperator= (CArray &&rcInstance) noexcept
 ムーブ代入演算子オーバーロード関数 [詳解]
 
virtual CArrayoperator= (Type const &rElement) noexcept
 代入演算子オーバーロード関数 [詳解]
 
virtual CArrayoperator= (std::initializer_list< Type const > const &rcInitializer) noexcept
 代入演算子オーバーロード関数 [詳解]
 
virtual CArrayoperator+= (CArray const &rcInstance) noexcept
 加算代入演算子オーバーロード関数 [詳解]
 
virtual CArrayoperator+= (Type const &rElement) noexcept
 加算代入演算子オーバーロード関数 [詳解]
 
virtual CArrayoperator+= (std::initializer_list< Type const > const &rcInitializer) noexcept
 加算代入演算子オーバーロード関数 [詳解]
 
virtual Type & operator[] (int nIndex) noexcept
 配列添字演算子オーバーロード関数 [詳解]
 
virtual operator Type const * () noexcept
 配列要素ポインタキャスト演算子オーバーロード関数 [詳解]
 
virtual CArrayoperator() () noexcept
 関数演算子オーバーロード関数 [詳解]
 
virtual bool CreateBuffer (int nSize) noexcept
 バッファ作成関数 [詳解]
 
virtual bool UpdateBuffer (int nCount) noexcept
 バッファサイズ更新関数 [詳解]
 
virtual bool CompactBuffer () noexcept
 バッファサイズコンパクト化関数 [詳解]
 
virtual bool Copy (CArray const &rcInstance) noexcept
 コピー関数 [詳解]
 
virtual bool Copy (Type const &rElement) noexcept
 コピー関数 [詳解]
 
virtual bool Copy (Type const *pBuffer, int nCount) noexcept
 コピー関数 [詳解]
 
virtual bool Copy (std::initializer_list< Type const > const &rcInitializer) noexcept
 コピー関数 [詳解]
 
virtual bool Move (CArray &&rcInstance) noexcept
 ムーブ関数 [詳解]
 
virtual bool Append (CArray const &rcInstance) noexcept
 追加関数 [詳解]
 
virtual bool Append (Type const &rElement) noexcept
 追加関数 [詳解]
 
virtual bool Append (Type const *pBuffer, int nCount) noexcept
 追加関数 [詳解]
 
virtual bool Append (std::initializer_list< Type const > const &rcInitializer) noexcept
 追加関数 [詳解]
 
virtual bool Insert (int nIndex, CArray const &rcInstance) noexcept
 挿入関数 [詳解]
 
virtual bool Insert (int nIndex, Type const &rElement) noexcept
 挿入関数 [詳解]
 
virtual bool Insert (int nIndex, Type const *pBuffer, int nCount) noexcept
 挿入関数 [詳解]
 
virtual bool Insert (int nIndex, std::initializer_list< Type const > const &rcInitializer) noexcept
 挿入関数 [詳解]
 
virtual bool Remove () noexcept
 削除関数 [詳解]
 
virtual bool Remove (int nIndex) noexcept
 削除関数 [詳解]
 
virtual bool Remove (int nIndex, int nCount) noexcept
 削除関数 [詳解]
 
virtual bool Get (int nIndex, Type &rElement) const noexcept
 取得関数 [詳解]
 
virtual bool Set (int nIndex, Type const &rElement) noexcept
 設定関数 [詳解]
 
virtual int Find (Type const &rElement) const noexcept
 検索関数 [詳解]
 
virtual bool Compare (Type const &rElement1, Type const &rElement2) const noexcept
 比較関数 [詳解]
 
virtual bool Push (Type const &rElement) noexcept
 プッシュ関数 [詳解]
 
virtual bool Push (Type const *pBuffer, int nCount) noexcept
 プッシュ関数 [詳解]
 
virtual bool Push (std::initializer_list< Type const > const &rcInitializer) noexcept
 プッシュ関数 [詳解]
 
virtual bool Pop (Type &rElement) noexcept
 ポップ関数 [詳解]
 
virtual bool PopFront (Type &rElement) noexcept
 ポップフロント関数 [詳解]
 

限定公開変数類

int m_nCurrent
 カレントインデックス [詳解]
 
- 基底クラス LibCommon::CArray< Type > に属する継承限定公開変数類
Type * m_pBuffer
 バッファポインタ [詳解]
 
int m_nSize
 バッファサイズ [詳解]
 
int m_nCount
 要素数 [詳解]
 

静的限定公開変数類

static wchar_t const *const SECTION_ELEMENT_INFO = L"ウィンドウ情報"
 エレメントウィンドウ情報セクション文字列 [詳解]
 
static wchar_t const *const KEY_ELEMENT_COUNT = L"ウィンドウ数"
 エレメントウィンドウ数キー文字列 [詳解]
 
static wchar_t const *const KEY_CURRENT_INDEX = L"カレントインデックス"
 カレントインデックスキー文字列 [詳解]
 

非公開メンバ関数

 CWndList (CWndList const &)=delete
 
CWndListoperator= (CWndList const &)=delete
 

その他の継承メンバ

- 基底クラス LibCommon::CArray< Type > に属する継承静的公開変数類
static int const SEGMENT_SIZE = 256
 セグメントサイズ初期値 [詳解]
 

詳解

ウィンドウリストクラス

ウィンドウリストクラスです。

注意
なし

CWndList.h35 行目に定義があります。

構築子と解体子

LibWindow::CWndList::CWndList ( )
explicitnoexcept

コンストラクタ

コンストラクタです。

引数
なし
戻り値
なし
注意
なし

CWndList.cpp36 行目に定義があります。

38  : CArray()
39  // メンバ変数初期化
40  , m_nCurrent( -1 )
41  {}
CArray() noexcept
コンストラクタ
Definition: CArray.hpp:31
int m_nCurrent
カレントインデックス
Definition: CWndList.h:352
LibWindow::CWndList::CWndList ( CWndList &&  rcInstance)
explicitnoexcept

ムーブコンストラクタ

ムーブコンストラクタです。

引数
[in]rcInstanceインスタンス左辺値参照
戻り値
なし
注意
なし

CWndList.cpp45 行目に定義があります。

47  : CArray( std::move( rcInstance ) )
48  // メンバ変数初期化
49  , m_nCurrent( rcInstance.m_nCurrent )
50  {}
CArray() noexcept
コンストラクタ
Definition: CArray.hpp:31
int m_nCurrent
カレントインデックス
Definition: CWndList.h:352
virtual LibWindow::CWndList::~CWndList ( )
inlinevirtualnoexcept

デストラクタ

デストラクタです。

引数
なし
戻り値
なし
注意
なし

CWndList.h70 行目に定義があります。

70 {}
LibWindow::CWndList::CWndList ( CWndList const &  )
privatedelete

関数詳解

void LibWindow::CWndList::Clear ( )
overridevirtualnoexcept

クリア関数

クリア関数です。

引数
なし
戻り値
なし
注意
オーバライド関数です。

LibCommon::CArray< Type >を再実装しています。

CWndList.cpp56 行目に定義があります。

参照先 LibCommon::CArray< Type >::Clear(), LibCommon::CArray< Type >::m_nCount, LibCommon::CArray< Type >::m_pBuffer.

56  {
57  // 巡回する
58  for ( int nIndex = ( m_nCount - 1 ); 0 <= nIndex; --nIndex ) {
59  // エレメントウィンドウポインタを取得する
60  CWndElement* pcElement = m_pBuffer[ nIndex ];
61  if ( nullptr != pcElement ) {
62  // エレメントウィンドウインスタンスを削除する
63  delete pcElement;
64  }
65  }
66 
67  // 基底クラスの関数を実行する
68  CArray::Clear();
69  }
CWndPane CWndElement
エレメントウィンドウクラス型
Definition: CWndList.h:26
virtual void Clear() noexcept
クリア関数
Definition: CArray.hpp:209
int m_nCount
要素数
Definition: CArray.h:669
Type * m_pBuffer
バッファポインタ
Definition: CArray.h:667

呼び出し関係図:

bool LibWindow::CWndList::CreateListWindow ( HWND  hParent = nullptr,
HMENU  hMenu = nullptr 
)
virtualnoexcept

エレメントウィンドウリスト作成関数

エレメントウィンドウリスト作成関数です。

引数
[in]hParent親ウィンドウハンドル
[in]hMenuメニューハンドル
戻り値
実行結果
  • true 成功
  • false 失敗
注意
なし

CWndList.cpp73 行目に定義があります。

参照先 LibWindow::CWndPane::Create(), LibCommon::CArray< Type >::m_nCount, LibCommon::CArray< Type >::m_pBuffer.

参照元 LibWindow::CWndMain::Create(), LibWindow::CWndContainer::Create().

73  {
74  // 処理ブロック
75  bool result = false;
76  do {
77  // 巡回する
78  for ( int nIndex = 0;; ++nIndex ) {
79  // インデックスを調べる
80  if ( m_nCount <= nIndex ) {
81  // 成功!
82  result = true;
83  break;
84  }
85 
86  // エレメントウィンドウポインタを取得する
87  CWndElement* pcElement = m_pBuffer[ nIndex ];
88  if ( nullptr == pcElement ) {
89  // 失敗!
90  break;
91  }
92  // エレメントウィンドウを作成する
93  else if ( !pcElement->Create( hParent, hMenu ) ) {
94  // 失敗!
95  break;
96  }
97  }
98  } while ( false );
99 
100  // 実行結果を返す
101  return result;
102  }
CWndPane CWndElement
エレメントウィンドウクラス型
Definition: CWndList.h:26
int m_nCount
要素数
Definition: CArray.h:669
Type * m_pBuffer
バッファポインタ
Definition: CArray.h:667

呼び出し関係図:

被呼び出し関係図:

int LibWindow::CWndList::GetCurrentIndex ( ) const
virtualnoexcept

カレントインデックス取得関数

カレントインデックス取得関数です。

引数
なし
戻り値
インデックス
  • 0以上 成功
  • 0未満 失敗
注意
なし

CWndList.cpp106 行目に定義があります。

参照先 LibCommon::CArray< Type >::m_nCount, m_nCurrent, LibCommon::CArray< Type >::m_pBuffer.

参照元 GetCurrentElement().

106  {
107  // 処理ブロック
108  int result = -1;
109  do {
110  // 巡回する
111  for ( int nIndex = 0; m_nCount > nIndex; ++nIndex ) {
112  // エレメントウィンドウを取得する
113  CWndElement* pcElement = m_pBuffer[ nIndex ];
114  if ( nullptr != pcElement ) {
115  // インデックスを調べる
116  if ( m_nCurrent == nIndex ) {
117  // 成功!
118  result = nIndex;
119  break;
120  }
121  // 実行結果を調べる
122  else if ( 0 > result ) {
123  // 実行結果を取得する
124  result = nIndex;
125  }
126  }
127  }
128  } while ( false );
129 
130  // 実行結果を返す
131  return result;
132  }
CWndPane CWndElement
エレメントウィンドウクラス型
Definition: CWndList.h:26
int m_nCount
要素数
Definition: CArray.h:669
int m_nCurrent
カレントインデックス
Definition: CWndList.h:352
Type * m_pBuffer
バッファポインタ
Definition: CArray.h:667

被呼び出し関係図:

bool LibWindow::CWndList::SetCurrentIndex ( int  nIndex)
virtualnoexcept

カレントインデックス設定関数

カレントインデックス取得関数です。

引数
[in]nIndexインデックス
戻り値
実行結果
  • true 成功
  • false 失敗
注意
なし

CWndList.cpp136 行目に定義があります。

参照先 LibCommon::CArray< Type >::m_nCount, m_nCurrent.

参照元 AppendElementWindow().

136  {
137  // 処理ブロック
138  bool result = false;
139  do {
140  // インデックスを調べる
141  if ( ( 0 > nIndex ) || ( m_nCount <= nIndex ) ) {
142  // 失敗!
143  break;
144  }
145 
146  // カレントインデックスを設定する
147  m_nCurrent = nIndex;
148 
149  // 成功!
150  result = true;
151  } while ( false );
152 
153  // 実行結果を返す
154  return result;
155  }
int m_nCount
要素数
Definition: CArray.h:669
int m_nCurrent
カレントインデックス
Definition: CWndList.h:352

被呼び出し関係図:

int LibWindow::CWndList::GetShowCurrentIndex ( ) const
virtualnoexcept

表示状態カレントインデックス取得関数

表示状態カレントインデックス取得関数です。

引数
なし
戻り値
インデックス
  • 0以上 成功
  • 0未満 失敗
注意
なし

CWndList.cpp159 行目に定義があります。

参照先 LibWindow::CWndPane::IsShow(), LibCommon::CArray< Type >::m_nCount, m_nCurrent, LibCommon::CArray< Type >::m_pBuffer.

参照元 LibWindow::CWndDocumentTab::DrawTitleBar(), LibWindow::CWndDocumentTab::GetMinHeight(), LibWindow::CWndDocumentTab::GetMinWidth(), LibWindow::CWndDocumentTab::GetPaintRect(), GetShowCurrentElement(), LibWindow::CWndDocumentTab::UpdateTabControl(), LibWindow::CWndDocumentTab::WmSize().

159  {
160  // 処理ブロック
161  int result = -1;
162  do {
163  // 巡回する
164  for ( int nIndex = 0; m_nCount > nIndex; ++nIndex ) {
165  // エレメントウィンドウを取得する
166  CWndElement* pcElement = m_pBuffer[ nIndex ];
167  if ( nullptr != pcElement ) {
168  // 表示フラグを調べる
169  if ( pcElement->IsShow() ) {
170  // インデックスを調べる
171  if ( m_nCurrent == nIndex ) {
172  // 成功!
173  result = nIndex;
174  break;
175  }
176  // 実行結果を調べる
177  else if ( 0 > result ) {
178  // 実行結果を取得する
179  result = nIndex;
180  }
181  }
182  }
183  }
184  } while ( false );
185 
186  // 実行結果を返す
187  return result;
188  }
CWndPane CWndElement
エレメントウィンドウクラス型
Definition: CWndList.h:26
int m_nCount
要素数
Definition: CArray.h:669
int m_nCurrent
カレントインデックス
Definition: CWndList.h:352
Type * m_pBuffer
バッファポインタ
Definition: CArray.h:667

呼び出し関係図:

被呼び出し関係図:

CWndElement * LibWindow::CWndList::GetShowCurrentElement ( ) const
virtualnoexcept

表示状態カレントエレメントウィンドウ取得関数

表示状態カレントエレメントウィンドウ取得関数です。

引数
なし
戻り値
エレメントウィンドウポインタ
注意
なし

CWndList.cpp192 行目に定義があります。

参照先 GetShowCurrentIndex(), LibCommon::CArray< Type >::m_pBuffer.

参照元 LibWindow::CWndContainer::WmSetFocus().

192  {
193  // 処理ブロック
194  CWndElement* result = nullptr;
195  do {
196  // 表示状態カレントインデックスを取得する
197  int nIndex = GetShowCurrentIndex();
198  if ( 0 > nIndex ) {
199  // 失敗!
200  break;
201  }
202 
203  // 成功!
204  result = m_pBuffer[ nIndex ];
205  } while ( false );
206 
207  // 実行結果を返す
208  return result;
209  }
virtual int GetShowCurrentIndex() const noexcept
表示状態カレントインデックス取得関数
Definition: CWndList.cpp:159
CWndPane CWndElement
エレメントウィンドウクラス型
Definition: CWndList.h:26
Type * m_pBuffer
バッファポインタ
Definition: CArray.h:667

呼び出し関係図:

被呼び出し関係図:

CWndElement * LibWindow::CWndList::GetCurrentElement ( ) const
virtualnoexcept

カレントエレメントウィンドウ取得関数

カレントエレメントウィンドウ取得関数です。

引数
なし
戻り値
エレメントウィンドウポインタ
注意
なし

CWndList.cpp213 行目に定義があります。

参照先 GetCurrentIndex(), LibCommon::CArray< Type >::m_pBuffer.

参照元 LibWindow::CWndMain::WmSetFocus().

213  {
214  // 処理ブロック
215  CWndElement* result = nullptr;
216  do {
217  // カレントインデックスを取得する
218  int nIndex = GetCurrentIndex();
219  if ( 0 > nIndex ) {
220  // 失敗!
221  break;
222  }
223 
224  // 成功!
225  result = m_pBuffer[ nIndex ];
226  } while ( false );
227 
228  // 実行結果を返す
229  return result;
230  }
CWndPane CWndElement
エレメントウィンドウクラス型
Definition: CWndList.h:26
virtual int GetCurrentIndex() const noexcept
カレントインデックス取得関数
Definition: CWndList.cpp:106
Type * m_pBuffer
バッファポインタ
Definition: CArray.h:667

呼び出し関係図:

被呼び出し関係図:

virtual bool LibWindow::CWndList::SetCurrentElement ( CWndElement pcElement)
inlinevirtualnoexcept

カレントエレメントウィンドウ設定関数

カレントエレメントウィンドウ設定関数です。

引数
[in]pcElementエレメントウィンドウポインタ
戻り値
実行結果
  • true 成功
  • false 失敗
注意
なし

CWndList.h172 行目に定義があります。

参照元 LibWindow::CWndDocumentTab::TcnSelChange(), LibWindow::CWndMain::WmNotifyChildSetFocus(), LibWindow::CWndContainer::WmNotifyChildSetFocus().

172 { return SetCurrentIndex( Find( pcElement ) ); }
virtual bool SetCurrentIndex(int nIndex) noexcept
カレントインデックス設定関数
Definition: CWndList.cpp:136
virtual int Find(Type const &rElement) const noexcept
検索関数
Definition: CArray.hpp:637

被呼び出し関係図:

CWndElement * LibWindow::CWndList::GetElementWindow ( HWND  hWnd) const
virtualnoexcept

エレメントウィンドウ取得関数

エレメントウィンドウ取得関数です。

引数
[in]hWndウィンドウハンドル
戻り値
エレメントウィンドウポインタ
注意
なし

CWndList.cpp234 行目に定義があります。

参照先 LibWindow::CWndBase::GetHandle(), LibCommon::CArray< Type >::m_nCount, LibCommon::CArray< Type >::m_pBuffer.

参照元 LibWindow::CWndDocumentTab::TcnSelChange(), LibWindow::CWndDocumentTab::WmContextMenu(), LibWindow::CWndMain::WmNotifyChildSetFocus(), LibWindow::CWndContainer::WmNotifyChildSetFocus().

234  {
235  // 処理ブロック
236  CWndElement* result = nullptr;
237  do {
238  // 巡回する
239  for ( int nIndex = 0; m_nCount > nIndex; ++nIndex ) {
240  // エレメントウィンドウを取得する
241  CWndElement* pcElement = m_pBuffer[ nIndex ];
242  if ( nullptr != pcElement ) {
243  // ウィンドウハンドルを調べる
244  if ( hWnd == pcElement->GetHandle() ) {
245  // 成功!
246  result = pcElement;
247  break;
248  }
249  }
250  }
251  } while ( false );
252 
253  // 実行結果を返す
254  return result;
255  }
CWndPane CWndElement
エレメントウィンドウクラス型
Definition: CWndList.h:26
int m_nCount
要素数
Definition: CArray.h:669
Type * m_pBuffer
バッファポインタ
Definition: CArray.h:667

呼び出し関係図:

被呼び出し関係図:

virtual bool LibWindow::CWndList::RemoveElementWindow ( CWndElement pcElement)
inlinevirtualnoexcept

エレメントウィンドウ削除関数

エレメントウィンドウ削除関数です。

引数
[in]pcElementエレメントウィンドウポインタ
戻り値
実行結果
  • true 成功
  • false 失敗
注意
なし

CWndList.h196 行目に定義があります。

参照元 AppendElementWindow(), LibWindow::CWndMain::DeleteChildWindow(), LibWindow::CWndContainer::DeleteChildWindow(), LibWindow::CWndMain::DockingToFloating(), LibWindow::CWndDockingPartition::ExecMenuCommand().

196 { return Remove( Find( pcElement ) ); }
virtual bool Remove() noexcept
削除関数
Definition: CArray.hpp:528
virtual int Find(Type const &rElement) const noexcept
検索関数
Definition: CArray.hpp:637

被呼び出し関係図:

bool LibWindow::CWndList::InitElementListConfig ( CJsonConfig rcConfig,
CWndElement *(*)()  pfnCreateElement,
wchar_t const *  pszElementName 
)
virtualnoexcept

エレメントウィンドウリスト構成情報初期化関数

エレメントウィンドウリスト構成情報初期化関数です。

引数
[in]rcConfigJSON構成ファイル参照
[in]pfnCreateElement新規エレメントウィンドウ作成関数ポインタ
[in]pszElementNameエレメントウィンドウ名
戻り値
実行結果
  • true 成功
  • false 失敗
注意
なし

CWndList.cpp259 行目に定義があります。

参照先 LibCommon::CArray< Type >::Append(), LibJson::CJsonConfig::Get(), LibWindow::CWndPane::InitConfig(), KEY_CURRENT_INDEX, KEY_ELEMENT_COUNT, LibCommon::CArray< Type >::m_nCount, m_nCurrent, SECTION_ELEMENT_INFO.

参照元 LibWindow::CWndContainer::InitConfig(), LibWindow::CWndMain::InitConfig().

259  {
260  // 処理ブロック
261  bool result = false;
262  do {
263  // エレメントウィンドウ名文字列ポインタを調べる
264  if ( nullptr == pszElementName ) {
265  // 失敗!
266  break;
267  }
268  // 新規エレメントウィンドウ作成関数ポインタを調べる
269  else if ( nullptr == pfnCreateElement ) {
270  // 失敗!
271  break;
272  }
273  else {
274  // エレメントウィンドウリストセクションブロック
275  CJsonConfigAuto cConfigAuto( rcConfig, CString().Format( L"%sリスト", pszElementName ) );
276 
277  // エレメントウィンドウ数を取得する
278  int nCount = 0;
279  rcConfig.Get( nCount, KEY_ELEMENT_COUNT );
280 
281  // 巡回する
282  for ( int nIndex = 0;; ++nIndex ) {
283  // インデックスを調べる
284  if ( nCount <= nIndex ) {
285  // カレントインデックスを取得する
286  int nIndex = 0;
287  if ( rcConfig.Get( nIndex, KEY_CURRENT_INDEX ) ) {
288  // インデックスを調べる
289  if ( ( 0 <= nIndex ) && ( m_nCount > nIndex ) ) {
290  // カレントインデックスを設定する
291  m_nCurrent = nIndex;
292  }
293  }
294 
295  // 成功!
296  result = true;
297  break;
298  }
299 
300  // 新規エレメントウィンドウを作成する
301  CWndElement* pcElement = ( *pfnCreateElement )();
302  if ( nullptr != pcElement ) {
303  // エレメントウィンドウ情報セクション処理ブロック
304  CJsonConfigAuto cConfigAuto( rcConfig, SECTION_ELEMENT_INFO, nIndex );
305 
306  // ウィンドウ構成情報を初期化する
307  if ( pcElement->InitConfig( rcConfig ) ) {
308  // エレメントウィンドウリストに追加する
309  if ( Append( pcElement ) ) {
310  // 継続!
311  continue;
312  }
313  }
314  }
315 
316  // エレメントウィンドウを削除する
317  delete pcElement;
318 
319  // 失敗!
320  break;
321  }
322  }
323  } while ( false );
324 
325  // 実行結果を返す
326  return result;
327  }
static wchar_t const *const KEY_CURRENT_INDEX
カレントインデックスキー文字列
Definition: CWndList.h:359
CWndPane CWndElement
エレメントウィンドウクラス型
Definition: CWndList.h:26
virtual bool Append(CArray const &rcInstance) noexcept
追加関数
Definition: CArray.hpp:393
int m_nCount
要素数
Definition: CArray.h:669
int m_nCurrent
カレントインデックス
Definition: CWndList.h:352
static wchar_t const *const KEY_ELEMENT_COUNT
エレメントウィンドウ数キー文字列
Definition: CWndList.h:358
static wchar_t const *const SECTION_ELEMENT_INFO
エレメントウィンドウ情報セクション文字列
Definition: CWndList.h:357

呼び出し関係図:

被呼び出し関係図:

bool LibWindow::CWndList::ResumeElementListConfig ( CJsonConfig rcConfig,
wchar_t const *  pszElementName 
)
virtualnoexcept

エレメントウィンドウリスト構成情報復元関数

エレメントウィンドウリスト構成情報復元関数です。

引数
[in]rcConfigJSON構成ファイル参照
[in]pszElementNameエレメントウィンドウ名
戻り値
実行結果
  • true 成功
  • false 失敗
注意
なし

CWndList.cpp331 行目に定義があります。

参照先 LibCommon::CArray< Type >::m_nCount, LibCommon::CArray< Type >::m_pBuffer, LibWindow::CWndPane::ResumeConfig(), SECTION_ELEMENT_INFO.

参照元 LibWindow::CWndContainer::ResumeConfig(), LibWindow::CWndMain::ResumeConfig().

331  {
332  // 処理ブロック
333  bool result = false;
334  do {
335  // エレメントウィンドウ名文字列ポインタを調べる
336  if ( nullptr == pszElementName ) {
337  // 失敗!
338  break;
339  }
340  else {
341  // エレメントウィンドウリストセクションブロック
342  CJsonConfigAuto cConfigAuto( rcConfig, CString().Format( L"%sリスト", pszElementName ) );
343 
344  // エレメントウィンドウ名文字列ポインタを調べる
345  if ( nullptr == pszElementName ) {
346  // 失敗!
347  break;
348  }
349  // 巡回する
350  else for ( int nIndex = 0;; ++nIndex ) {
351  // インデックスを調べる
352  if ( m_nCount <= nIndex ) {
353  // 成功!
354  result = true;
355  break;
356  }
357 
358  // エレメントウィンドウを取得する
359  CWndElement* pcElement = m_pBuffer[ nIndex ];
360  if ( nullptr != pcElement ) {
361  // エレメントウィンドウ情報セクション処理ブロック
362  CJsonConfigAuto cConfigAuto( rcConfig, SECTION_ELEMENT_INFO, nIndex );
363 
364  // ウィンドウ構成情報を復元する
365  if ( !pcElement->ResumeConfig( rcConfig ) ) {
366  // 失敗!
367  break;
368  }
369  }
370  }
371 
372  // 成功!
373  result = true;
374  }
375  } while ( false );
376 
377  // 実行結果を返す
378  return result;
379  }
CWndPane CWndElement
エレメントウィンドウクラス型
Definition: CWndList.h:26
int m_nCount
要素数
Definition: CArray.h:669
static wchar_t const *const SECTION_ELEMENT_INFO
エレメントウィンドウ情報セクション文字列
Definition: CWndList.h:357
Type * m_pBuffer
バッファポインタ
Definition: CArray.h:667

呼び出し関係図:

被呼び出し関係図:

bool LibWindow::CWndList::SaveElementListConfig ( CJsonConfig rcConfig,
wchar_t const *  pszElementName 
)
virtualnoexcept

エレメントウィンドウリスト構成情報保存関数

エレメントウィンドウリスト構成情報保存関数です。

引数
[in]rcConfigJSON構成ファイル参照
[in]pszElementNameエレメントウィンドウ名
戻り値
実行結果
  • true 成功
  • false 失敗
注意
なし

CWndList.cpp383 行目に定義があります。

参照先 KEY_CURRENT_INDEX, KEY_ELEMENT_COUNT, LibCommon::CArray< Type >::m_nCount, m_nCurrent, LibCommon::CArray< Type >::m_pBuffer, LibWindow::CWndPane::SaveConfig(), SECTION_ELEMENT_INFO, LibJson::CJsonConfig::Set().

参照元 LibWindow::CWndContainer::SaveConfig(), LibWindow::CWndMain::SaveConfig().

383  {
384  // 処理ブロック
385  bool result = false;
386  do {
387  // エレメントウィンドウ名文字列ポインタを調べる
388  if ( nullptr == pszElementName ) {
389  // 失敗!
390  break;
391  }
392  else {
393  // エレメントウィンドウリストセクションブロック
394  CJsonConfigAuto cConfigAuto( rcConfig, CString().Format( L"%sリスト", pszElementName ), true );
395 
396  // エレメントウィンドウ名文字列ポインタを調べる
397  if ( nullptr == pszElementName ) {
398  // 失敗!
399  break;
400  }
401  // エレメントウィンドウ数を調べる
402  else if ( 0 >= m_nCount ) {
403  // 成功!
404  result = true;
405  }
406  // エレメントウィンドウ数を保存する
407  else if ( rcConfig.Set( m_nCount, KEY_ELEMENT_COUNT ) ) {
408  // カレントインデックスを調べる
409  if ( 0 <= m_nCurrent ) {
410  // カレントインデックスを保存する
411  if ( !rcConfig.Set( m_nCurrent, KEY_CURRENT_INDEX ) ) {
412  // 失敗!
413  break;
414  }
415  }
416 
417  // 巡回する
418  for ( int nIndex = 0;; ++nIndex ) {
419  // インデックスを調べる
420  if ( m_nCount <= nIndex ) {
421  // 成功!
422  result = true;
423  break;
424  }
425 
426  // エレメントウィンドウを取得する
427  CWndElement* pcElement = m_pBuffer[ nIndex ];
428  if ( nullptr != pcElement ) {
429  // エレメントウィンドウ情報セクション処理ブロック
430  CJsonConfigAuto cConfigAuto( rcConfig, SECTION_ELEMENT_INFO, nIndex, true );
431 
432  // ウィンドウ構成情報を保存する
433  if ( !pcElement->SaveConfig( rcConfig ) ) {
434  // 失敗!
435  break;
436  }
437  }
438  }
439  }
440  }
441  } while ( false );
442 
443  // 実行結果を返す
444  return result;
445  }
static wchar_t const *const KEY_CURRENT_INDEX
カレントインデックスキー文字列
Definition: CWndList.h:359
CWndPane CWndElement
エレメントウィンドウクラス型
Definition: CWndList.h:26
int m_nCount
要素数
Definition: CArray.h:669
int m_nCurrent
カレントインデックス
Definition: CWndList.h:352
static wchar_t const *const KEY_ELEMENT_COUNT
エレメントウィンドウ数キー文字列
Definition: CWndList.h:358
static wchar_t const *const SECTION_ELEMENT_INFO
エレメントウィンドウ情報セクション文字列
Definition: CWndList.h:357
Type * m_pBuffer
バッファポインタ
Definition: CArray.h:667

呼び出し関係図:

被呼び出し関係図:

bool LibWindow::CWndList::GetChildElementListInfo ( CWndPane pcParent,
SChildPaneInfo rsChildInfo 
)
virtualnoexcept

子エレメントウィンドウリスト情報取得関数

子エレメントウィンドウリスト情報取得関数です。

引数
[in]pcParent親ペインウィンドウポインタ
[in]rsChildInfo子ペインウィンドウ情報構造体参照
戻り値
実行結果
  • true 成功
  • false 失敗
注意
なし

CWndList.cpp449 行目に定義があります。

参照先 LibWindow::CWndPane::GetChildPaneInfo(), LibWindow::CWndPane::IsShow(), LibCommon::CArray< Type >::m_nCount, LibCommon::CArray< Type >::m_pBuffer.

参照元 LibWindow::CWndContainer::GetChildPaneInfo(), LibWindow::CWndMain::GetChildPaneInfo().

449  {
450  // 処理ブロック
451  bool result = false;
452  do {
453  // 親ペインウィンドウポインタを調べる
454  if ( nullptr == pcParent ) {
455  // 失敗!
456  break;
457  }
458 
459  // 巡回する
460  for ( int nIndex = 0;; ++nIndex ) {
461  // インデックスを調べる
462  if ( m_nCount <= nIndex ) {
463  // 成功!
464  result = true;
465  break;
466  }
467 
468  // エレメントウィンドウを取得する
469  CWndElement* pcElement = m_pBuffer[ nIndex ];
470  if ( nullptr != pcElement ) {
471  // 子ウィンドウ数をインクリメントする
472  ++rsChildInfo.m_nCount;
473 
474  // 表示フラグを調べる
475  if ( pcElement->IsShow() ) {
476  // 表示状態子ウィンドウ数をインクリメントする
477  ++rsChildInfo.m_nShow;
478  }
479  else {
480  // 非表示状態子ウィンドウ数をインクリメントする
481  ++rsChildInfo.m_nHide;
482  }
483 
484  // 非表示可能状態を調べる
485  if ( pcParent->CanHideChildWindow( pcElement ) ) {
486  // 非表示可能状態子ウィンドウ数をインクリメントする
487  ++rsChildInfo.m_nHideable;
488  }
489 
490  // 削除可能状態を調べる
491  if ( pcParent->CanDeleteChildWindow( pcElement ) ) {
492  // 削除可能状態子ウィンドウ数をインクリメントする
493  ++rsChildInfo.m_nDeletable;
494  }
495 
496  // 子ペインウィンドウ情報を取得する
497  if ( !pcElement->GetChildPaneInfo( rsChildInfo ) ) {
498  // 失敗!
499  break;
500  }
501  }
502  }
503  } while ( false );
504 
505  // 実行結果を返す
506  return result;
507  }
CWndPane CWndElement
エレメントウィンドウクラス型
Definition: CWndList.h:26
int m_nCount
要素数
Definition: CArray.h:669
Type * m_pBuffer
バッファポインタ
Definition: CArray.h:667

呼び出し関係図:

被呼び出し関係図:

int LibWindow::CWndList::GetElementListOrderIndex ( CWndPane pcPane,
int *  pnOrder 
)
virtualnoexcept

エレメントウィンドウリストオーダー番号取得関数

エレメントウィンドウリストオーダー番号取得関数です。

引数
[in]pcPaneペインウィンドウポインタ
[in,out]pnOrderオーダー番号ポインタ
戻り値
オーダー番号
  • 0以上 成功
  • 0未満 失敗
注意
なし

CWndList.cpp511 行目に定義があります。

参照先 LibWindow::CWndPane::GetOrderIndex(), LibCommon::CArray< Type >::m_nCount, LibCommon::CArray< Type >::m_pBuffer.

参照元 LibWindow::CWndContainer::GetOrderIndex(), LibWindow::CWndMain::GetOrderIndex().

511  {
512  // 処理ブロック
513  int result = -1;
514  do {
515  // 巡回する
516  for ( int nIndex = 0; m_nCount > nIndex; ++nIndex ) {
517  // エレメントウィンドウを取得する
518  CWndElement* pcElement = m_pBuffer[ nIndex ];
519  if ( nullptr != pcElement ) {
520  // ペインウィンドウオーダー番号を取得する
521  int nOrder = pcElement->GetOrderIndex( pcPane, pnOrder );
522  if ( 0 <= nOrder ) {
523  // 成功!
524  result = nOrder;
525  break;
526  }
527  }
528  }
529  } while ( false );
530 
531  // 実行結果を返す
532  return result;
533  }
CWndPane CWndElement
エレメントウィンドウクラス型
Definition: CWndList.h:26
int m_nCount
要素数
Definition: CArray.h:669
Type * m_pBuffer
バッファポインタ
Definition: CArray.h:667

呼び出し関係図:

被呼び出し関係図:

CWndPane * LibWindow::CWndList::GetElementListOrderPane ( int *  pnOrder)
virtualnoexcept

エレメントウィンドウリストオーダー番号ペインウィンドウ取得関数

エレメントウィンドウリストオーダー番号ペインウィンドウ取得関数です。

引数
[in,out]pnOrderオーダー番号ポインタ
戻り値
ペインウィンドウポインタ
注意
なし

CWndList.cpp537 行目に定義があります。

参照先 LibWindow::CWndPane::GetOrderPane(), LibCommon::CArray< Type >::m_nCount, LibCommon::CArray< Type >::m_pBuffer.

参照元 LibWindow::CWndContainer::GetOrderPane(), LibWindow::CWndMain::GetOrderPane().

537  {
538  // 処理ブロック
539  CWndPane* result = nullptr;
540  do {
541  // 巡回する
542  for ( int nIndex = 0; m_nCount > nIndex; ++nIndex ) {
543  // エレメントウィンドウを取得する
544  CWndElement* pcElement = m_pBuffer[ nIndex ];
545  if ( nullptr != pcElement ) {
546  // オーダー番号ペインウィンドウを取得する
547  CWndPane* pcPane = pcElement->GetOrderPane( pnOrder );
548  if ( nullptr != pcPane ) {
549  // 成功!
550  result = pcPane;
551  break;
552  }
553  }
554  }
555  } while ( false );
556 
557  // 実行結果を返す
558  return result;
559  }
CWndPane CWndElement
エレメントウィンドウクラス型
Definition: CWndList.h:26
int m_nCount
要素数
Definition: CArray.h:669
Type * m_pBuffer
バッファポインタ
Definition: CArray.h:667

呼び出し関係図:

被呼び出し関係図:

bool LibWindow::CWndList::ShowElementListAll ( CWndPane pcParent,
bool  bShow 
)
virtualnoexcept

全エレメントウィンドウリスト表示関数

全エレメントウィンドウリスト表示関数です。

引数
[in]pcParent親ペインウィンドウポインタ
[in]bShowウィンドウ表示フラグ
戻り値
実行結果
  • true 成功
  • false 失敗
注意
なし

CWndList.cpp563 行目に定義があります。

参照先 LibCommon::CArray< Type >::m_nCount, LibCommon::CArray< Type >::m_pBuffer, LibWindow::CWndPane::ShowChildAll().

参照元 LibWindow::CWndContainer::ShowChildAll(), LibWindow::CWndMain::ShowChildAll().

563  {
564  // 処理ブロック
565  bool result = false;
566  do {
567  // 親ペインウィンドウポインタを調べる
568  if ( nullptr == pcParent ) {
569  // 失敗!
570  break;
571  }
572 
573  // 巡回する
574  for ( int nIndex = 0;; ++nIndex ) {
575  // インデックスを調べる
576  if ( m_nCount <= nIndex ) {
577  // 成功!
578  result = true;
579  break;
580  }
581 
582  // エレメントウィンドウを取得する
583  CWndElement* pcElement = m_pBuffer[ nIndex ];
584  if ( nullptr != pcElement ) {
585  // 子ウィンドウを表示する
586  if ( !pcParent->ShowChildWindow( pcElement, bShow ) ) {
587  // 失敗!
588  break;
589  }
590  // 全子ウィンドウを表示する
591  else if ( !pcElement->ShowChildAll( bShow ) ) {
592  // 失敗!
593  break;
594  }
595  }
596  }
597  } while ( false );
598 
599  // 実行結果を返す
600  return result;
601  }
CWndPane CWndElement
エレメントウィンドウクラス型
Definition: CWndList.h:26
int m_nCount
要素数
Definition: CArray.h:669
Type * m_pBuffer
バッファポインタ
Definition: CArray.h:667

呼び出し関係図:

被呼び出し関係図:

bool LibWindow::CWndList::DeleteElementListAll ( CWndPane pcParent)
virtualnoexcept

全エレメントウィンドウリスト削除関数

全エレメントウィンドウリスト削除関数です。

引数
[in]pcParent親ペインウィンドウポインタ
戻り値
実行結果
  • true 成功
  • false 失敗
注意
なし

CWndList.cpp605 行目に定義があります。

参照先 LibWindow::CWndPane::DeleteChildAll(), LibCommon::CArray< Type >::m_nCount, LibCommon::CArray< Type >::m_pBuffer.

参照元 LibWindow::CWndContainer::DeleteChildAll(), LibWindow::CWndMain::DeleteChildAll().

605  {
606  // 処理ブロック
607  bool result = false;
608  do {
609  // 親ペインウィンドウポインタを調べる
610  if ( nullptr == pcParent ) {
611  // 失敗!
612  break;
613  }
614 
615  // 巡回する
616  for ( int nIndex = m_nCount;; --nIndex ) {
617  // インデックスを調べる
618  if ( 0 >= nIndex ) {
619  // 成功!
620  result = true;
621  break;
622  }
623 
624  // エレメントウィンドウを取得する
625  CWndElement* pcElement = m_pBuffer[ nIndex - 1 ];
626  if ( nullptr != pcElement ) {
627  // 全子ウィンドウを削除する
628  if ( !pcElement->DeleteChildAll() ) {
629  // 失敗!
630  break;
631  }
632  // 子ウィンドウを削除する
633  else if ( !pcParent->DeleteChildWindow( pcElement ) ) {
634  // 失敗!
635  break;
636  }
637  }
638  }
639  } while ( false );
640 
641  // 実行結果を返す
642  return result;
643  }
CWndPane CWndElement
エレメントウィンドウクラス型
Definition: CWndList.h:26
int m_nCount
要素数
Definition: CArray.h:669
Type * m_pBuffer
バッファポインタ
Definition: CArray.h:667

呼び出し関係図:

被呼び出し関係図:

bool LibWindow::CWndList::AppendElementWindow ( HWND  hParent,
CWndElement pcElement 
)
virtualnoexcept

エレメントウィンドウ追加関数

エレメントウィンドウ追加関数です。

引数
[in]hParent親ウィンドウハンドル
[in]pcElementエレメントウィンドウポインタ
戻り値
実行結果
  • true 成功
  • false 失敗
注意
なし

CWndList.cpp647 行目に定義があります。

参照先 LibCommon::CArray< Type >::Append(), LibCommon::CArray< Type >::m_nCount, RemoveElementWindow(), SetCurrentIndex().

参照元 AppendNewElementWindow(), LibWindow::CWndMain::DockingToFloating().

647  {
648  // 処理ブロック
649  bool result = false;
650  do {
651  // エレメントウィンドウポインタを調べる
652  if ( nullptr == pcElement ) {
653  // 失敗!
654  break;
655  }
656  // エレメントウィンドウリストに追加する
657  else if ( Append( pcElement ) ) {
658  // ウィンドウを作成する
659  if ( pcElement->Create( hParent ) ) {
660  // カレントエレメントウィンドウを設定する
661  if ( SetCurrentIndex( m_nCount - 1 ) ) {
662  // 成功!
663  result = pcElement;
664  break;
665  }
666  }
667 
668  // エレメントウィンドウリストから削除する
669  RemoveElementWindow( pcElement );
670  }
671 
672  // エレメントウィンドウを削除する
673  delete pcElement;
674  } while ( false );
675 
676  // 実行結果を返す
677  return result;
678  }
virtual bool SetCurrentIndex(int nIndex) noexcept
カレントインデックス設定関数
Definition: CWndList.cpp:136
virtual bool Append(CArray const &rcInstance) noexcept
追加関数
Definition: CArray.hpp:393
int m_nCount
要素数
Definition: CArray.h:669
virtual bool RemoveElementWindow(CWndElement *pcElement) noexcept
エレメントウィンドウ削除関数
Definition: CWndList.h:196

呼び出し関係図:

被呼び出し関係図:

CWndElement * LibWindow::CWndList::AppendNewElementWindow ( HWND  hParent,
CWndElement *(*)()  pfnCreateElement 
)
virtualnoexcept

新規エレメントウィンドウ追加関数

新規エレメントウィンドウ追加関数です。

引数
[in]hParent親ウィンドウハンドル
[in]pfnCreateElement新規エレメントウィンドウ作成関数ポインタ
戻り値
エレメントウィンドウポインタ
注意
なし

CWndList.cpp682 行目に定義があります。

参照先 AppendElementWindow().

参照元 LibWindow::CWndContainer::AppendNewElementWindow(), LibWindow::CWndMain::AppendNewFloatingWindow(), LibWindow::CWndMain::AppendNewOverlapWindow().

682  {
683  // 処理ブロック
684  CWndElement* result = nullptr;
685  do {
686  // 親ウィンドウを調べる
687  if ( 0 == ::IsWindow( hParent ) ) {
688  // 失敗!
689  break;
690  }
691  // 新規エレメントウィンドウ作成関数ポインタを調べる
692  else if ( nullptr == pfnCreateElement ) {
693  // 失敗!
694  break;
695  }
696 
697  // 新規エレメントウィンドウを作成する
698  CWndElement* pcElement = pfnCreateElement();
699  if ( nullptr == pcElement ) {
700  // 失敗!
701  break;
702  }
703  // エレメントウィンドウを追加する
704  else if ( AppendElementWindow( hParent, pcElement ) ) {
705  // 成功!
706  result = pcElement;
707  break;
708  }
709 
710  // エレメントウィンドウを削除する
711  delete pcElement;
712  } while ( false );
713 
714  // 実行結果を返す
715  return result;
716  }
CWndPane CWndElement
エレメントウィンドウクラス型
Definition: CWndList.h:26
virtual bool AppendElementWindow(HWND hParent, CWndElement *pcElement) noexcept
エレメントウィンドウ追加関数
Definition: CWndList.cpp:647

呼び出し関係図:

被呼び出し関係図:

bool LibWindow::CWndList::AppendElementListDebugSubMenu ( HMENU  hMenu,
CWndPane pcParent,
wchar_t const *  pszElementName,
WORD  wIdNew 
)
virtualnoexcept

エレメントウィンドウリストデバッグサブメニュー追加関数

エレメントウィンドウリストデバッグサブメニュー追加関数です。

引数
[in]hMenuメニューハンドル
[in]pcParent親ペインウィンドウポインタ
[in]pszElementNameエレメントウィンドウ名
[in]wIdNew新規作成コマンドID
戻り値
実行結果
  • true 成功
  • false 失敗
注意
なし

CWndList.cpp720 行目に定義があります。

参照先 LibWindow::CWndPane::AppendDebugMenu(), LibWindow::GetEnableMenuCommandCount(), LibWindow::CWndBase::GetHandle(), KEY_CURRENT_INDEX, KEY_ELEMENT_COUNT, LibCommon::CArray< Type >::m_nCount, LibCommon::CArray< Type >::m_pBuffer, SECTION_ELEMENT_INFO, LibWindow::SetMenuCommandData().

参照元 LibWindow::CWndContainer::AppendDebugMenu(), LibWindow::CWndMain::AppendDebugMenu().

720  {
721  // 処理ブロック
722  bool result = false;
723  do {
724  // メニューハンドルを調べる
725  if ( nullptr == hMenu ) {
726  // 失敗!
727  break;
728  }
729  // 親ペインウィンドウポインタを調べる
730  else if ( nullptr == pcParent ) {
731  // 失敗!
732  break;
733  }
734  // エレメントウィンドウ名文字列ポインタを調べる
735  else if ( nullptr == pszElementName ) {
736  // 失敗!
737  break;
738  }
739 
740  // ペインウィンドウオーダー番号を取得する
741  int nOrder = pcParent->GetOrderIndex();
742  if ( 0 > nOrder ) {
743  // 失敗!
744  break;
745  }
746 
747  // 通知コードを取得する
748  WORD wCode = static_cast< WORD >( nOrder );
749 
750  // サブメニューを作成する
751  HMENU hSubMenu = ::CreatePopupMenu();
752  if ( nullptr == hSubMenu ) {
753  // 失敗!
754  break;
755  }
756 
757  // 巡回する
758  for ( int nIndex = 0;; ++nIndex ) {
759  // インデックスを調べる
760  if ( m_nCount <= nIndex ) {
761  // 新規追加コマンドを調べる
762  if ( 0 != wIdNew ) {
763  // メニュー項目数を調べる
764  if ( 0 < ::GetMenuItemCount( hSubMenu ) ) {
765  // セパレータを追加する
766  ::AppendMenuW( hSubMenu, MF_SEPARATOR, 0, nullptr );
767  }
768 
769  // 新規追加コマンドを追加する
770  UINT uId = MAKELONG( wIdNew, wCode );
771  ::AppendMenuW( hSubMenu, MF_STRING, uId, CString().Format( L"新規%s", pszElementName ) );
772  SetMenuCommandData( hSubMenu, uId, reinterpret_cast< ULONG_PTR >( pcParent->GetHandle() ) );
773  }
774 
775  // メニュー項目数を調べる
776  if ( 0 < ::GetMenuItemCount( hMenu ) ) {
777  // セパレータを追加する
778  ::AppendMenuW( hMenu, MF_SEPARATOR, 0, nullptr );
779  }
780 
781  // サブメニューを追加する
782  ::AppendMenuW( hMenu, MF_POPUP, reinterpret_cast< UINT_PTR >( hSubMenu ), CString().Format( L"%sリスト", pszElementName ) );
783  if ( 0 >= GetEnableMenuCommandCount( hSubMenu ) ) {
784  // サブメニュー項目を無効化する
785  ::EnableMenuItem( hMenu, ( ::GetMenuItemCount( hMenu ) - 1 ), ( MF_BYPOSITION | MFS_DISABLED ) );
786  }
787 
788  // 成功!
789  result = true;
790  break;
791  }
792 
793  // エレメントウィンドウを取得する
794  CWndElement* pcElement = m_pBuffer[ nIndex ];
795  if ( nullptr != pcElement ) {
796  // サブサブメニューを作成する
797  HMENU hSubSubMenu = ::CreatePopupMenu();
798  if ( nullptr == hSubSubMenu ) {
799  // 失敗!
800  break;
801  }
802  // デバッグメニューを追加する
803  else if ( pcElement->AppendDebugMenu( hSubSubMenu ) ) {
804  // サブサブメニュー項目数を調べる
805  if ( 0 < ::GetMenuItemCount( hSubSubMenu ) ) {
806  // ウィンドウタイトルを取得する
807  wchar_t szBuffer[ MAX_PATH ];
808  ::GetWindowTextW( pcElement->GetHandle(), szBuffer, MAX_PATH );
809 
810  // メニュー項目数を調べる
811  if ( 0 < ::GetMenuItemCount( hSubMenu ) ) {
812  // セパレータを追加する
813  ::AppendMenuW( hSubMenu, MF_SEPARATOR, 0, nullptr );
814  }
815 
816  // サブサブメニューを追加する
817  ::AppendMenuW( hSubMenu, MF_POPUP, reinterpret_cast< UINT_PTR >( hSubSubMenu ), szBuffer );
818  if ( 0 >= GetEnableMenuCommandCount( hSubMenu ) ) {
819  // サブサブメニュー項目を無効化する
820  ::EnableMenuItem( hSubMenu, ( ::GetMenuItemCount( hSubMenu ) - 1 ), ( MF_BYPOSITION | MFS_DISABLED ) );
821  }
822  }
823  else {
824  // サブサブメニューを削除する
825  ::DestroyMenu( hSubSubMenu );
826  }
827  }
828  else {
829  // サブサブメニューを削除する
830  ::DestroyMenu( hSubSubMenu );
831  }
832  }
833  }
834 
835  // 実行結果を調べる
836  if ( !result ) {
837  // サブメニューを削除する
838  ::DestroyMenu( hSubMenu );
839  }
840  } while ( false );
841 
842  // 実行結果を返す
843  return result;
844  }
CWndPane CWndElement
エレメントウィンドウクラス型
Definition: CWndList.h:26
int m_nCount
要素数
Definition: CArray.h:669
LIB_WINDOW_API int GetEnableMenuCommandCount(HMENU hMenu) noexcept
メニューコマンド有効数取得関数
Type * m_pBuffer
バッファポインタ
Definition: CArray.h:667
LIB_WINDOW_API bool SetMenuCommandData(HMENU hMenu, UINT uId, ULONG_PTR uData) noexcept
メニューコマンドデータ設定関数

呼び出し関係図:

被呼び出し関係図:

CWndList& LibWindow::CWndList::operator= ( CWndList const &  )
privatedelete

メンバ詳解

int LibWindow::CWndList::m_nCurrent
protected

カレントインデックス

CWndList.h352 行目に定義があります。

参照元 GetCurrentIndex(), GetShowCurrentIndex(), InitElementListConfig(), SaveElementListConfig(), SetCurrentIndex().

wchar_t const *const LibWindow::CWndList::SECTION_ELEMENT_INFO = L"ウィンドウ情報"
staticprotected

エレメントウィンドウ情報セクション文字列

CWndList.h357 行目に定義があります。

参照元 AppendElementListDebugSubMenu(), InitElementListConfig(), ResumeElementListConfig(), SaveElementListConfig().

wchar_t const *const LibWindow::CWndList::KEY_ELEMENT_COUNT = L"ウィンドウ数"
staticprotected

エレメントウィンドウ数キー文字列

CWndList.h358 行目に定義があります。

参照元 AppendElementListDebugSubMenu(), InitElementListConfig(), SaveElementListConfig().

wchar_t const *const LibWindow::CWndList::KEY_CURRENT_INDEX = L"カレントインデックス"
staticprotected

カレントインデックスキー文字列

CWndList.h359 行目に定義があります。

参照元 AppendElementListDebugSubMenu(), InitElementListConfig(), SaveElementListConfig().


このクラス詳解は次のファイルから抽出されました: