### In Files

- rumix/application.rb
- rumix/config.rb
- rumix/const.rb
- rumix/function.rb
- rumix/registry.rb
- rumix/wx.rb

### Namespace

- Module Rumix::Widget
- Class Rumix::Application
- Class Rumix::Config
- Class Rumix::Registry

### Methods

- base_dir
- delete_delay_until_reboot
- delete_directory_recursively
- run_on_thread
- start_menu_dir_path
- stop_running_thread
- system_folder_path

### Files

- wxruby2.lib

### Class Index

Quicksearch

- Wx
- Wx::AcceleratorTable
- Wx::Animation
- Wx::App
- Wx::ArtProvider
- Wx::AuiNotebook
- Wx::Bitmap
- Wx::BusyCursor
- Wx::CheckListBox
- Wx::Choice
- Wx::ClientDC
- Wx::Clipboard
- Wx::Colour
- Wx::ComboBox
- Wx::CommandEvent
- Wx::ControlWithItems
- Wx::DC
- Wx::Event
- Wx::EvtHandler
- Wx::Font
- Wx::Grid
- Wx::HelpController
- Wx::HelpControllerHelpProvider
- Wx::HelpProvider
- Wx::HtmlHelpController
- Wx::HtmlWindow
- Wx::Icon
- Wx::IconBundle
- Wx::Image
- Wx::ImageList
- Wx::KeywordConstructor
- Wx::KeywordConstructor::ClassMethods
- Wx::ListBox
- Wx::ListCtrl
- Wx::Locale
- Wx::MediaCtrl
- Wx::Menu
- Wx::MenuItem
- Wx::Notebook
- Wx::Object
- Wx::PaintDC
- Wx::Point
- Wx::PreviewFrame
- Wx::Rect
- Wx::RichTextCtrl
- Wx::SimpleHelpProvider
- Wx::Size
- Wx::Sizer
- Wx::Sound
- Wx::StandardPaths
- Wx::TextCtrl
- Wx::TextUrlEvent
- Wx::Timer
- Wx::ToolBar
- Wx::ToolBarTool
- Wx::TreeCtrl
- Wx::Window
- Wx::XmlResource
- Rumix
- Rumix::Application
- Rumix::Config
- Rumix::Registry
- Rumix::Widget
- Rumix::Widget::CheckOptionPanel
- Rumix::Widget::OptionItem
- Rumix::Widget::OptionPanel
- Rumix::Widget::RadioOptionPanel
- Rumix::Widget::TitleText
- ROpt
- ROpt::ArgumentParser
- ROpt::ParseResult
- Uconv
- Uconv::Error
- Enumerable
- File
- Ini
- Kernel
- Module
- Object
- Pathname
- WxConstructor
- WxRubyStyleAccessors

No matching classes.

# Rumix

encoding: utf-8

### Constants

Tool
  (Not documented)
VERSION_NUMBER
  (Not documented)
VERSION
  (Not documented)
TOOL_LIST_RUBY18
  (Not documented)
TOOL_LIST_RUBY191
  (Not documented)
COPY_OPTIONS
  (Not documented)
CUI_HELP_SENTENCE
  (Not documented)
ZIP_CHUNK_SIZE
  (Not documented)

### Public Class Methods

base_dir() click to toggle source

(Not documented)

    # File rumix/function.rb, line 8
            def self.base_dir
                    if defined?(ExerbRuntime) then
                            File.expand_path(File.dirname(ExerbRuntime.filepath))
                    else
                            Dir.pwd
                    end
            end

delete_delay_until_reboot(path) click to toggle source

(Not documented)

    # File rumix/function.rb, line 77
            def self.delete_delay_until_reboot(path)
                    movefile_delay_until_reboot = 4

                    begin
                            api = Win32API.new('kernel32', 'MoveFileEx', %w(p i i), 'i')
                    rescue
                            return false
                    end

                    ret = api.call("#{path}\0", 0, movefile_delay_until_reboot)

                    return(ret != 0)
            end

delete_directory_recursively(dir_name, real_operating = false, entries_buffer = [], &block) click to toggle source

(Not documented)

    # File rumix/function.rb, line 30
            def self.delete_directory_recursively(dir_name, real_operating = false, entries_buffer = [], &block)
                    # 配列が渡された場合
                    if dir_name.kind_of?(Array) then
                            dir_name.each do |real_dir_name|
                                    delete_directory_recursively(real_dir_name, real_operating, entries_buffer, &block)
                            end

                            return entries_buffer
                    end

                    path = Pathname.new(dir_name)
                    if path.directory? then
                            path.children.each do |entry|
                                    entry = entry.to_s
                                    if File.directory?(entry) then
                                            delete_directory_recursively(entry, real_operating, entries_buffer, &block)
                                            block.call(:directory_ready, entry) if block
                                            Dir.rmdir(entry) if real_operating
                                            block.call(:directory, entry) if block
                                            entries_buffer << entry
                                    elsif File.file?(entry) then
                                            block.call(:file_ready, entry) if block
                                            if real_operating then
                                                    begin
                                                            File.unlink(entry)
                                                    rescue Errno::EACCES
                                                            # 実行中ファイルにアクセスした場合
                                                            if delete_delay_until_reboot(entry) then
                                                                    block.call(:delayed_deleting_success, entry) if block
                                                            else
                                                                    block.call(:delayed_deleting_failure, entry) if block
                                                            end
                                                    end
                                            end
                                            block.call(:file, entry) if block
                                            entries_buffer << entry
                                    else
                                            raise "#{entry} is not file and not directory. (unknown type entry)"
                                    end
                            end
                    end

                    return entries_buffer
            end

run_on_thread(&proc) click to toggle source

(Not documented)

    # File rumix/wx.rb, line 7
            def self.run_on_thread(&proc)
                    stop_running_thread

                    Thread.abort_on_exception = true

                    thread = Thread.new{
                            begin
                                    proc.call
                            rescue Exception
                                    open(File.join(Rumix.base_dir, 'operation_error.log'), 'w'){|f|
                                            f.puts $!.to_s
                                            f.puts $!.backtrace
                                    }
                                    Kernel.raise $!
                            end
                    }
                    timer = Wx::Timer.every(1) do
                            Thread.pass
                    end

                    @running_thread = thread
                    @running_timer = timer

                    return thread
            end

stop_running_thread() click to toggle source

(Not documented)

    # File rumix/wx.rb, line 33
            def self.stop_running_thread
                    if @running_thread then
                            @running_thread.kill
                    end

                    if @running_timer then
                            @running_timer.stop
                    end
            end

system_folder_path() click to toggle source

(Not documented)

    # File rumix/function.rb, line 21
            def self.system_folder_path
                    size = 512
                    re = "\0" * size
                    Win32API.new('kernel32', 'GetSystemDirectory', 'PL', 'L').call(re, size)
                    re.delete!("\0")

                    re
            end

Disabled; run with $DEBUG to generate this.

[Validate]

Generated with the Darkfish Rdoc Generator 1.1.6.