initial version
[synfig.git] / synfig-studio / trunk / src / gtkmm / onemoment.cpp
1 /*! ========================================================================
2 ** Sinfg
3 ** Template File
4 ** $Id: onemoment.cpp,v 1.1.1.1 2005/01/07 03:34:36 darco Exp $
5 **
6 ** Copyright (c) 2002 Robert B. Quattlebaum Jr.
7 **
8 ** This software and associated documentation
9 ** are CONFIDENTIAL and PROPRIETARY property of
10 ** the above-mentioned copyright holder.
11 **
12 ** You may not copy, print, publish, or in any
13 ** other way distribute this software without
14 ** a prior written agreement with
15 ** the copyright holder.
16 **
17 ** === N O T E S ===========================================================
18 **
19 ** ========================================================================= */
20
21 /* === H E A D E R S ======================================================= */
22
23 #ifdef USING_PCH
24 #       include "pch.h"
25 #else
26 #ifdef HAVE_CONFIG_H
27 #       include <config.h>
28 #endif
29
30 #include <iostream>
31 #include <string>
32
33 #include <ETL/stringf>
34
35 #include <gtkmm/image.h>
36 #include <gdkmm/pixbufloader.h>
37 #include <gtkmm/button.h>
38 #include <gtkmm/label.h>
39 #include <gtkmm/fixed.h>
40
41 #include <sinfg/general.h>
42
43 #include "onemoment.h"
44 #include "app.h"
45
46 #endif
47
48 using namespace std;
49 using namespace etl;
50 using namespace studio;
51
52 /* === M A C R O S ========================================================= */
53
54 #ifndef VERSION
55 #define VERSION "unknown"
56 #define PACKAGE "sinfgstudio"
57 #endif
58
59 #ifdef WIN32
60 #       ifdef IMAGE_DIR
61 #               undef IMAGE_DIR
62 #               define IMAGE_DIR "share\\pixmaps"
63 #       endif
64 #endif
65
66 #ifndef IMAGE_DIR
67 #       define IMAGE_DIR "/usr/local/share/pixmaps"
68 #endif
69
70 #ifndef IMAGE_EXT
71 #       define IMAGE_EXT        "png"
72 #endif
73
74 /* === G L O B A L S ======================================================= */
75
76 /* === P R O C E D U R E S ================================================= */
77
78 /* === M E T H O D S ======================================================= */
79
80 OneMoment::OneMoment(): Gtk::Window(Gtk::WINDOW_POPUP)
81 {
82         
83         // Create the Copyright Label
84         Gtk::Label *label = manage(new class Gtk::Label(_("One Moment, Please...")));
85
86         set_title(_("One Moment, Please..."));
87         set_modal(false);
88         property_window_position().set_value(Gtk::WIN_POS_CENTER);
89         set_resizable(false);
90         add(*label);
91
92         Pango::AttrList attr_list;
93         Pango::AttrInt pango_size(Pango::Attribute::create_attr_size(Pango::SCALE*16));
94         pango_size.set_start_index(0);
95         pango_size.set_end_index(64);
96         attr_list.change(pango_size);
97
98         label->set_attributes(attr_list);
99
100         label->set_size_request(400,60);
101
102         get_root_window()->set_decorations(Gdk::DECOR_BORDER);
103
104         // show everything off
105         show_all();
106         
107         present();
108         while(studio::App::events_pending())studio::App::iteration(false);
109 }
110
111 OneMoment::~OneMoment()
112 {
113         hide();
114 }