You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

499 lines
17 KiB

9 years ago
9 years ago
9 years ago
  1. /*
  2. * This program source code file is part of KiCad, a free EDA CAD application.
  3. *
  4. * Copyright (C) 2014-2017 CERN
  5. * @author Maciej Suminski <maciej.suminski@cern.ch>
  6. *
  7. * This program is free software; you can redistribute it and/or
  8. * modify it under the terms of the GNU General Public License
  9. * as published by the Free Software Foundation; either version 2
  10. * of the License, or (at your option) any later version.
  11. *
  12. * This program is distributed in the hope that it will be useful,
  13. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  14. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  15. * GNU General Public License for more details.
  16. *
  17. * You should have received a copy of the GNU General Public License
  18. * along with this program; if not, you may find one here:
  19. * http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
  20. * or you may search the http://www.gnu.org website for the version 2 license,
  21. * or you may write to the Free Software Foundation, Inc.,
  22. * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
  23. */
  24. #include "pcb_draw_panel_gal.h"
  25. #include <pcb_view.h>
  26. #include <view/wx_view_controls.h>
  27. #include <pcb_painter.h>
  28. #include <ws_proxy_view_item.h>
  29. #include <ratsnest_viewitem.h>
  30. #include <ratsnest_data.h>
  31. #include <connectivity/connectivity_data.h>
  32. #include <colors_design_settings.h>
  33. #include <class_board.h>
  34. #include <class_module.h>
  35. #include <class_track.h>
  36. #include <class_marker_pcb.h>
  37. #include <pcb_base_frame.h>
  38. #include <confirm.h>
  39. #include <gal/graphics_abstraction_layer.h>
  40. #include <functional>
  41. #include <thread>
  42. using namespace std::placeholders;
  43. const LAYER_NUM GAL_LAYER_ORDER[] =
  44. {
  45. LAYER_GP_OVERLAY,
  46. LAYER_SELECT_OVERLAY,
  47. LAYER_DRC,
  48. LAYER_PADS_NETNAMES, LAYER_VIAS_NETNAMES,
  49. Dwgs_User, Cmts_User, Eco1_User, Eco2_User, Edge_Cuts,
  50. LAYER_MOD_TEXT_FR,
  51. LAYER_MOD_REFERENCES, LAYER_MOD_VALUES,
  52. LAYER_RATSNEST, LAYER_ANCHOR,
  53. LAYER_VIAS_HOLES, LAYER_PADS_PLATEDHOLES, LAYER_NON_PLATEDHOLES,
  54. LAYER_VIA_THROUGH, LAYER_VIA_BBLIND,
  55. LAYER_VIA_MICROVIA, LAYER_PADS_TH,
  56. LAYER_PAD_FR_NETNAMES, LAYER_PAD_FR,
  57. NETNAMES_LAYER_INDEX( F_Cu ), F_Cu, F_Mask, F_SilkS, F_Paste, F_Adhes, F_CrtYd, F_Fab,
  58. NETNAMES_LAYER_INDEX( In1_Cu ), In1_Cu,
  59. NETNAMES_LAYER_INDEX( In2_Cu ), In2_Cu,
  60. NETNAMES_LAYER_INDEX( In3_Cu ), In3_Cu,
  61. NETNAMES_LAYER_INDEX( In4_Cu ), In4_Cu,
  62. NETNAMES_LAYER_INDEX( In5_Cu ), In5_Cu,
  63. NETNAMES_LAYER_INDEX( In6_Cu ), In6_Cu,
  64. NETNAMES_LAYER_INDEX( In7_Cu ), In7_Cu,
  65. NETNAMES_LAYER_INDEX( In8_Cu ), In8_Cu,
  66. NETNAMES_LAYER_INDEX( In9_Cu ), In9_Cu,
  67. NETNAMES_LAYER_INDEX( In10_Cu ), In10_Cu,
  68. NETNAMES_LAYER_INDEX( In11_Cu ), In11_Cu,
  69. NETNAMES_LAYER_INDEX( In12_Cu ), In12_Cu,
  70. NETNAMES_LAYER_INDEX( In13_Cu ), In13_Cu,
  71. NETNAMES_LAYER_INDEX( In14_Cu ), In14_Cu,
  72. NETNAMES_LAYER_INDEX( In15_Cu ), In15_Cu,
  73. NETNAMES_LAYER_INDEX( In16_Cu ), In16_Cu,
  74. NETNAMES_LAYER_INDEX( In17_Cu ), In17_Cu,
  75. NETNAMES_LAYER_INDEX( In18_Cu ), In18_Cu,
  76. NETNAMES_LAYER_INDEX( In19_Cu ), In19_Cu,
  77. NETNAMES_LAYER_INDEX( In20_Cu ), In20_Cu,
  78. NETNAMES_LAYER_INDEX( In21_Cu ), In21_Cu,
  79. NETNAMES_LAYER_INDEX( In22_Cu ), In22_Cu,
  80. NETNAMES_LAYER_INDEX( In23_Cu ), In23_Cu,
  81. NETNAMES_LAYER_INDEX( In24_Cu ), In24_Cu,
  82. NETNAMES_LAYER_INDEX( In25_Cu ), In25_Cu,
  83. NETNAMES_LAYER_INDEX( In26_Cu ), In26_Cu,
  84. NETNAMES_LAYER_INDEX( In27_Cu ), In27_Cu,
  85. NETNAMES_LAYER_INDEX( In28_Cu ), In28_Cu,
  86. NETNAMES_LAYER_INDEX( In29_Cu ), In29_Cu,
  87. NETNAMES_LAYER_INDEX( In30_Cu ), In30_Cu,
  88. LAYER_PAD_BK_NETNAMES, LAYER_PAD_BK,
  89. NETNAMES_LAYER_INDEX( B_Cu ), B_Cu, B_Mask, B_Adhes, B_Paste, B_SilkS, B_CrtYd, B_Fab,
  90. LAYER_MOD_TEXT_BK,
  91. LAYER_WORKSHEET
  92. };
  93. PCB_DRAW_PANEL_GAL::PCB_DRAW_PANEL_GAL( wxWindow* aParentWindow, wxWindowID aWindowId,
  94. const wxPoint& aPosition, const wxSize& aSize,
  95. KIGFX::GAL_DISPLAY_OPTIONS& aOptions, GAL_TYPE aGalType ) :
  96. EDA_DRAW_PANEL_GAL( aParentWindow, aWindowId, aPosition, aSize, aOptions, aGalType )
  97. {
  98. m_view = new KIGFX::PCB_VIEW( true );
  99. m_view->SetGAL( m_gal );
  100. m_painter.reset( new KIGFX::PCB_PAINTER( m_gal ) );
  101. m_view->SetPainter( m_painter.get() );
  102. setDefaultLayerOrder();
  103. setDefaultLayerDeps();
  104. // View controls is the first in the event handler chain, so the Tool Framework operates
  105. // on updated viewport data.
  106. m_viewControls = new KIGFX::WX_VIEW_CONTROLS( m_view, this );
  107. // Load display options (such as filled/outline display of items).
  108. // Can be made only if the parent window is an EDA_DRAW_FRAME (or a derived class)
  109. // which is not always the case (namely when it is used from a wxDialog like the pad editor)
  110. EDA_DRAW_FRAME* frame = GetParentEDAFrame();
  111. if( frame )
  112. {
  113. auto opts = (PCB_DISPLAY_OPTIONS*) frame->GetDisplayOptions();
  114. static_cast<KIGFX::PCB_VIEW*>( m_view )->UpdateDisplayOptions( opts );
  115. }
  116. }
  117. PCB_DRAW_PANEL_GAL::~PCB_DRAW_PANEL_GAL()
  118. {
  119. }
  120. void PCB_DRAW_PANEL_GAL::DisplayBoard( BOARD* aBoard )
  121. {
  122. m_view->Clear();
  123. auto zones = aBoard->Zones();
  124. std::atomic<size_t> next( 0 );
  125. std::atomic<size_t> count_done( 0 );
  126. size_t parallelThreadCount = std::max<size_t>( std::thread::hardware_concurrency(), 2 );
  127. for( size_t ii = 0; ii < parallelThreadCount; ++ii )
  128. {
  129. std::thread t = std::thread( [ &count_done, &next, &zones ]( )
  130. {
  131. for( size_t i = next.fetch_add( 1 ); i < zones.size(); i = next.fetch_add( 1 ) )
  132. zones[i]->CacheTriangulation();
  133. count_done++;
  134. } );
  135. t.detach();
  136. }
  137. if( m_worksheet )
  138. m_worksheet->SetFileName( TO_UTF8( aBoard->GetFileName() ) );
  139. // Load drawings
  140. for( auto drawing : const_cast<BOARD*>(aBoard)->Drawings() )
  141. m_view->Add( drawing );
  142. // Load tracks
  143. for( auto track : aBoard->Tracks() )
  144. m_view->Add( track );
  145. // Load modules and its additional elements
  146. for( auto module : aBoard->Modules() )
  147. m_view->Add( module );
  148. // DRC markers
  149. for( int marker_idx = 0; marker_idx < aBoard->GetMARKERCount(); ++marker_idx )
  150. {
  151. m_view->Add( aBoard->GetMARKER( marker_idx ) );
  152. }
  153. // Finalize the triangulation threads
  154. while( count_done < parallelThreadCount )
  155. std::this_thread::sleep_for( std::chrono::milliseconds( 10 ) );
  156. // Load zones
  157. for( auto zone : aBoard->Zones() )
  158. m_view->Add( zone );
  159. // Ratsnest
  160. m_ratsnest.reset( new KIGFX::RATSNEST_VIEWITEM( aBoard->GetConnectivity() ) );
  161. m_view->Add( m_ratsnest.get() );
  162. }
  163. void PCB_DRAW_PANEL_GAL::SetWorksheet( KIGFX::WS_PROXY_VIEW_ITEM* aWorksheet )
  164. {
  165. m_worksheet.reset( aWorksheet );
  166. m_view->Add( m_worksheet.get() );
  167. }
  168. void PCB_DRAW_PANEL_GAL::UseColorScheme( const COLORS_DESIGN_SETTINGS* aSettings )
  169. {
  170. KIGFX::PCB_RENDER_SETTINGS* rs;
  171. rs = static_cast<KIGFX::PCB_RENDER_SETTINGS*>( m_view->GetPainter()->GetSettings() );
  172. rs->ImportLegacyColors( aSettings );
  173. m_gal->SetGridColor( aSettings->GetLayerColor( LAYER_GRID ) );
  174. m_gal->SetCursorColor( aSettings->GetItemColor( LAYER_CURSOR ) );
  175. }
  176. void PCB_DRAW_PANEL_GAL::SetHighContrastLayer( PCB_LAYER_ID aLayer )
  177. {
  178. // Set display settings for high contrast mode
  179. KIGFX::RENDER_SETTINGS* rSettings = m_view->GetPainter()->GetSettings();
  180. SetTopLayer( aLayer );
  181. rSettings->ClearActiveLayers();
  182. rSettings->SetActiveLayer( aLayer );
  183. if( IsCopperLayer( aLayer ) )
  184. {
  185. // Bring some other layers to the front in case of copper layers and make them colored
  186. // fixme do not like the idea of storing the list of layers here,
  187. // should be done in some other way I guess..
  188. LAYER_NUM layers[] = {
  189. GetNetnameLayer( aLayer ),
  190. LAYER_VIA_THROUGH, LAYER_VIAS_HOLES, LAYER_VIAS_NETNAMES,
  191. LAYER_PADS_TH, LAYER_PADS_PLATEDHOLES, LAYER_PADS_NETNAMES,
  192. LAYER_NON_PLATEDHOLES, LAYER_SELECT_OVERLAY, LAYER_GP_OVERLAY,
  193. LAYER_RATSNEST, LAYER_CURSOR
  194. };
  195. for( unsigned int i : layers )
  196. rSettings->SetActiveLayer( i );
  197. // Pads should be shown too
  198. if( aLayer == B_Cu )
  199. {
  200. rSettings->SetActiveLayer( LAYER_PAD_BK );
  201. rSettings->SetActiveLayer( LAYER_MOD_BK );
  202. rSettings->SetActiveLayer( LAYER_PAD_BK_NETNAMES );
  203. }
  204. else if( aLayer == F_Cu )
  205. {
  206. rSettings->SetActiveLayer( LAYER_PAD_FR );
  207. rSettings->SetActiveLayer( LAYER_MOD_FR );
  208. rSettings->SetActiveLayer( LAYER_PAD_FR_NETNAMES );
  209. }
  210. }
  211. m_view->UpdateAllLayersColor();
  212. }
  213. void PCB_DRAW_PANEL_GAL::SetTopLayer( PCB_LAYER_ID aLayer )
  214. {
  215. m_view->ClearTopLayers();
  216. setDefaultLayerOrder();
  217. m_view->SetTopLayer( aLayer );
  218. // Layers that should always have on-top attribute enabled
  219. const std::vector<LAYER_NUM> layers = {
  220. LAYER_VIA_THROUGH, LAYER_VIAS_HOLES, LAYER_VIAS_NETNAMES,
  221. LAYER_PADS_TH, LAYER_PADS_PLATEDHOLES, LAYER_PADS_NETNAMES,
  222. LAYER_NON_PLATEDHOLES, LAYER_SELECT_OVERLAY, LAYER_GP_OVERLAY,
  223. LAYER_RATSNEST, LAYER_DRC
  224. };
  225. for( auto layer : layers )
  226. m_view->SetTopLayer( layer );
  227. // Extra layers that are brought to the top if a F.* or B.* is selected
  228. const std::vector<LAYER_NUM> frontLayers = {
  229. F_Cu, F_Adhes, F_Paste, F_SilkS, F_Mask, F_Fab, F_CrtYd, LAYER_PAD_FR,
  230. LAYER_PAD_FR_NETNAMES, NETNAMES_LAYER_INDEX( F_Cu )
  231. };
  232. const std::vector<LAYER_NUM> backLayers = {
  233. B_Cu, B_Adhes, B_Paste, B_SilkS, B_Mask, B_Fab, B_CrtYd, LAYER_PAD_BK,
  234. LAYER_PAD_BK_NETNAMES, NETNAMES_LAYER_INDEX( B_Cu )
  235. };
  236. const std::vector<LAYER_NUM>* extraLayers = NULL;
  237. // Bring a few more extra layers to the top depending on the selected board side
  238. if( IsFrontLayer( aLayer ) )
  239. extraLayers = &frontLayers;
  240. else if( IsBackLayer( aLayer ) )
  241. extraLayers = &backLayers;
  242. if( extraLayers )
  243. {
  244. for( auto layer : *extraLayers )
  245. m_view->SetTopLayer( layer );
  246. // Move the active layer to the top
  247. if( !IsCopperLayer( aLayer ) )
  248. m_view->SetLayerOrder( aLayer, m_view->GetLayerOrder( GAL_LAYER_ORDER[0] ) );
  249. }
  250. else if( IsCopperLayer( aLayer ) )
  251. {
  252. // Display labels for copper layers on the top
  253. m_view->SetTopLayer( GetNetnameLayer( aLayer ) );
  254. }
  255. m_view->EnableTopLayer( true );
  256. m_view->UpdateAllLayersOrder();
  257. }
  258. void PCB_DRAW_PANEL_GAL::SyncLayersVisibility( const BOARD* aBoard )
  259. {
  260. // Load layer & elements visibility settings
  261. for( LAYER_NUM i = 0; i < PCB_LAYER_ID_COUNT; ++i )
  262. m_view->SetLayerVisible( i, aBoard->IsLayerVisible( PCB_LAYER_ID( i ) ) );
  263. for( GAL_LAYER_ID i = GAL_LAYER_ID_START; i < GAL_LAYER_ID_END; ++i )
  264. m_view->SetLayerVisible( i, aBoard->IsElementVisible( i ) );
  265. // Always enable netname layers, as their visibility is controlled by layer dependencies
  266. for( LAYER_NUM i = NETNAMES_LAYER_ID_START; i < NETNAMES_LAYER_ID_END; ++i )
  267. m_view->SetLayerVisible( i, true );
  268. // Enable some layers that are GAL specific
  269. m_view->SetLayerVisible( LAYER_PADS_PLATEDHOLES, true );
  270. m_view->SetLayerVisible( LAYER_VIAS_HOLES, true );
  271. m_view->SetLayerVisible( LAYER_GP_OVERLAY, true );
  272. m_view->SetLayerVisible( LAYER_SELECT_OVERLAY, true );
  273. m_view->SetLayerVisible( LAYER_RATSNEST, true );
  274. }
  275. void PCB_DRAW_PANEL_GAL::GetMsgPanelInfo( EDA_UNITS_T aUnits, std::vector<MSG_PANEL_ITEM>& aList )
  276. {
  277. BOARD* board = static_cast<PCB_BASE_FRAME*>( m_parent )->GetBoard();
  278. wxString txt;
  279. int viasCount = 0;
  280. int trackSegmentsCount = 0;
  281. for( auto item : board->Tracks() )
  282. {
  283. if( item->Type() == PCB_VIA_T )
  284. viasCount++;
  285. else
  286. trackSegmentsCount++;
  287. }
  288. txt.Printf( wxT( "%d" ), board->GetPadCount() );
  289. aList.push_back( MSG_PANEL_ITEM( _( "Pads" ), txt, DARKGREEN ) );
  290. txt.Printf( wxT( "%d" ), viasCount );
  291. aList.push_back( MSG_PANEL_ITEM( _( "Vias" ), txt, DARKGREEN ) );
  292. txt.Printf( wxT( "%d" ), trackSegmentsCount );
  293. aList.push_back( MSG_PANEL_ITEM( _( "Track Segments" ), txt, DARKGREEN ) );
  294. txt.Printf( wxT( "%d" ), board->GetNodesCount() );
  295. aList.push_back( MSG_PANEL_ITEM( _( "Nodes" ), txt, DARKCYAN ) );
  296. txt.Printf( wxT( "%d" ), board->GetNetCount() - 1 /* don't include "No Net" in count */ );
  297. aList.push_back( MSG_PANEL_ITEM( _( "Nets" ), txt, RED ) );
  298. txt.Printf( wxT( "%d" ), board->GetConnectivity()->GetUnconnectedCount() );
  299. aList.push_back( MSG_PANEL_ITEM( _( "Unrouted" ), txt, BLUE ) );
  300. }
  301. void PCB_DRAW_PANEL_GAL::OnShow()
  302. {
  303. PCB_BASE_FRAME* frame = dynamic_cast<PCB_BASE_FRAME*>( GetParent() );
  304. try
  305. {
  306. // Check if the current rendering backend can be properly initialized
  307. m_view->UpdateItems();
  308. }
  309. catch( const std::runtime_error& e )
  310. {
  311. // Fallback to software renderer
  312. DisplayError( frame, e.what() );
  313. SwitchBackend( GAL_TYPE_CAIRO );
  314. if( frame )
  315. frame->ActivateGalCanvas();
  316. }
  317. if( frame )
  318. {
  319. SetTopLayer( frame->GetActiveLayer() );
  320. PCB_DISPLAY_OPTIONS* displ_opts = (PCB_DISPLAY_OPTIONS*) frame->GetDisplayOptions();
  321. KIGFX::PAINTER* painter = m_view->GetPainter();
  322. auto settings = static_cast<KIGFX::PCB_RENDER_SETTINGS*>( painter->GetSettings() );
  323. settings->LoadDisplayOptions( displ_opts, frame->ShowPageLimits() );
  324. }
  325. }
  326. void PCB_DRAW_PANEL_GAL::setDefaultLayerOrder()
  327. {
  328. for( LAYER_NUM i = 0; (unsigned) i < sizeof( GAL_LAYER_ORDER ) / sizeof( LAYER_NUM ); ++i )
  329. {
  330. LAYER_NUM layer = GAL_LAYER_ORDER[i];
  331. wxASSERT( layer < KIGFX::VIEW::VIEW_MAX_LAYERS );
  332. m_view->SetLayerOrder( layer, i );
  333. }
  334. }
  335. bool PCB_DRAW_PANEL_GAL::SwitchBackend( GAL_TYPE aGalType )
  336. {
  337. bool rv = EDA_DRAW_PANEL_GAL::SwitchBackend( aGalType );
  338. setDefaultLayerDeps();
  339. m_gal->SetWorldUnitLength( 1e-9 /* 1 nm */ / 0.0254 /* 1 inch in meters */ );
  340. return rv;
  341. }
  342. void PCB_DRAW_PANEL_GAL::RedrawRatsnest()
  343. {
  344. if( m_ratsnest )
  345. m_view->Update( m_ratsnest.get() );
  346. }
  347. BOX2I PCB_DRAW_PANEL_GAL::GetDefaultViewBBox() const
  348. {
  349. if( m_worksheet && m_view->IsLayerVisible( LAYER_WORKSHEET ) )
  350. return m_worksheet->ViewBBox();
  351. return BOX2I();
  352. }
  353. void PCB_DRAW_PANEL_GAL::setDefaultLayerDeps()
  354. {
  355. // caching makes no sense for Cairo and other software renderers
  356. auto target = m_backend == GAL_TYPE_OPENGL ? KIGFX::TARGET_CACHED : KIGFX::TARGET_NONCACHED;
  357. for( int i = 0; i < KIGFX::VIEW::VIEW_MAX_LAYERS; i++ )
  358. m_view->SetLayerTarget( i, target );
  359. for( LAYER_NUM i = 0; (unsigned) i < sizeof( GAL_LAYER_ORDER ) / sizeof( LAYER_NUM ); ++i )
  360. {
  361. LAYER_NUM layer = GAL_LAYER_ORDER[i];
  362. wxASSERT( layer < KIGFX::VIEW::VIEW_MAX_LAYERS );
  363. // Set layer display dependencies & targets
  364. if( IsCopperLayer( layer ) )
  365. m_view->SetRequired( GetNetnameLayer( layer ), layer );
  366. else if( IsNetnameLayer( layer ) )
  367. m_view->SetLayerDisplayOnly( layer );
  368. }
  369. m_view->SetLayerTarget( LAYER_ANCHOR, KIGFX::TARGET_NONCACHED );
  370. m_view->SetLayerDisplayOnly( LAYER_ANCHOR );
  371. // Some more required layers settings
  372. m_view->SetRequired( LAYER_VIAS_HOLES, LAYER_VIA_THROUGH );
  373. m_view->SetRequired( LAYER_VIAS_NETNAMES, LAYER_VIA_THROUGH );
  374. m_view->SetRequired( LAYER_PADS_PLATEDHOLES, LAYER_PADS_TH );
  375. m_view->SetRequired( LAYER_NON_PLATEDHOLES, LAYER_PADS_TH );
  376. m_view->SetRequired( LAYER_PADS_NETNAMES, LAYER_PADS_TH );
  377. // Front modules
  378. m_view->SetRequired( LAYER_PAD_FR, F_Cu );
  379. m_view->SetRequired( LAYER_MOD_TEXT_FR, LAYER_MOD_FR );
  380. m_view->SetRequired( LAYER_PAD_FR_NETNAMES, LAYER_PAD_FR );
  381. // Back modules
  382. m_view->SetRequired( LAYER_PAD_BK, B_Cu );
  383. m_view->SetRequired( LAYER_MOD_TEXT_BK, LAYER_MOD_BK );
  384. m_view->SetRequired( LAYER_PAD_BK_NETNAMES, LAYER_PAD_BK );
  385. m_view->SetLayerTarget( LAYER_SELECT_OVERLAY , KIGFX::TARGET_OVERLAY );
  386. m_view->SetLayerDisplayOnly( LAYER_SELECT_OVERLAY ) ;
  387. m_view->SetLayerTarget( LAYER_GP_OVERLAY , KIGFX::TARGET_OVERLAY );
  388. m_view->SetLayerDisplayOnly( LAYER_GP_OVERLAY ) ;
  389. m_view->SetLayerTarget( LAYER_RATSNEST, KIGFX::TARGET_OVERLAY );
  390. m_view->SetLayerDisplayOnly( LAYER_RATSNEST );
  391. m_view->SetLayerTarget( LAYER_WORKSHEET, KIGFX::TARGET_NONCACHED );
  392. m_view->SetLayerDisplayOnly( LAYER_WORKSHEET ) ;
  393. m_view->SetLayerDisplayOnly( LAYER_GRID );
  394. m_view->SetLayerDisplayOnly( LAYER_DRC );
  395. }
  396. KIGFX::PCB_VIEW* PCB_DRAW_PANEL_GAL::GetView() const
  397. {
  398. return static_cast<KIGFX::PCB_VIEW*>( m_view );
  399. }