add OFN_NOCHANGEDIR flag to OPENFILENAME::Flags in nana::filebox::show
http://blogs.msdn.com/b/oldnewthing/archive/2010/11/12/10089878.aspx setting OFN_NOCHANGEDIR flag to OPENFILENAME::Flags is effective for GetOpenFileName API on Windows7. add const qualifier to nana::paint::graphics::save_as_file add support for small icon on Windows. The system displays the large icon in the ALT+TAB dialog box, and the small icon in the window caption. https://msdn.microsoft.com/en-us/library/windows/desktop/ms632643%28v=vs.85%29.aspx
This commit is contained in:
@@ -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);
|
||||
|
||||
@@ -112,7 +112,6 @@ namespace detail
|
||||
void signal_fire_caption(core_window_t*, const nana::char_t*);
|
||||
nana::string signal_fire_caption(core_window_t*);
|
||||
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*);
|
||||
@@ -133,7 +132,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
|
||||
|
||||
@@ -120,7 +120,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.
|
||||
void enable_dropfiles(window, bool);
|
||||
|
||||
@@ -75,6 +75,12 @@ namespace nana{ namespace paint
|
||||
this->close();
|
||||
}
|
||||
|
||||
bool open(void* buff, size_t sz)
|
||||
{
|
||||
// TODO: read a BMP file from memory
|
||||
return false;
|
||||
}
|
||||
|
||||
bool open(const nana::char_t* filename)
|
||||
{
|
||||
if(nullptr == filename) return false;
|
||||
|
||||
@@ -23,6 +23,7 @@ namespace nana{ namespace paint
|
||||
image_ico(bool is_ico);
|
||||
|
||||
bool open(const nana::char_t* filename);
|
||||
bool open(void* buff, size_t sz);
|
||||
bool alpha_channel() const;
|
||||
bool empty() const;
|
||||
void close();
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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&);
|
||||
|
||||
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user