ARB
AliAdmin.cxx
Go to the documentation of this file.
1 // ============================================================== //
2 // //
3 // File : AliAdmin.cxx //
4 // Purpose : Provide alignment admin functionality //
5 // to NTREE and MERGE //
6 // //
7 // Coded by Ralf Westram (coder@reallysoft.de) in August 2014 //
8 // http://www.arb-home.de/ //
9 // //
10 // ============================================================== //
11 
12 #include "AliAdmin.h"
13 #include <cctype>
14 #include <aw_window.hxx>
15 
16 static struct {
17  const char *id, *title;
19  { "ALIGNMENT", "alignment" },
20  { "SOURCE_ALIGNMENT", "source alignment" },
21  { "TARGET_ALIGNMENT", "target alignment" },
22 };
23 
24 void AliAdmin::window_init(AW_window_simple *aw, const char *id_templ, const char *title_templ) const {
25  char *id = GBS_global_string_copy(id_templ, ALIGNMENT[type].id);
26  char *title = GBS_global_string_copy(title_templ, ALIGNMENT[type].title);
27 
28  title[0] = toupper(title[0]);
29 
30  aw->init(AW_root::SINGLETON, id, title);
31 
32  free(title);
33  free(id);
34 }
35 
36 // --------------------------------------------------------------------------------
37 
const char * id
Definition: AliAdmin.cxx:17
const char * title
Definition: AliAdmin.cxx:17
static struct @34 ALIGNMENT[ALI_ADMIN_TYPES]
static AW_root * SINGLETON
Definition: aw_root.hxx:102
void window_init(class AW_window_simple *aw, const char *id_templ, const char *title_templ) const
Definition: AliAdmin.cxx:24
char * GBS_global_string_copy(const char *templat,...)
Definition: arb_msg.cxx:195