source: extensions/pLoader/trunk/src/Uploader/GUI/Layout/ImageProgress.pm @ 6738

Last change on this file since 6738 was 6738, checked in by ronosman, 14 years ago

Add a notebook to display "Preparation" and "Transfer" panels. The transfer progress list is no longer displayed as a dialog box. The photos are removed from the preparation panel when transfer begins.

File size: 2.3 KB
Line 
1package Uploader::GUI::Layout::ImageProgress;
2use Wx;
3use Uploader::GUI::ListCtrlProgress;
4use strict;
5
6use Wx qw( wxDefaultSize wxDefaultPosition wxNullAnimation wxNullFont wxBLACK );
7use Wx qw( wxID_OK wxID_APPLY wxID_SAVE wxID_SAVEAS wxID_CANCEL wxID_YES wxID_NO wxID_EXIT wxID_ABOUT wxID_HELP );
8use Wx qw( wxVERTICAL wxHORIZONTAL wxALL wxLEFT wxRIGHT wxTOP wxBOTTOM wxCENTRE wxGROW );
9use Wx qw( wxALIGN_RIGHT wxALIGN_BOTTOM wxALIGN_CENTER wxALIGN_CENTER_VERTICAL wxALIGN_CENTER_HORIZONTAL wxALIGN_LEFT);
10use Wx qw( wxLI_HORIZONTAL wxLC_REPORT wxSUNKEN_BORDER wxLC_VIRTUAL);
11use Wx::Locale qw/:default/;
12
13
14use vars qw($ID_TEXT); $ID_TEXT = 10000;
15use vars qw($ID_BUTTON); $ID_BUTTON = 10001;
16use vars qw($ID_LINE); $ID_LINE = 10002;
17use vars qw($ID_LISTCTRL); $ID_LISTCTRL = 10003;
18
19sub Init {
20    my( $parent_wnd ) = @_;
21
22#    my $panel = Wx::Panel->new($parent_wnd, -1, wxDefaultPosition, wxDefaultSize);
23    my $panel = $parent_wnd;
24   
25    my( $topsizer ) = Wx::BoxSizer->new( wxVERTICAL );
26   
27
28    $parent_wnd->listctrl(
29        Uploader::GUI::ListCtrlProgress->new( 
30            $panel, 
31            $main::ID_LISTCTRL, 
32            wxDefaultPosition, [500, 400],
33            wxLC_REPORT|wxLC_VIRTUAL
34        )
35    );
36
37    $topsizer->AddWindow( $parent_wnd->listctrl, 1, wxGROW|wxALIGN_CENTER_VERTICAL|wxALL, 5 );
38
39
40    my( $item6 ) = Wx::StaticLine->new( $panel, $main::ID_LINE, wxDefaultPosition, [20,-1], wxLI_HORIZONTAL );
41    $topsizer->AddWindow( $item6, 0, wxGROW|wxALIGN_CENTER_VERTICAL|wxALL, 5 );
42
43    my( $item7 ) = Wx::BoxSizer->new( wxHORIZONTAL );
44    my( $bt_clear ) = Wx::Button->new(
45        $panel,
46        -1,
47        gettext("Clear list"),
48        wxDefaultPosition, wxDefaultSize, 0 
49    );
50    $parent_wnd->{_bt_clear} = $bt_clear;
51
52    $item7->AddWindow( $bt_clear, 0, wxALIGN_CENTER|wxALL, 5 );
53
54    my( $bt_cancel ) = Wx::Button->new(
55        $panel,
56        -1,
57        gettext("Cancel upload"),
58        wxDefaultPosition, wxDefaultSize, 0 
59    );
60    $parent_wnd->{_bt_cancel} = $bt_cancel;
61    #$item7->AddButton( Wx::Button->new( $panel, wxID_OK, "" ) );
62    $item7->AddWindow( $bt_cancel, 0, wxALIGN_CENTER|wxALL, 5 );
63    $topsizer->Add( $item7, 0, wxGROW|wxALL, 5 );
64
65    $panel->SetSizer( $topsizer );
66    $topsizer->SetSizeHints( $parent_wnd );
67   
68    $topsizer;
69}
70
711;
Note: See TracBrowser for help on using the repository browser.