~ubuntu-branches/ubuntu/quantal/mysql-workbench/quantal

« back to all changes in this revision

Viewing changes to backend/wbpublic/wbcanvas/table_figure_idef1x.h

  • Committer: Package Import Robot
  • Author(s): Dmitry Smirnov
  • Date: 2012-03-01 21:57:30 UTC
  • Revision ID: package-import@ubuntu.com-20120301215730-o7y8av8y38n162ro
Tags: upstream-5.2.38+dfsg
ImportĀ upstreamĀ versionĀ 5.2.38+dfsg

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/* 
 
2
 * Copyright (c) 2007, 2011, Oracle and/or its affiliates. All rights reserved.
 
3
 *
 
4
 * This program is free software; you can redistribute it and/or
 
5
 * modify it under the terms of the GNU General Public License as
 
6
 * published by the Free Software Foundation; version 2 of the
 
7
 * License.
 
8
 * 
 
9
 * This program 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 should have received a copy of the GNU General Public License
 
15
 * along with this program; if not, write to the Free Software
 
16
 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
 
17
 * 02110-1301  USA
 
18
 */
 
19
#ifndef _TABLE_FIGURE_IDEF1X_H_
 
20
#define _TABLE_FIGURE_IDEF1X_H_
 
21
 
 
22
#include "table_figure.h"
 
23
 
 
24
namespace wbfig {
 
25
 
 
26
class Separator : public mdc::Figure
 
27
{
 
28
public:
 
29
  Separator(mdc::Layer *layer) : mdc::Figure(layer) { _top_empty= false; _bottom_empty= false; }
 
30
 
 
31
  virtual void draw_contents(mdc::CairoCtx *cr);
 
32
 
 
33
  virtual MySQL::Geometry::Size calc_min_size();
 
34
  void set_top_empty(bool flag);
 
35
  void set_bottom_empty(bool flag);
 
36
 
 
37
protected:
 
38
  bool _top_empty;
 
39
  bool _bottom_empty;
 
40
};
 
41
 
 
42
 
 
43
 
 
44
class Idef1xTable : public Table
 
45
{
 
46
public:
 
47
  Idef1xTable(mdc::Layer *layer, FigureEventHub *hub, const model_ObjectRef &self);
 
48
 
 
49
  virtual void set_color(const MySQL::Drawing::Color &color);
 
50
  virtual void set_dependant(bool flag);
 
51
  
 
52
  virtual ItemList::iterator begin_columns_sync();
 
53
 
 
54
  virtual ItemList::iterator sync_next_column(ItemList::iterator iter,
 
55
                                              const std::string &id,
 
56
                                              ColumnFlags flags,
 
57
                                              const std::string &text);
 
58
 
 
59
  virtual void end_columns_sync(ItemList::iterator iter);
 
60
 
 
61
 
 
62
  virtual ItemList::iterator begin_indexes_sync() { return ItemList::iterator(); }
 
63
  virtual ItemList::iterator sync_next_index(ItemList::iterator iter,
 
64
                                      const std::string &id,
 
65
                                      const std::string &text)  { return ItemList::iterator(); }
 
66
  virtual void end_indexes_sync(ItemList::iterator iter) { }
 
67
 
 
68
  
 
69
  virtual ItemList::iterator begin_triggers_sync() { return ItemList::iterator(); }
 
70
  virtual ItemList::iterator sync_next_trigger(ItemList::iterator iter,
 
71
                                      const std::string &id,
 
72
                                      const std::string &text) { return ItemList::iterator(); }
 
73
  virtual void end_triggers_sync(ItemList::iterator iter) { }
 
74
 
 
75
  virtual ItemList *get_columns() { return &_columns; }
 
76
 
 
77
protected:
 
78
  mdc::Box _column_box;
 
79
  std::set<std::string> _unique_oids;
 
80
  Separator _separator;
 
81
 
 
82
  ItemList _columns;
 
83
 
 
84
  virtual void end_sync(mdc::Box &box, ItemList &list, ItemList::iterator iter);
 
85
};
 
86
 
 
87
};
 
88
  
 
89
#endif /* _TABLE_FIGURE_IDEF1X_H_ */