f7ce6a4a1f53758c82aec94d4baffe0fa906ffaa
[ardour.git] / libs / glibmm2 / glibmm / optionentry.h
1 // -*- c++ -*-
2 // Generated by gtkmmproc -- DO NOT MODIFY!
3 #ifndef _GLIBMM_OPTIONENTRY_H
4 #define _GLIBMM_OPTIONENTRY_H
5
6
7 /* $Id$ */
8
9 /* Copyright (C) 2004 The glibmm Development Team
10  *
11  * This library is free software; you can redistribute it and/or
12  * modify it under the terms of the GNU Library General Public
13  * License as published by the Free Software Foundation; either
14  * version 2 of the License, or (at your option) any later version.
15  *
16  * This library is distributed in the hope that it will be useful,
17  * but WITHOUT ANY WARRANTY; without even the implied warranty of
18  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
19  * Library General Public License for more details.
20  *
21  * You should have received a copy of the GNU Library General Public
22  * License along with this library; if not, write to the Free
23  * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
24  */
25
26
27 #include <glibmm/ustring.h>
28
29 #ifndef DOXYGEN_SHOULD_SKIP_THIS
30 extern "C" { typedef struct _GOptionEntry GOptionEntry; }
31 #endif
32
33
34 namespace Glib
35 {
36
37 /** An OptionEntry defines a single option. To have an effect, it must be added to an OptionGroup with 
38  * OptionGroup::add_entry().
39  * 
40  * The long name of an option can be used to specify it in a commandline as --long_name. 
41  * Every option must have a long name. To resolve conflicts if multiple option groups contain the same long name, it is also 
42  * possible to specify the option as --groupname-long_name.
43  *
44  * If an option has a short name, it can be specified as -short_name in a commandline.
45  *
46  * The description for the option is shown in the --help  output.
47  *
48  * The arg_descripton is the placeholder to use for the extra argument parsed by the option in --help  output. 
49  */
50 class OptionEntry
51 {
52   public:
53 #ifndef DOXYGEN_SHOULD_SKIP_THIS
54   typedef OptionEntry CppObjectType;
55   typedef GOptionEntry BaseObjectType;
56 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
57
58 private:
59
60 public:
61
62   //Copied from goption.h, instead of generated, so that we can put it inside the class.
63   enum Flags
64   {
65     FLAG_HIDDEN = 1 << 0,
66     FLAG_IN_MAIN = 1 << 1,
67     FLAG_REVERSE = 1 << 2
68   } GOptionFlags;
69
70   OptionEntry();
71   OptionEntry(const OptionEntry& src);
72   virtual ~OptionEntry();
73   
74   OptionEntry& operator=(const OptionEntry& src);
75
76  
77   Glib::ustring get_long_name() const;
78   void set_long_name(const Glib::ustring& value);
79   
80   gchar get_short_name() const;
81   void set_short_name(const gchar& value);
82   
83   int get_flags() const;
84   void set_flags(const int& value);
85   
86   //TODO: G_OPTION_ARG_CALLBACK,
87     
88   Glib::ustring get_description() const;
89   void set_description(const Glib::ustring& value);
90   
91   Glib::ustring get_arg_description() const;
92   void set_arg_description(const Glib::ustring& value);
93   
94   GOptionEntry*       gobj()       { return gobject_; }
95   const GOptionEntry* gobj() const { return gobject_; }
96   
97 protected:
98
99   GOptionEntry* gobject_;
100
101
102 };
103
104 } // namespace Glib
105
106
107 #endif /* _GLIBMM_OPTIONENTRY_H */
108