1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
|
/*
* This program source code file is part of KiCad, a free EDA CAD application.
*
* Copyright (C) 2007-2014 Jean-Pierre Charras, jp.charras at wanadoo.fr
* Copyright (C) 1992-2012 KiCad Developers, see AUTHORS.txt for contributors.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, you may find one here:
* http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
* or you may search the http://www.gnu.org website for the version 2 license,
* or you may write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
*/
/**
* @file modedit_onclick.cpp
*/
#include <fctsys.h>
#include <class_drawpanel.h>
#include <confirm.h>
#include <3d_viewer.h>
#include <wxPcbStruct.h>
#include <gr_basic.h>
#include <class_board.h>
#include <class_module.h>
#include <class_edge_mod.h>
#include <pcbnew.h>
#include <pcbnew_id.h>
#include <hotkeys.h>
#include <module_editor_frame.h>
#include <dialog_edit_module_for_Modedit.h>
#include <menus_helpers.h>
void FOOTPRINT_EDIT_FRAME::OnLeftClick( wxDC* DC, const wxPoint& MousePos )
{
BOARD_ITEM* item = GetCurItem();
m_canvas->CrossHairOff( DC );
if( GetToolId() == ID_NO_TOOL_SELECTED )
{
if( item && item->GetFlags() ) // Move item command in progress
{
switch( item->Type() )
{
case PCB_MODULE_TEXT_T:
PlaceTexteModule( static_cast<TEXTE_MODULE*>( item ), DC );
break;
case PCB_MODULE_EDGE_T:
SaveCopyInUndoList( GetBoard()->m_Modules, UR_MODEDIT );
Place_EdgeMod( static_cast<EDGE_MODULE*>( item ) );
break;
case PCB_PAD_T:
PlacePad( static_cast<D_PAD*>( item ), DC );
break;
default:
{
wxString msg;
msg.Printf( wxT( "WinEDA_ModEditFrame::OnLeftClick err:Struct %d, m_Flag %X" ),
item->Type(), item->GetFlags() );
DisplayError( this, msg );
item->ClearFlags();
break;
}
}
}
else
{
if( !wxGetKeyState( WXK_SHIFT ) && !wxGetKeyState( WXK_ALT )
&& !wxGetKeyState( WXK_CONTROL ) )
item = ModeditLocateAndDisplay();
SetCurItem( item );
}
}
item = GetCurItem();
bool no_item_edited = item == NULL || item->GetFlags() == 0;
switch( GetToolId() )
{
case ID_NO_TOOL_SELECTED:
break;
case ID_MODEDIT_CIRCLE_TOOL:
case ID_MODEDIT_ARC_TOOL:
case ID_MODEDIT_LINE_TOOL:
if( no_item_edited )
{
STROKE_T shape = S_SEGMENT;
if( GetToolId() == ID_MODEDIT_CIRCLE_TOOL )
shape = S_CIRCLE;
if( GetToolId() == ID_MODEDIT_ARC_TOOL )
shape = S_ARC;
SetCurItem( Begin_Edge_Module( (EDGE_MODULE*) NULL, DC, shape ) );
}
else if( item->IsNew() )
{
if( ( (EDGE_MODULE*) item )->GetShape() == S_CIRCLE )
{
End_Edge_Module( (EDGE_MODULE*) item );
SetCurItem( NULL );
m_canvas->Refresh();
}
else if( ( (EDGE_MODULE*) item )->GetShape() == S_ARC )
{
End_Edge_Module( (EDGE_MODULE*) item );
SetCurItem( NULL );
m_canvas->Refresh();
}
else if( ( (EDGE_MODULE*) item )->GetShape() == S_SEGMENT )
{
SetCurItem( Begin_Edge_Module( (EDGE_MODULE*) item, DC, S_SEGMENT ) );
}
else
{
wxMessageBox( wxT( "ProcessCommand error: unknown shape" ) );
}
}
break;
case ID_MODEDIT_DELETE_TOOL:
if( ! no_item_edited ) // Item in edit, cannot delete it
break;
item = ModeditLocateAndDisplay();
if( item && item->Type() != PCB_MODULE_T ) // Cannot delete the module itself
{
SaveCopyInUndoList( GetBoard()->m_Modules, UR_MODEDIT );
RemoveStruct( item );
SetCurItem( NULL );
}
break;
case ID_MODEDIT_ANCHOR_TOOL:
{
MODULE* module = GetBoard()->m_Modules;
if( module == NULL // No module loaded
|| (module->GetFlags() != 0) )
break;
SaveCopyInUndoList( module, UR_MODEDIT );
// set the new relative internal local coordinates of footprint items
wxPoint moveVector = module->GetPosition() - GetCrossHairPosition();
module->MoveAnchorPosition( moveVector );
// Usually, we do not need to change twice the anchor position,
// so deselect the active tool
SetToolID( ID_NO_TOOL_SELECTED, m_canvas->GetDefaultCursor(), wxEmptyString );
SetCurItem( NULL );
m_canvas->Refresh();
}
break;
case ID_MODEDIT_PLACE_GRID_COORD:
m_canvas->DrawGridAxis( DC, GR_XOR, GetBoard()->GetGridOrigin() );
SetGridOrigin( GetCrossHairPosition() );
m_canvas->DrawGridAxis( DC, GR_COPY, GetBoard()->GetGridOrigin() );
GetScreen()->SetModify();
break;
case ID_MODEDIT_TEXT_TOOL:
if( GetBoard()->m_Modules == NULL )
break;
SaveCopyInUndoList( GetBoard()->m_Modules, UR_MODEDIT );
CreateTextModule( GetBoard()->m_Modules, DC );
break;
case ID_MODEDIT_PAD_TOOL:
if( GetBoard()->m_Modules )
{
SaveCopyInUndoList( GetBoard()->m_Modules, UR_MODEDIT );
AddPad( GetBoard()->m_Modules, true );
}
break;
default:
DisplayError( this, wxT( "FOOTPRINT_EDIT_FRAME::ProcessCommand error" ) );
SetToolID( ID_NO_TOOL_SELECTED, m_canvas->GetDefaultCursor(), wxEmptyString );
}
m_canvas->CrossHairOn( DC );
}
bool FOOTPRINT_EDIT_FRAME::OnRightClick( const wxPoint& MousePos, wxMenu* PopMenu )
{
BOARD_ITEM* item = GetCurItem();
wxString msg;
bool blockActive = !GetScreen()->m_BlockLocate.IsIdle();
// Simple location of elements where possible.
if( ( item == NULL ) || ( item->GetFlags() == 0 ) )
{
SetCurItem( item = ModeditLocateAndDisplay() );
}
// End command in progress.
if( GetToolId() != ID_NO_TOOL_SELECTED )
{
if( item && item->GetFlags() )
AddMenuItem( PopMenu, ID_POPUP_CANCEL_CURRENT_COMMAND, _( "Cancel" ),
KiBitmap( cancel_xpm ) );
else
AddMenuItem( PopMenu, ID_POPUP_CLOSE_CURRENT_TOOL, _( "End Tool" ),
KiBitmap( cursor_xpm ) );
PopMenu->AppendSeparator();
}
else
{
if( (item && item->GetFlags()) || blockActive )
{
if( blockActive ) // Put block commands in list
{
AddMenuItem( PopMenu, ID_POPUP_CANCEL_CURRENT_COMMAND,
_( "Cancel Block" ), KiBitmap( cancel_xpm ) );
AddMenuItem( PopMenu, ID_POPUP_ZOOM_BLOCK,
_( "Zoom Block (drag middle mouse)" ),
KiBitmap( zoom_area_xpm ) );
PopMenu->AppendSeparator();
AddMenuItem( PopMenu, ID_POPUP_PLACE_BLOCK,
_( "Place Block" ), KiBitmap( checked_ok_xpm ) );
AddMenuItem( PopMenu, ID_POPUP_COPY_BLOCK,
_( "Copy Block (shift + drag mouse)" ),
KiBitmap( copyblock_xpm ) );
AddMenuItem( PopMenu, ID_POPUP_MIRROR_X_BLOCK,
_( "Mirror Block (alt + drag mouse)" ),
KiBitmap( mirror_h_xpm ) );
AddMenuItem( PopMenu, ID_POPUP_ROTATE_BLOCK,
_( "Rotate Block (ctrl + drag mouse)" ),
KiBitmap( rotate_ccw_xpm ) );
AddMenuItem( PopMenu, ID_POPUP_DELETE_BLOCK,
_( "Delete Block (shift+ctrl + drag mouse)" ),
KiBitmap( delete_xpm ) );
msg = AddHotkeyName( _("Move Block Exactly" ),
g_Module_Editor_Hokeys_Descr, HK_MOVE_ITEM_EXACT );
AddMenuItem( PopMenu, ID_POPUP_MOVE_BLOCK_EXACT,
msg, KiBitmap( move_xpm ) );
}
else
{
AddMenuItem( PopMenu, ID_POPUP_CANCEL_CURRENT_COMMAND,
_( "Cancel" ), KiBitmap( cancel_xpm ) );
}
PopMenu->AppendSeparator();
}
}
if( blockActive )
return true;
if( item )
{
STATUS_FLAGS flags = item->GetFlags();
switch( item->Type() )
{
case PCB_MODULE_T:
{
wxMenu* transform_choice = new wxMenu;
AddMenuItem( transform_choice, ID_MODEDIT_MODULE_ROTATE, _( "Rotate" ),
KiBitmap( rotate_module_ccw_xpm ) );
AddMenuItem( transform_choice, ID_MODEDIT_MODULE_MIRROR, _( "Mirror" ),
KiBitmap( mirror_footprint_axisY_xpm ) );
AddMenuItem( transform_choice, ID_MODEDIT_MODULE_MOVE_EXACT, _( "Move Exactly" ),
KiBitmap( move_module_xpm ) );
msg = AddHotkeyName( _( "Edit Footprint" ), g_Module_Editor_Hokeys_Descr, HK_EDIT_ITEM );
AddMenuItem( PopMenu, ID_POPUP_PCB_EDIT_MODULE_PRMS, msg, KiBitmap( edit_module_xpm ) );
AddMenuItem( PopMenu, transform_choice, ID_MODEDIT_TRANSFORM_MODULE,
_( "Transform Footprint" ), KiBitmap( edit_xpm ) );
break;
}
case PCB_PAD_T:
if( !flags )
{
msg = AddHotkeyName( _("Move Pad" ), g_Module_Editor_Hokeys_Descr, HK_MOVE_ITEM );
AddMenuItem( PopMenu, ID_POPUP_PCB_MOVE_PAD_REQUEST, msg, KiBitmap( move_pad_xpm ) );
}
msg = AddHotkeyName( _("Edit Pad" ), g_Module_Editor_Hokeys_Descr, HK_EDIT_ITEM );
AddMenuItem( PopMenu, ID_POPUP_PCB_EDIT_PAD, msg, KiBitmap( options_pad_xpm ) );
AddMenuItem( PopMenu, ID_POPUP_PCB_IMPORT_PAD_SETTINGS,
_( "New Pad Settings" ), KiBitmap( options_new_pad_xpm ) );
AddMenuItem( PopMenu, ID_POPUP_PCB_EXPORT_PAD_SETTINGS,
_( "Export Pad Settings" ), KiBitmap( export_options_pad_xpm ) );
msg = AddHotkeyName( _("Delete Pad" ), g_Module_Editor_Hokeys_Descr, HK_DELETE );
AddMenuItem( PopMenu, ID_POPUP_PCB_DELETE_PAD, msg, KiBitmap( delete_pad_xpm ) );
msg = AddHotkeyName( _( "Duplicate Pad" ), g_Module_Editor_Hokeys_Descr, HK_DUPLICATE_ITEM );
AddMenuItem( PopMenu, ID_POPUP_PCB_DUPLICATE_ITEM, msg, KiBitmap( duplicate_pad_xpm ) );
msg = AddHotkeyName( _("Move Pad Exactly" ), g_Module_Editor_Hokeys_Descr, HK_MOVE_ITEM_EXACT );
AddMenuItem( PopMenu, ID_POPUP_PCB_MOVE_EXACT, msg, KiBitmap( move_pad_xpm ) );
msg = AddHotkeyName( _("Create Pad Array" ), g_Module_Editor_Hokeys_Descr, HK_CREATE_ARRAY );
AddMenuItem( PopMenu, ID_POPUP_PCB_CREATE_ARRAY, msg, KiBitmap( array_pad_xpm ) );
if( !flags )
{
PopMenu->AppendSeparator();
AddMenuItem( PopMenu, ID_POPUP_PCB_GLOBAL_IMPORT_PAD_SETTINGS,
_( "Global Pad Settings" ), KiBitmap( global_options_pad_xpm ) );
}
break;
case PCB_MODULE_TEXT_T:
if( !flags )
{
msg = AddHotkeyName( _("Move Text" ), g_Module_Editor_Hokeys_Descr,
HK_MOVE_ITEM );
AddMenuItem( PopMenu, ID_POPUP_PCB_MOVE_TEXTMODULE_REQUEST, msg,
KiBitmap( move_field_xpm ) );
}
msg = AddHotkeyName( _("Rotate Text" ), g_Module_Editor_Hokeys_Descr,
HK_ROTATE_ITEM );
AddMenuItem( PopMenu, ID_POPUP_PCB_ROTATE_TEXTMODULE, msg, KiBitmap( rotate_field_xpm ) );
{
// Do not show option to replicate value or reference fields
// (there can only be one of each)
const MODULE* module = static_cast<MODULE*>( item->GetParent() );
const TEXTE_MODULE* text = static_cast<TEXTE_MODULE*>( item );
if( &module->Reference() != text && &module->Value() != text )
{
msg = AddHotkeyName( _( "Duplicate Text" ),
g_Module_Editor_Hokeys_Descr, HK_DUPLICATE_ITEM );
AddMenuItem( PopMenu, ID_POPUP_PCB_DUPLICATE_ITEM,
msg, KiBitmap( duplicate_text_xpm ) );
msg = AddHotkeyName( _("Create Text Array" ),
g_Module_Editor_Hokeys_Descr, HK_CREATE_ARRAY );
AddMenuItem( PopMenu, ID_POPUP_PCB_CREATE_ARRAY,
msg, KiBitmap( array_text_xpm ) );
}
}
msg = AddHotkeyName( _("Move Text Exactly" ), g_Module_Editor_Hokeys_Descr, HK_MOVE_ITEM_EXACT );
AddMenuItem( PopMenu, ID_POPUP_PCB_MOVE_EXACT, msg, KiBitmap( move_field_xpm ) );
if( !flags )
{
msg = AddHotkeyName( _("Edit Text" ), g_Module_Editor_Hokeys_Descr,
HK_EDIT_ITEM );
AddMenuItem( PopMenu, ID_POPUP_PCB_EDIT_TEXTMODULE, msg, KiBitmap( edit_text_xpm ) );
if( ( static_cast<TEXTE_MODULE*>( item ) )->GetType() == TEXTE_MODULE::TEXT_is_DIVERS )
{
msg = AddHotkeyName( _("Delete Text" ), g_Module_Editor_Hokeys_Descr,
HK_DELETE );
AddMenuItem( PopMenu, ID_POPUP_PCB_DELETE_TEXTMODULE, msg,
KiBitmap( delete_text_xpm ) );
}
}
break;
case PCB_MODULE_EDGE_T:
{
if( (flags & IS_NEW) )
AddMenuItem( PopMenu, ID_POPUP_PCB_STOP_CURRENT_DRAWING, _( "End edge" ),
KiBitmap( checked_ok_xpm ) );
if( !flags )
{
msg = AddHotkeyName( _("Move Edge" ), g_Module_Editor_Hokeys_Descr, HK_MOVE_ITEM );
AddMenuItem( PopMenu, ID_POPUP_PCB_MOVE_EDGE, msg, KiBitmap( move_line_xpm ) );
}
msg = AddHotkeyName( _( "Duplicate Edge" ), g_Module_Editor_Hokeys_Descr, HK_DUPLICATE_ITEM );
AddMenuItem( PopMenu, ID_POPUP_PCB_DUPLICATE_ITEM, msg, KiBitmap( duplicate_line_xpm ) );
msg = AddHotkeyName( _("Move Edge Exactly" ), g_Module_Editor_Hokeys_Descr, HK_MOVE_ITEM_EXACT );
AddMenuItem( PopMenu, ID_POPUP_PCB_MOVE_EXACT, msg, KiBitmap( move_line_xpm ) );
msg = AddHotkeyName( _("Create Edge Array" ), g_Module_Editor_Hokeys_Descr, HK_CREATE_ARRAY );
AddMenuItem( PopMenu, ID_POPUP_PCB_CREATE_ARRAY, msg, KiBitmap( array_line_xpm ) );
if( ( flags & (IS_NEW | IS_MOVED) ) == IS_MOVED )
AddMenuItem( PopMenu, ID_POPUP_PCB_PLACE_EDGE, _( "Place edge" ),
KiBitmap( checked_ok_xpm ) );
msg = AddHotkeyName( _("Edit" ), g_Module_Editor_Hokeys_Descr, HK_EDIT_ITEM );
AddMenuItem( PopMenu, ID_POPUP_MODEDIT_EDIT_BODY_ITEM,
msg, KiBitmap( options_segment_xpm ) );
msg = AddHotkeyName( _("Delete Edge" ), g_Module_Editor_Hokeys_Descr, HK_DELETE );
AddMenuItem( PopMenu, ID_POPUP_PCB_DELETE_EDGE, msg, KiBitmap( delete_xpm ) );
wxMenu* edit_global_mnu = new wxMenu;
AddMenuItem( PopMenu, edit_global_mnu, ID_POPUP_MODEDIT_GLOBAL_EDIT_EDGE,
_( "Global Changes" ), KiBitmap( edit_xpm ) );
AddMenuItem( edit_global_mnu, ID_POPUP_MODEDIT_EDIT_WIDTH_ALL_EDGE,
_( "Change Body Items Width" ), KiBitmap( width_segment_xpm ) );
AddMenuItem( edit_global_mnu, ID_POPUP_MODEDIT_EDIT_LAYER_ALL_EDGE,
_( "Change Body Items Layer" ), KiBitmap( select_layer_pair_xpm ) );
}
break;
case PCB_LINE_T:
case PCB_TEXT_T:
case PCB_VIA_T:
case PCB_TRACE_T:
case PCB_ZONE_T:
case PCB_MARKER_T:
case PCB_DIMENSION_T:
case PCB_TARGET_T:
msg.Printf( wxT( "FOOTPRINT_EDIT_FRAME::OnRightClick Error: Unexpected DrawType %d" ),
item->Type() );
DisplayError( this, msg );
break;
case SCREEN_T:
case TYPE_NOT_INIT:
case PCB_T:
msg.Printf( wxT( "FOOTPRINT_EDIT_FRAME::OnRightClick Error: illegal DrawType %d" ),
item->Type() );
DisplayError( this, msg );
break;
default:
msg.Printf( wxT( "FOOTPRINT_EDIT_FRAME::OnRightClick Error: unknown DrawType %d" ),
item->Type() );
DisplayError( this, msg );
break;
}
PopMenu->AppendSeparator();
}
if( ( GetToolId() == ID_MODEDIT_LINE_TOOL ) ||
( GetToolId() == ID_MODEDIT_CIRCLE_TOOL ) ||
( GetToolId() == ID_MODEDIT_ARC_TOOL ) )
{
AddMenuItem( PopMenu, ID_POPUP_MODEDIT_ENTER_EDGE_WIDTH, _("Set Line Width" ),
KiBitmap( width_segment_xpm ) );
PopMenu->AppendSeparator();
}
return true;
}
/*
* Called on a mouse left button double click
*/
void FOOTPRINT_EDIT_FRAME::OnLeftDClick( wxDC* DC, const wxPoint& MousePos )
{
BOARD_ITEM* item = GetCurItem();
switch( GetToolId() )
{
case ID_NO_TOOL_SELECTED:
if( ( item == NULL ) || ( item->GetFlags() == 0 ) )
{
item = ModeditLocateAndDisplay();
}
if( ( item == NULL ) || ( item->GetFlags() != 0 ) )
break;
// Item found
SetCurItem( item );
OnEditItemRequest( DC, item );
break; // end case 0
case ID_PCB_ADD_LINE_BUTT:
{
if( item && item->IsNew() )
{
End_Edge_Module( (EDGE_MODULE*) item );
SetCurItem( NULL );
m_canvas->Refresh();
}
break;
}
default:
break;
}
}
void FOOTPRINT_EDIT_FRAME::OnEditItemRequest( wxDC* aDC, BOARD_ITEM* aItem )
{
switch( aItem->Type() )
{
case PCB_PAD_T:
InstallPadOptionsFrame( static_cast<D_PAD*>( aItem ) );
m_canvas->MoveCursorToCrossHair();
break;
case PCB_MODULE_T:
{
DIALOG_MODULE_MODULE_EDITOR dialog( this, static_cast<MODULE*>( aItem ) );
int ret = dialog.ShowModal();
GetScreen()->GetCurItem()->ClearFlags();
m_canvas->MoveCursorToCrossHair();
if( ret > 0 )
m_canvas->Refresh();
}
break;
case PCB_MODULE_TEXT_T:
InstallTextModOptionsFrame( static_cast<TEXTE_MODULE*>( aItem ), aDC );
m_canvas->MoveCursorToCrossHair();
break;
case PCB_MODULE_EDGE_T :
m_canvas->MoveCursorToCrossHair();
InstallFootprintBodyItemPropertiesDlg( static_cast<EDGE_MODULE*>( aItem ) );
m_canvas->Refresh();
break;
default:
break;
}
}
|