~ubuntu-branches/ubuntu/precise/atkmm1.6/precise

« back to all changes in this revision

Viewing changes to atk/src/table.ccg

  • Committer: Bazaar Package Importer
  • Author(s): Krzysztof Klimonda
  • Date: 2010-11-02 20:35:53 UTC
  • Revision ID: james.westby@ubuntu.com-20101102203553-syno2w6yedmcdgk8
Tags: upstream-2.22.1
ImportĀ upstreamĀ versionĀ 2.22.1

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
// -*- c++ -*-
 
2
/* $Id: table.ccg,v 1.1 2003/01/21 13:37:07 murrayc Exp $ */
 
3
 
 
4
/* Copyright 1998-2002 The gtkmm Development Team
 
5
 *
 
6
 * This library is free software; you can redistribute it and/or
 
7
 * modify it under the terms of the GNU Lesser General Public
 
8
 * License as published by the Free Software Foundation; either
 
9
 * version 2.1 of the License, or (at your option) any later version.
 
10
 *
 
11
 * This library is distributed in the hope that it will be useful,
 
12
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 
13
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 
14
 * Lesser General Public License for more details.
 
15
 *
 
16
 * You should have received a copy of the GNU Lesser General Public
 
17
 * License along with this library; if not, write to the Free
 
18
 * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
 
19
 */
 
20
 
 
21
#include <atkmm/object.h>
 
22
#include <atk/atktable.h>
 
23
 
 
24
 
 
25
namespace Atk
 
26
{
 
27
 
 
28
Glib::ArrayHandle<int> Table::get_selected_columns() const
 
29
{
 
30
  int* selected = 0;
 
31
  const int n_selected = atk_table_get_selected_columns(const_cast<AtkTable*>(gobj()), &selected);
 
32
 
 
33
  return Glib::ArrayHandle<int>(selected, n_selected, Glib::OWNERSHIP_SHALLOW);
 
34
}
 
35
 
 
36
Glib::ArrayHandle<int> Table::get_selected_rows() const
 
37
{
 
38
  int* selected = 0;
 
39
  const int n_selected = atk_table_get_selected_rows(const_cast<AtkTable*>(gobj()), &selected);
 
40
 
 
41
  return Glib::ArrayHandle<int>(selected, n_selected, Glib::OWNERSHIP_SHALLOW);
 
42
}
 
43
 
 
44
} // namespace Atk
 
45