File: Fl_Group.i

package info (click to toggle)
pyfltk 1.4.4.0%2Brepack-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 1,556 kB
  • sloc: python: 7,769; cpp: 356; makefile: 24
file content (55 lines) | stat: -rw-r--r-- 1,560 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
/* File : Fl_Group.i */
//%module Fl_Group

%feature("docstring") ::Fl_Group
"""
The Fl_Group class is the FLTK container widget. It maintains an array of 
child widgets. These children can themselves be any widget including Fl_Group. 
The most important subclass of Fl_Group  is Fl_Window, however groups can 
also be used to control radio buttons or to enforce resize behavior.
""" ;

%{
#include "FL/Fl_Group.H"
%}

%include "macros.i"

CHANGE_OWNERSHIP(Fl_Group)

REVERT_OWNERSHIP(Fl_Group::add)

REVERT_OWNERSHIP(Fl_Group::remove)

%ignore Fl_Group::find(const Fl_Widget*) const;
%ignore Fl_Group::add(Fl_Widget&);
%ignore Fl_Group::remove(Fl_Widget&);
%ignore Fl_Group::resizable(Fl_Widget& o);

%ignore Fl_Group::on_insert(Fl_Widget*, int idx);
%ignore Fl_Group::on_move(int a, int b);
%ignore Fl_Group::on_remove(int idx);

%rename(insert_before) Fl_Group::insert(Fl_Widget& o, Fl_Widget* before);

// needed for getting directors to work
%ignore Fl_Group::array() const;

// typemap for child method
%include <std_string.i>

%typemap(out) Fl_Widget * Fl_Group::child {
  const std::string lookup_typename = std::string("_p_") + std::string(reinterpret_cast<CallbackStruct*>($1->user_data())->type_name);
  //printf("Type = %s\n", lookup_typename.c_str());
  swig_type_info * const outtype = SWIG_TypeQuery(lookup_typename.c_str());
  //if (outtype == 0)
  //  printf("SWIG Type not found\n");
  //else
  //  printf("Swig Type = %s\n", outtype->str);
  $result = SWIG_NewPointerObj(SWIG_as_voidptr($1), outtype, $owner);
}


%include "FL/Fl_Group.H"