gtkIOStream  1.7.0
GTK+ << C++ IOStream operators for GTK+. Now with ORBing, numerical computation, audio client and more ...
Separator.H
Go to the documentation of this file.
1 /* Copyright 2000-2018 Matt Flax <flatmax@flatmax.org>
2  This file is part of GTK+ IOStream class set
3 
4  GTK+ IOStream is free software; you can redistribute it and/or modify
5  it under the terms of the GNU General Public License as published by
6  the Free Software Foundation; either version 2 of the License, or
7  (at your option) any later version.
8 
9  GTK+ IOStream is distributed in the hope that it will be useful,
10  but WITHOUT ANY WARRANTY; without even the implied warranty of
11  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12  GNU General Public License for more details.
13 
14  You have received a copy of the GNU General Public License
15  along with GTK+ IOStream
16  */
17 #ifndef SEPARATOR_H_
18 #define SEPARATOR_H_
19 
20 #include <iomanip>
21 #include <gtk/gtk.h>
22 #include <mffm/LinkList.H>
23 #include <Widget.H>
24 
25 class Separator : public LinkList<GtkWidget *> {
26 public:
27  ~Separator(void){
28  GtkWidget *temp;
29  while (getCount()){
30  temp=remove();
31  Widget(temp).unref();
32  }
33  }
34 };
35 
36 class VSeparator : public Separator {
37 public:
38  VSeparator(void){
39  vSepAlloc(1);
40  }
41 
43  vSepAlloc(count);
44  }
45 
46  void vSepAlloc(int count){
47  for (int i=0;i<count;i++){
48  add(gtk_vseparator_new());
49  Widget w(current());
50  w.ref();
51  w.show();
52  }
53  }
54 };
55 
56 class HSeparator : public Separator {
57 public:
58  HSeparator(void){
59  hSepAlloc(1);
60  }
61 
63  hSepAlloc(count);
64  }
65 
66  void hSepAlloc(int count){
67  for (int i=0;i<count;i++){
68  add(gtk_hseparator_new());
69  Widget w(current());
70  w.ref();
71  w.show();
72  }
73  }
74 };
75 #endif //SEPARATOR_H_
HSeparator(void)
Definition: Separator.H:58
VSeparator(int count)
Definition: Separator.H:42
void vSepAlloc(int count)
Definition: Separator.H:46
GtkWidget * show(void)
Definition: Widget.H:65
HSeparator(int count)
Definition: Separator.H:62
VSeparator(void)
Definition: Separator.H:38
GtkWidget * ref(void)
Definition: Widget.H:51
Definition: Widget.H:31
~Separator(void)
Definition: Separator.H:27
void hSepAlloc(int count)
Definition: Separator.H:66
void unref(void)
Definition: Widget.H:58
gtkIOStream: /tmp/gtkiostream/include/Separator.H Source File
GTK+ IOStream  Beta