Merge branch 'develop' of https://github.com/beru/nana into beru-develop

Conflicts:
	source/gui/widgets/skeletons/text_editor.cpp
	source/gui/widgets/textbox.cpp
	source/paint/detail/image_bmp.hpp
	source/paint/detail/image_ico.hpp
This commit is contained in:
Jinhao
2015-08-01 22:08:06 +08:00
22 changed files with 322 additions and 46 deletions

View File

@@ -45,6 +45,8 @@ namespace detail
static void enable_dropfiles(native_window_type, bool);
static void enable_window(native_window_type, bool);
static bool window_icon(native_window_type, const paint::image&);
// (On Windows) The system displays the large icon in the ALT+TAB dialog box, and the small icon in the window caption.
static bool window_icon(native_window_type, const paint::image& big_icon, const paint::image& small_icon);
static void activate_owner(native_window_type);
static void activate_window(native_window_type);
static void close_window(native_window_type);

View File

@@ -85,7 +85,6 @@ namespace detail
void all_handles(std::vector<core_window_t*>&) const;
void event_filter(core_window_t*, bool is_make, event_code);
void default_icon(const nana::paint::image&);
bool available(core_window_t*);
bool available(core_window_t *, core_window_t*);
@@ -107,7 +106,10 @@ namespace detail
//@brief: Delete window handle, the handle type must be a root and a frame.
void destroy_handle(core_window_t*);
void default_icon(const paint::image&);
void default_icon(const paint::image& big_icon, const paint::image& small_icon);
void icon(core_window_t*, const paint::image&);
void icon(core_window_t*, const paint::image& big_icon, const paint::image& small_icon);
//show
//@brief: show or hide a window

View File

@@ -113,7 +113,10 @@ namespace API
}
void window_icon_default(const paint::image&);
void window_icon_default(const paint::image& big_icon, const paint::image& small_icon);
void window_icon(window, const paint::image&);
void window_icon(window, const paint::image& big_icon, const paint::image& small_icon);
bool empty_window(window); ///< Determines whether a window is existing.
bool is_window(window); ///< Determines whether a window is existing, equal to !empty_window.
bool is_destroying(window); ///< Determines whether a window is destroying

View File

@@ -65,6 +65,8 @@ namespace nana
label& format(bool); ///< Switches the format mode of the widget.
label& add_format_listener(std::function<void(command, const nana::string&)>);
void relate(widget& w); // as same as the "for" attribute of a label
/// \briefReturn the size of the text. If *allowed_width_in_pixel* is not zero, returns a
/// "corrected" size that changes lines to fit the text into the specified width
nana::size measure(unsigned allowed_width_in_pixel) const;

View File

@@ -157,8 +157,8 @@ namespace nana{ namespace widgets
void set_accept(std::function<bool(char_type)>);
void set_accept(accepts);
bool respond_char(char_type);
bool respond_key(char_type);
bool respond_char(const arg_keyboard& arg);
bool respond_key(const arg_keyboard& arg);
void typeface_changed();
@@ -286,6 +286,8 @@ namespace nana{ namespace widgets
unsigned _m_char_by_pixels(const nana::char_t*, std::size_t len, unsigned* pxbuf, int str_px, int pixels, bool is_rtl);
unsigned _m_pixels_by_char(const nana::string&, std::size_t pos) const;
static bool _m_is_right_text(const unicode_bidi::entity&);
void _handle_move_key(const arg_keyboard& arg);
private:
std::unique_ptr<editor_behavior_interface> behavior_;
undoable<command> undo_;

View File

@@ -16,6 +16,7 @@ namespace nana{ namespace paint{
typedef nana::paint::graphics& graph_reference;
virtual ~image_impl_interface() = 0; //The destructor is defined in ../image.cpp
virtual bool open(const nana::char_t* filename) = 0;
virtual bool open(void* buff, size_t sz) = 0; // reads image from memory
virtual bool alpha_channel() const = 0;
virtual bool empty() const = 0;
virtual void close() = 0;

View File

@@ -130,7 +130,7 @@ namespace nana
void setsta(); ///< Clears the status if the graphics object had been changed
void set_changed();
void release();
void save_as_file(const char*);
void save_as_file(const char*) const; // saves image as a bitmap file
void set_color(const ::nana::color&);
void set_text_color(const ::nana::color&);

View File

@@ -37,6 +37,7 @@ namespace paint
image& operator=(const image& rhs);
image& operator=(image&&);
bool open(const nana::string& filename);
bool open_icon(void* buff, size_t sz); // opens a icon from memory
bool empty() const;
operator unspecified_bool_t() const;
void close();