line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Kephra::Dialog::Keymap;
|
2
|
|
|
|
|
|
|
our $VERSION = '0.02';
|
3
|
|
|
|
|
|
|
|
4
|
1
|
|
|
1
|
|
1038
|
use strict;
|
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
33
|
|
5
|
1
|
|
|
1
|
|
6
|
use warnings;
|
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
502
|
|
6
|
|
|
|
|
|
|
|
7
|
|
|
|
|
|
|
|
8
|
|
|
|
|
|
|
sub keymap {
|
9
|
0
|
|
|
0
|
0
|
|
my $frame = shift;
|
10
|
|
|
|
|
|
|
|
11
|
0
|
|
|
|
|
|
elements::proton::show::keyboard_map();
|
12
|
0
|
|
|
|
|
|
return 0;
|
13
|
|
|
|
|
|
|
|
14
|
0
|
0
|
0
|
|
|
|
if ( !$Kephra::temp{keymap}{dialog_active}
|
15
|
|
|
|
|
|
|
|| $Kephra::temp{keymap}{dialog_active} == 0 ) {
|
16
|
|
|
|
|
|
|
|
17
|
|
|
|
|
|
|
# init win mit grunddesign
|
18
|
0
|
|
|
|
|
|
$Kephra::temp{'keymap'}{'dialog_active'} = 1;
|
19
|
0
|
|
|
|
|
|
my $l18n = Kephra::Localisation::strings()->{dialogs}{keyboard_map};
|
20
|
0
|
|
|
|
|
|
my $keymap_win = Wx::Frame->new(
|
21
|
|
|
|
|
|
|
$frame, -1, ' ' . $l18n->{title},
|
22
|
|
|
|
|
|
|
[ 10, 10 ], [ 420, 460 ],
|
23
|
|
|
|
|
|
|
&Wx::wxNO_FULL_REPAINT_ON_RESIZE | &Wx::wxSYSTEM_MENU | &Wx::wxCAPTION |
|
24
|
|
|
|
|
|
|
&Wx::wxMINIMIZE_BOX | &Wx::wxCLOSE_BOX | &Wx::wxRESIZE_BORDER,
|
25
|
|
|
|
|
|
|
);
|
26
|
0
|
|
|
|
|
|
$frame->{keymap_win} = $keymap_win;
|
27
|
0
|
|
|
|
|
|
Kephra::App::Window::load_icon( $keymap_win,
|
28
|
|
|
|
|
|
|
Kephra::API::settings()->{main}{icon} );
|
29
|
0
|
|
|
|
|
|
$keymap_win->SetBackgroundColour(&Wx::wxWHITE);
|
30
|
|
|
|
|
|
|
|
31
|
|
|
|
|
|
|
#my $keymap_ground = Wx::Panel->new($keymap_win, -1, [0,0], [-1,-1], ,);
|
32
|
0
|
|
|
|
|
|
my $keymap_label
|
33
|
|
|
|
|
|
|
= Wx::Panel->new( $keymap_win, -1, [ 0, 0 ], [ 100, 22 ],, );
|
34
|
0
|
|
|
|
|
|
my $sizer = Wx::BoxSizer->new(&Wx::wxVERTICAL);
|
35
|
|
|
|
|
|
|
|
36
|
|
|
|
|
|
|
#inhalt
|
37
|
0
|
|
|
|
|
|
my $keymap_list = Wx::Grid->new(
|
38
|
|
|
|
|
|
|
$keymap_win, -1,
|
39
|
|
|
|
|
|
|
[ 0, 22 ], [ -1, -1 ],
|
40
|
|
|
|
|
|
|
&Wx::wxWANTS_CHARS,,
|
41
|
|
|
|
|
|
|
);
|
42
|
0
|
|
|
|
|
|
$keymap_list->AppendCols( 3, 0 );
|
43
|
0
|
|
|
|
|
|
$keymap_list->AppendRows( 3, 0 );
|
44
|
0
|
|
|
|
|
|
$keymap_list->SetColLabelValue( 1, 'Beschreibung' );
|
45
|
0
|
|
|
|
|
|
$keymap_list->SetRowLabelValue( 2, 'Kombintion' );
|
46
|
|
|
|
|
|
|
|
47
|
|
|
|
|
|
|
#$keymap_list->AppendRows(3, 1);SetColLabelValue and SetRowLabelValue
|
48
|
0
|
|
|
|
|
|
$sizer->Add( $keymap_label, 0, &Wx::wxTOP | &Wx::wxGROW, 0 );
|
49
|
0
|
|
|
|
|
|
$sizer->Add( $keymap_list, 1, &Wx::wxBOTTOM | &Wx::wxGROW, 0 );
|
50
|
0
|
|
|
|
|
|
$keymap_win->SetSizer($sizer);
|
51
|
0
|
|
|
|
|
|
$keymap_win->SetAutoLayout(1);
|
52
|
0
|
|
|
|
|
|
$keymap_win->Centre(&Wx::wxBOTH);
|
53
|
0
|
|
|
|
|
|
$keymap_win->Show(1);
|
54
|
|
|
|
|
|
|
|
55
|
0
|
|
|
|
|
|
Wx::Event::EVT_CLOSE( $keymap_win, \&quit_keymap_dialog );
|
56
|
|
|
|
|
|
|
|
57
|
|
|
|
|
|
|
sub quit_keymap_dialog {
|
58
|
0
|
|
|
0
|
0
|
|
my ( $win, $event ) = @_;
|
59
|
|
|
|
|
|
|
|
60
|
0
|
|
|
|
|
|
$Kephra::temp{'keymap'}{'dialog_active'} = 0;
|
61
|
0
|
|
|
|
|
|
$win->Destroy();
|
62
|
|
|
|
|
|
|
}
|
63
|
|
|
|
|
|
|
|
64
|
|
|
|
|
|
|
} else {
|
65
|
0
|
|
|
|
|
|
$frame->{'keymap_win'}->Iconize(0);
|
66
|
0
|
|
|
|
|
|
$frame->{'keymap_win'}->Raise();
|
67
|
|
|
|
|
|
|
}
|
68
|
|
|
|
|
|
|
}
|
69
|
|
|
|
|
|
|
|
70
|
|
|
|
|
|
|
1;
|
71
|
|
|
|
|
|
|
|