source:
tags/testbuild/SL/ALILINK/AliAdmin.cxx
Last change on this file was 12751, checked in by westram, 11 years ago | |
---|---|
File size: 1.6 KB |
Line | |
---|---|
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; |
18 | } ALIGNMENT[ALI_ADMIN_TYPES] = { |
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 | |
38 | #ifdef UNIT_TESTS |
39 | #ifndef TEST_UNIT_H |
40 | #include <test_unit.h> |
41 | #endif |
42 | |
43 | void NOTEST_dummy() { |
44 | TEST_REJECT(true); |
45 | } |
46 | |
47 | #endif // UNIT_TESTS |
48 | |
49 | // -------------------------------------------------------------------------------- |
50 |
Note: See TracBrowser
for help on using the repository browser.