OpenASIP  2.0
GUITextGenerator.cc
Go to the documentation of this file.
1 /*
2  Copyright (c) 2002-2009 Tampere University.
3 
4  This file is part of TTA-Based Codesign Environment (TCE).
5 
6  Permission is hereby granted, free of charge, to any person obtaining a
7  copy of this software and associated documentation files (the "Software"),
8  to deal in the Software without restriction, including without limitation
9  the rights to use, copy, modify, merge, publish, distribute, sublicense,
10  and/or sell copies of the Software, and to permit persons to whom the
11  Software is furnished to do so, subject to the following conditions:
12 
13  The above copyright notice and this permission notice shall be included in
14  all copies or substantial portions of the Software.
15 
16  THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
19  THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
21  FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
22  DEALINGS IN THE SOFTWARE.
23  */
24 /**
25  * @file GUITextGenerator.cc
26  *
27  * Implementation of the GUITextGenerator class.
28  *
29  * @author Veli-Pekka Jääskeläinen 2004 (vjaaskel-no.spam-cs.tut.fi)
30  */
31 
32 #include "GUITextGenerator.hh"
33 #include "WxConversion.hh"
34 
36 
37 /**
38  * The Constructor.
39  *
40  * Initializes string templates to the text generator.
41  */
43  addText(TXT_BUTTON_ADD, "Add");
44  addText(TXT_BUTTON_ADD_DIALOG, "Add...");
45  addText(TXT_BUTTON_CANCEL, "&Cancel");
46  addText(TXT_BUTTON_DELETE, "Delete");
47  addText(TXT_BUTTON_EDIT, "Edit");
48  addText(TXT_BUTTON_EDIT_DIALOG, "Edit...");
49  addText(TXT_BUTTON_HELP, "&Help");
50  addText(TXT_BUTTON_OK, "&OK");
51 }
52 
53 
54 /**
55  * The Destructor.
56  */
58 }
59 
60 
61 /**
62  * Returns the only instance of this class.
63  *
64  * @return The singleton instance of GUITextGenerator class.
65  */
68  if (instance_ == NULL) {
70  }
71  return instance_;
72 }
73 
74 
75 /**
76  * Deletes the instance of this command if one exists.
77  */
78 void
80  if (instance_ != NULL) {
81  delete instance_;
82  instance_ = NULL;
83  }
84 }
GUITextGenerator::GUITextGenerator
GUITextGenerator()
Definition: GUITextGenerator.cc:42
GUITextGenerator::instance
static GUITextGenerator * instance()
Definition: GUITextGenerator.cc:67
GUITextGenerator::~GUITextGenerator
~GUITextGenerator()
Definition: GUITextGenerator.cc:57
GUITextGenerator
Definition: GUITextGenerator.hh:46
GUITextGenerator::TXT_BUTTON_HELP
@ TXT_BUTTON_HELP
Label for help button.
Definition: GUITextGenerator.hh:60
GUITextGenerator::TXT_BUTTON_CANCEL
@ TXT_BUTTON_CANCEL
Label for cancel button.
Definition: GUITextGenerator.hh:55
Texts::TextGenerator::addText
virtual void addText(int textId, const std::string &templateString)
Definition: TextGenerator.cc:118
GUITextGenerator::instance_
static GUITextGenerator * instance_
Definition: GUITextGenerator.hh:66
GUITextGenerator::TXT_BUTTON_ADD
@ TXT_BUTTON_ADD
Label for an add button.
Definition: GUITextGenerator.hh:53
GUITextGenerator::TXT_BUTTON_DELETE
@ TXT_BUTTON_DELETE
Label for delete button.
Definition: GUITextGenerator.hh:56
GUITextGenerator.hh
GUITextGenerator::TXT_BUTTON_ADD_DIALOG
@ TXT_BUTTON_ADD_DIALOG
Label for add button (with trailing ...).
Definition: GUITextGenerator.hh:54
GUITextGenerator::TXT_BUTTON_EDIT_DIALOG
@ TXT_BUTTON_EDIT_DIALOG
Label for edit button (with trailing ...).
Definition: GUITextGenerator.hh:58
GUITextGenerator::destroy
static void destroy()
Definition: GUITextGenerator.cc:79
WxConversion.hh
GUITextGenerator::TXT_BUTTON_EDIT
@ TXT_BUTTON_EDIT
Label for edit button.
Definition: GUITextGenerator.hh:57
GUITextGenerator::TXT_BUTTON_OK
@ TXT_BUTTON_OK
Label for OK button.
Definition: GUITextGenerator.hh:59