xtd 0.2.0
splitter.h
Go to the documentation of this file.
1 #pragma once
5 #include "control.h"
6 #include "splitter_style.h"
7 #include <xtd/argument_exception>
8 
10 namespace xtd {
12  namespace forms {
24  class forms_export_ splitter : public xtd::forms::control {
25  struct data;
26 
27  public:
29 
32  splitter();
34 
36 
48  control& dock(dock_style dock) override;
49 
52  virtual int32 min_size() const noexcept;
56  virtual splitter& min_size(int32 min_size);
57 
60  virtual xtd::forms::splitter_style splitter_style() const noexcept;
66 
68 
70  using control::create;
76  static splitter create(dock_style dockt, const drawing::point& location = {-1, -1}, const drawing::size& size = {-1, -1}, const xtd::ustring& name = xtd::ustring::empty_string);
83  static splitter create(const control& parent, dock_style dock, const drawing::point& location = {-1, -1}, const drawing::size& size = {-1, -1}, const xtd::ustring& name = xtd::ustring::empty_string);
85 
86  protected:
88 
90  forms::cursor default_cursor() const noexcept override;
91  drawing::size default_size() const noexcept override;
93 
95 
97  void on_handle_created(const event_args& e) override;
98  void on_mouse_down(const mouse_event_args& e) override;
99  void on_mouse_move(const mouse_event_args& e) override;
100  void on_mouse_up(const mouse_event_args& e) override;
102 
103  private:
104  std::shared_ptr<data> data_;
105  };
106  }
107 }
Contains xtd::forms::splitter_style enum class.
Represents the base class for classes that contain event data, and provides a value to use for events...
Definition: event_args.h:18
Represents an ordered pair of integer x- and y-coordinates that defines a point in a two-dimensional ...
Definition: point.h:54
Stores an ordered pair of integers, which specify a height and width.
Definition: size.h:31
The xtd namespace contains all fundamental classes to access Hardware, Os, System, and more.
Definition: system_report.h:17
Represents text as a sequence of UTF-8 code units.
Definition: ustring.h:46
Represents the image used to paint the mouse pointer.
Definition: cursor.h:38
static control create(const drawing::point &location={-1, -1}, const drawing::size &size={-1, -1}, const xtd::ustring &name=xtd::ustring::empty_string)
A factory to create a specified control with specified location, size, and name.
virtual dock_style dock() const noexcept
Gets which control borders are docked to its parent control and determines how a control is resized w...
Defines the base class for controls, which are components with visual representation.
Definition: control.h:78
int_least32_t int32
Represents a 32-bit signed integer.
Definition: types.h:129
dock_style
Specifies the position and manner in which a control is docked.
Definition: dock_style.h:21
Provides data for the xtd::forms::control::mouse_up, xtd::forms::control::mouse_down, and xtd::forms::control::mouse_move events.
Definition: mouse_event_args.h:32
Contains xtd::forms::control control.
splitter_style
Represent splitter style used by splitter control.
Definition: splitter_style.h:19
The xtd::forms namespace contains classes for creating Windows-based applications that take full adva...
Definition: about_box.h:13
static const ustring empty_string
Represents the empty string.
Definition: ustring.h:53
Specifies that both the x and y coordinates of the control are defined.
size_t size
Represents a size of any object in bytes.
Definition: types.h:195
Represents a splitter control that enables the user to resize docked controls.
Definition: splitter.h:24