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
42
VSeparator
(
int
count
){
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
62
HSeparator
(
int
count
){
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_
LinkList< GtkWidget *>::current
GtkWidget * current(void)
return a pointer to the current lug
Definition:
LinkList.H:212
HSeparator::HSeparator
HSeparator(void)
Definition:
Separator.H:58
VSeparator::VSeparator
VSeparator(int count)
Definition:
Separator.H:42
LinkList< GtkWidget *>::count
long count
The number in the list.
Definition:
LinkList.H:89
VSeparator::vSepAlloc
void vSepAlloc(int count)
Definition:
Separator.H:46
HSeparator
Definition:
Separator.H:56
Separator
Definition:
Separator.H:25
LinkList< GtkWidget *>::getCount
int getCount(void)
Definition:
LinkList.H:278
Widget::show
GtkWidget * show(void)
Definition:
Widget.H:65
LinkList< GtkWidget *>::add
void add(GtkWidget * newElement)
Adds as the current element ... Added to the next of the current lug.
Definition:
LinkList.H:119
VSeparator
Definition:
Separator.H:36
HSeparator::HSeparator
HSeparator(int count)
Definition:
Separator.H:62
VSeparator::VSeparator
VSeparator(void)
Definition:
Separator.H:38
Widget::ref
GtkWidget * ref(void)
Definition:
Widget.H:51
Widget
Definition:
Widget.H:31
Widget.H
Separator::~Separator
~Separator(void)
Definition:
Separator.H:27
LinkList.H
LinkList
Definition:
LinkList.H:85
HSeparator::hSepAlloc
void hSepAlloc(int count)
Definition:
Separator.H:66
Widget::unref
void unref(void)
Definition:
Widget.H:58
gtkIOStream: /tmp/gtkiostream/include/Separator.H Source File
Support this project by purchasing our hardware.
GTK+ IOStream
Beta