modifiable mouse wheel scroll step

This commit is contained in:
Jinhao
2016-06-27 10:36:08 +08:00
parent 3cf10ef940
commit a8219fe760
7 changed files with 60 additions and 28 deletions

View File

@@ -86,7 +86,7 @@
#define NANA_LINUX
#define NANA_X11
#else
# static_assert(false, "Only Windows and Unix are supported now (Mac OS is experimental)");
static_assert(false, "Only Windows and Unix are supported now (Mac OS is experimental)");
#endif
//Define a symbol for POSIX operating system.

View File

@@ -284,6 +284,18 @@ that return a corresponding nana::appearance with predefined values.
virtual void visible(bool visibility) = 0;
virtual bool visible() const = 0;
};//end class caret_interface
namespace parameters
{
/// The system-wide parameters for mouse wheel
struct mouse_wheel
{
unsigned lines; ///< The number of lines to scroll when the vertical mouse wheel is moved.
unsigned characters; ///< The number of characters to scroll when the horizontal mouse wheel is moved.
mouse_wheel();
};
}
}//end namespace nana
#include <nana/pop_ignore_diagnostic>

View File

@@ -575,8 +575,6 @@ namespace nana
color_proxy header_floated{ static_cast<color_rgb>(0xBABBBC)};
color_proxy item_selected{ static_cast<color_rgb>(0xD5EFFC) };
/// \todo how to implement some geometrical parameters ??
/// The max column width which is generated by fit_content is allowed. It is ignored when it is 0, or a max value is passed to fit_content.
unsigned max_fit_content{ 0 };
@@ -591,8 +589,7 @@ namespace nana
unsigned header_splitter_area_before{ 2 }; ///< def=2. But 4 is better... IMO
unsigned header_splitter_area_after { 3 }; ///< def=3. But 4 is better...
//void debug_print(const std::string &msg);
::nana::parameters::mouse_wheel mouse_wheel{}; ///< The number of lines/characters to scroll when vertical/horizontal mouse wheel is moved.
};
}
}//end namespace drawerbase

View File

@@ -28,6 +28,8 @@ namespace nana
{
color_proxy selection{static_cast<color_rgb>(0x3399FF)};
color_proxy selection_text{colors::white};
parameters::mouse_wheel mouse_wheel; ///< The number of lines/characters to scroll when the vertical/horizontal mouse wheel is moved.
};
class text_editor_event_interface