Class: DFC::Window
Overview
WIN32窗口相关操作
Class Method Summary # collapse
-
.close(handle) ⇒ Boolean
Close window.
-
.cmd_exec(cmdline) ⇒ Boolean
同步执行cmd命令 隐藏窗口.
-
.get_caption(handle) ⇒ String
Get window text.
-
.get_class_long(handle, index) ⇒ Fixnum
Get class long.
-
.get_cursor_color ⇒ Array
获取当前鼠标位置屏幕RGB.
-
.get_layered_attributes(handle) ⇒ Array<(Array<Fixnum>, Fixnum, Fixnum)>
Get layered attributes of a window.
-
.get_long(handle, index) ⇒ Fixnum
Get window long.
-
.get_menu(handle) ⇒ Fixnum?
Get window menu.
-
.get_origin(handle) ⇒ Array<Fixnum>
Get coordinates of the upper-left corner of a window.
-
.get_rect(handle) ⇒ Array<Fixnum>
Get upper-left and lower-right coordinates of a window in screen coordinates, relative to the upper-left corner of the screen.
-
.get_size(handle) ⇒ Array<Fixnum>
Get size of a window.
-
.get_unique_code ⇒ String
获取电脑唯一码.
-
.is_active?(handle) ⇒ Boolean
Determine whether window is active.
-
.is_child?(handle, parent_handle) ⇒ Boolean
Determine whether window is a child window of a specific parent window.
-
.is_maximized?(handle) ⇒ Boolean
Determine whether window is maximized.
-
.is_minimized?(handle) ⇒ Boolean
Determine whether window is minimized.
-
.is_restored?(handle) ⇒ Boolean
Determine whether window is restored; not maximized nor minimized.
-
.is_unicode?(handle) ⇒ Boolean
Determine whether window is unicode.
-
.is_valid?(handle) ⇒ Boolean
Determine whether handle is a reference to a valid window.
-
.is_visible?(handle) ⇒ Boolean
Determine whether window is visible.
-
.open_panel(path, is_mul = false, flter = "所有文件|*.*||", title = nil, parent = DFC::SketchupUtil.get_main_window) ⇒ Hash
(also: mul_file_choose)
文件打开多选对话框.
-
.peek_message(handle, msg_filter_min, msg_filter_max, remove_flag) ⇒ Array?
Peek message of a specific window.
-
.post_message(handle, message, wParam, lParam) ⇒ Boolean
Post message to a specific window.
-
.save_panel(path, flter = "所有文件|*.*||", title = nil, parent = DFC::SketchupUtil.get_main_window) ⇒ String
文件保存对话框.
-
.send_message(handle, message, wParam, lParam) ⇒ Fixnum
Send message to a specific window.
-
.set_caption(handle, caption) ⇒ Boolean
Set window text.
-
.set_class_long(handle, index, long) ⇒ Fixnum
Set class long.
-
.set_layered_attributes(handle, color, opacity, flags) ⇒ Boolean
Set layered attributes of a window.
-
.set_long(handle, index, long) ⇒ Fixnum
Set window long.
-
.set_menu(handle, menu_handle) ⇒ Boolean
Set window menu.
-
.set_origin(handle, x, y, b_activate = true) ⇒ Boolean
Set coordinates of the upper-left corner of a window.
-
.set_pos(handle, handle_insert_after, x, y, cx, cy, flags) ⇒ Boolean
Set window position.
-
.set_rect(handle, x1, y1, x2, y2, b_activate = true) ⇒ Boolean
Set upper-left and lower-right coordinates of a window.
-
.show(handle, state) ⇒ Boolean
Set show state of a window.
Class Method Details
↑ .close(handle) ⇒ Boolean
This function behaves the same way as clicking the ‘X’ button.
Close window.
↑ .cmd_exec(cmdline) ⇒ Boolean
同步执行cmd命令 隐藏窗口
↑ .get_caption(handle) ⇒ String
Get window text.
↑ .get_class_long(handle, index) ⇒ Fixnum
Get class long.
↑ .get_cursor_color ⇒ Array
获取当前鼠标位置屏幕RGB
↑ .get_layered_attributes(handle) ⇒ Array<(Array<Fixnum>, Fixnum, Fixnum)>
Get layered attributes of a window.
↑ .get_long(handle, index) ⇒ Fixnum
Get window long.
↑ .get_menu(handle) ⇒ Fixnum?
Get window menu.
↑ .get_origin(handle) ⇒ Array<Fixnum>
Get coordinates of the upper-left corner of a window.
↑ .get_rect(handle) ⇒ Array<Fixnum>
Get upper-left and lower-right coordinates of a window in screen coordinates, relative to the upper-left corner of the screen.
↑ .get_size(handle) ⇒ Array<Fixnum>
Get size of a window.
↑ .get_unique_code ⇒ String
获取电脑唯一码
↑ .is_active?(handle) ⇒ Boolean
Determine whether window is active.
↑ .is_child?(handle, parent_handle) ⇒ Boolean
Determine whether window is a child window of a specific parent window.
↑ .is_maximized?(handle) ⇒ Boolean
Determine whether window is maximized.
↑ .is_minimized?(handle) ⇒ Boolean
Determine whether window is minimized.
↑ .is_restored?(handle) ⇒ Boolean
Determine whether window is restored; not maximized nor minimized.
↑ .is_unicode?(handle) ⇒ Boolean
Determine whether window is unicode.
↑ .is_valid?(handle) ⇒ Boolean
Determine whether handle is a reference to a valid window.
↑ .is_visible?(handle) ⇒ Boolean
Determine whether window is visible.
↑ .open_panel(path, is_mul = false, flter = "所有文件|*.*||", title = nil, parent = DFC::SketchupUtil.get_main_window) ⇒ Hash Also known as: mul_file_choose
文件打开多选对话框
↑ .peek_message(handle, msg_filter_min, msg_filter_max, remove_flag) ⇒ Array?
Peek message of a specific window.
↑ .post_message(handle, message, wParam, lParam) ⇒ Boolean
Post message to a specific window.
↑ .save_panel(path, flter = "所有文件|*.*||", title = nil, parent = DFC::SketchupUtil.get_main_window) ⇒ String
文件保存对话框
↑ .send_message(handle, message, wParam, lParam) ⇒ Fixnum
Send message to a specific window.
↑ .set_caption(handle, caption) ⇒ Boolean
Set window text.
↑ .set_class_long(handle, index, long) ⇒ Fixnum
Set class long.
↑ .set_layered_attributes(handle, color, opacity, flags) ⇒ Boolean
Set layered attributes of a window.
↑ .set_long(handle, index, long) ⇒ Fixnum
Set window long.
↑ .set_menu(handle, menu_handle) ⇒ Boolean
Set window menu.
↑ .set_origin(handle, x, y, b_activate = true) ⇒ Boolean
Set coordinates of the upper-left corner of a window.
↑ .set_pos(handle, handle_insert_after, x, y, cx, cy, flags) ⇒ Boolean
Set window position.
↑ .set_rect(handle, x1, y1, x2, y2, b_activate = true) ⇒ Boolean
Set upper-left and lower-right coordinates of a window.
↑ .show(handle, state) ⇒ Boolean
Set show state of a window.