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 56 57 58 59 60 61 62 63 64
|
/*
* Copyright (c) 2008, 2011, Oracle and/or its affiliates. All rights reserved.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License as
* published by the Free Software Foundation; version 2 of the
* License.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
* 02110-1301 USA
*/
#ifndef _STUB_TREEVIEW_H_
#define _STUB_TREEVIEW_H_
#include "stub_view.h"
namespace mforms {
namespace stub {
class TreeViewImpl : public ViewImpl
{
private:
TreeViewImpl(TreeView *self, mforms::TreeOptions opts);
int add_column(TreeColumnType type, const std::string &name, int initial_width, bool editable);
void end_columns();
static bool __stdcall create(TreeView *self, mforms::TreeOptions opt);
static int __stdcall add_column(TreeView *self, TreeColumnType type, const std::string &name, int width, bool editable);
static void __stdcall end_columns(TreeView *self);
static void __stdcall clear_rows(TreeView *self);
static void __stdcall delete_row(TreeView *self, int row);
static int __stdcall add_row(TreeView *self);
static int __stdcall get_selected(TreeView *self);
static void __stdcall set_selected(TreeView* self, const int idx);
static int __stdcall count(TreeView *self);
static void __stdcall set_string(TreeView *self, int row, int column, const std::string &value);
static void __stdcall set_integer(TreeView *self, int row, int column, int value);
static void __stdcall set_check(TreeView *self, int row, int column, bool check);
static std::string __stdcall get_string(TreeView *self, int row, int column);
static int __stdcall get_int(TreeView *self, int row, int column);
static bool __stdcall get_check(TreeView *self, int row, int column);
static std::string __stdcall get_row_tag(TreeView *self, int row);
static void __stdcall set_row_tag(TreeView *self, int row, const std::string &value);
static void __stdcall set_allow_sorting(TreeView *self, bool);
static void __stdcall freeze_refresh(TreeView *self, bool);
public:
static void init();
};
}
}
#endif
|