# :stopdoc: # This file is automatically generated by the WXRuby3 documentation # generator. Do not alter this file. # :startdoc: module Wx::GRID # GRID_AUTOSIZE = -1 # Specifier used to format the data to string for the numbers handled by {Wx::GRID::GridCellFloatRenderer} and {Wx::GRID::GridCellFloatEditor}. # # # class GridCellFloatFormat < Wx::Enum # Decimal floating point (f). # GRID_FLOAT_FORMAT_FIXED = Wx::GRID::GridCellFloatFormat.new(16) # Scientific notation (mantissa/exponent) using e character (e). # GRID_FLOAT_FORMAT_SCIENTIFIC = Wx::GRID::GridCellFloatFormat.new(32) # Use the shorter of e or f (g). # GRID_FLOAT_FORMAT_COMPACT = Wx::GRID::GridCellFloatFormat.new(64) # To use in combination with one of the above formats for the upper case version (F/E/G) # GRID_FLOAT_FORMAT_UPPER = Wx::GRID::GridCellFloatFormat.new(128) # The format used by default ({Wx::GRID::GridCellFloatFormat::GRID_FLOAT_FORMAT_FIXED}). # GRID_FLOAT_FORMAT_DEFAULT = Wx::GRID::GridCellFloatFormat.new(16) end # GridCellFloatFormat # Possible types for grid table notifications. # # # class GridTableRequest < Wx::Enum # New rows have been inserted into the table. # GRIDTABLE_NOTIFY_ROWS_INSERTED = Wx::GRID::GridTableRequest.new(2002) # New rows have been append to the table. # GRIDTABLE_NOTIFY_ROWS_APPENDED = Wx::GRID::GridTableRequest.new(2003) # Rows have been deleted from the table. # GRIDTABLE_NOTIFY_ROWS_DELETED = Wx::GRID::GridTableRequest.new(2004) # New columns have been inserted into the table. # GRIDTABLE_NOTIFY_COLS_INSERTED = Wx::GRID::GridTableRequest.new(2005) # New columns have been append to the table. # GRIDTABLE_NOTIFY_COLS_APPENDED = Wx::GRID::GridTableRequest.new(2006) # Columns have been deleted from the table. # GRIDTABLE_NOTIFY_COLS_DELETED = Wx::GRID::GridTableRequest.new(2007) end # GridTableRequest # Rendering styles supported by {Wx::GRID::Grid#render} method. # # # class GridRenderStyle < Wx::Enum # Draw grid row header labels. # GRID_DRAW_ROWS_HEADER = Wx::GRID::GridRenderStyle.new(1) # Draw grid column header labels. # GRID_DRAW_COLS_HEADER = Wx::GRID::GridRenderStyle.new(2) # Draw grid cell border lines. # GRID_DRAW_CELL_LINES = Wx::GRID::GridRenderStyle.new(4) # Draw a bounding rectangle around the rendered cell area. # GRID_DRAW_BOX_RECT = Wx::GRID::GridRenderStyle.new(8) # Draw the grid cell selection highlight if a selection is present. # GRID_DRAW_SELECTION = Wx::GRID::GridRenderStyle.new(16) # The default render style. # GRID_DRAW_DEFAULT = Wx::GRID::GridRenderStyle.new(15) end # GridRenderStyle # # EVT_GRID_CELL_LEFT_CLICK = 10051 # # EVT_GRID_CELL_RIGHT_CLICK = 10052 # # EVT_GRID_CELL_LEFT_DCLICK = 10053 # # EVT_GRID_CELL_RIGHT_DCLICK = 10054 # # EVT_GRID_LABEL_LEFT_CLICK = 10056 # # EVT_GRID_LABEL_RIGHT_CLICK = 10057 # # EVT_GRID_LABEL_LEFT_DCLICK = 10058 # # EVT_GRID_LABEL_RIGHT_DCLICK = 10059 # # EVT_GRID_ROW_SIZE = 10060 # # EVT_GRID_ROW_AUTO_SIZE = 10061 # # EVT_GRID_COL_SIZE = 10062 # # EVT_GRID_COL_AUTO_SIZE = 10063 # # EVT_GRID_RANGE_SELECTING = 10067 # # EVT_GRID_RANGE_SELECTED = 10068 # # EVT_GRID_CELL_CHANGING = 10069 # # EVT_GRID_CELL_CHANGED = 10070 # # EVT_GRID_SELECT_CELL = 10071 # # EVT_GRID_EDITOR_SHOWN = 10072 # # EVT_GRID_EDITOR_HIDDEN = 10073 # # EVT_GRID_EDITOR_CREATED = 10074 # # EVT_GRID_CELL_BEGIN_DRAG = 10055 # # EVT_GRID_ROW_MOVE = 10064 # # EVT_GRID_COL_MOVE = 10065 # # EVT_GRID_COL_SORT = 10066 # # EVT_GRID_TABBING = 10075 # {Wx::GRID::Grid} and its related classes are used for displaying and editing tabular data. # They provide a rich set of features for display, editing, and interacting with a variety of data sources. For simple applications, and to help you get started, {Wx::GRID::Grid} is the only class you need to refer to directly. It will set up default instances of the other classes and manage them for you. For more complex applications you can derive your own classes for custom grid views, grid data tables, cell editors and renderers. The wxGrid Overview has examples of simple and more complex applications, explains the relationship between the various grid classes and has a summary of the keyboard shortcuts and mouse functions provided by {Wx::GRID::Grid}. # A {Wx::GRID::GridTableBase} class holds the actual data to be displayed by a {Wx::GRID::Grid} class. One or more {Wx::GRID::Grid} classes may act as a view for one table class. The default table class is called {Wx::GRID::GridStringTable} and holds an array of strings. An instance of such a class is created by {Wx::GRID::Grid#create_grid}. # {Wx::GRID::GridCellRenderer} is the abstract base class for rendering contents in a cell. The following renderers are predefined: # # - {Wx::GRID::GridCellBoolRenderer}- {Wx::GRID::GridCellFloatRenderer}- {Wx::GRID::GridCellNumberRenderer}- {Wx::GRID::GridCellStringRenderer}- {Wx::GRID::GridCellDateRenderer}- {Wx::GRID::GridCellDateTimeRenderer} # # The look of a cell can be further defined using {Wx::GRID::GridCellAttr}. An object of this type may be returned by {Wx::GRID::GridTableBase#get_attr}. # {Wx::GRID::GridCellEditor} is the abstract base class for editing the value of a cell. The following editors are predefined: # # - {Wx::GRID::GridCellBoolEditor}- {Wx::GRID::GridCellChoiceEditor}- {Wx::GRID::GridCellFloatEditor}- {Wx::GRID::GridCellNumberEditor}- {Wx::GRID::GridCellTextEditor}- {Wx::GRID::GridCellDateEditor} # # Please see {Wx::GRID::GridEvent}, {Wx::GRID::GridSizeEvent}, {Wx::GRID::GridRangeSelectEvent}, and {Wx::GRID::GridEditorCreatedEvent} for the documentation of all event types you can use with {Wx::GRID::Grid}. # === # # Category: Grid Related Classes # @see wxGrid Overview # @see Wx::GridUpdateLocker # # class Grid < ScrolledCanvas # Different selection modes supported by the grid. # # # class GridSelectionModes < Wx::Enum # The default selection mode allowing selection of the individual cells as well as of the entire rows and columns. # GridSelectCells = Wx::GRID::Grid::GridSelectionModes.new(0) # The selection mode allowing the selection of the entire rows only. # GridSelectRows = Wx::GRID::Grid::GridSelectionModes.new(1) # The selection mode allowing the selection of the entire columns only. # GridSelectColumns = Wx::GRID::Grid::GridSelectionModes.new(2) # The selection mode allowing the user to select either the entire columns or the entire rows but not individual cells nor blocks. # GridSelectRowsOrColumns = Wx::GRID::Grid::GridSelectionModes.new(3) # The selection mode allowing no selections to be made at all. # GridSelectNone = Wx::GRID::Grid::GridSelectionModes.new(4) end # GridSelectionModes # Return values for {Wx::GRID::Grid#get_cell_size}. # # # class CellSpan < Wx::Enum # This cell is inside a span covered by another cell. # CellSpan_Inside = Wx::GRID::Grid::CellSpan.new(-1) # This is a normal, non-spanning cell. # CellSpan_None = Wx::GRID::Grid::CellSpan.new(0) # This cell spans several physical {Wx::GRID::Grid} cells. # CellSpan_Main = Wx::GRID::Grid::CellSpan.new(1) end # CellSpan # Constants defining different support built-in TAB handling behaviours. # # The elements of this enum determine what happens when TAB is pressed when the cursor is in the rightmost column (or Shift-TAB is pressed when the cursor is in the leftmost one). # @see Wx::GRID::Grid#set_tab_behaviour # @see Wx::GRID::EVT_GRID_TABBING # # class TabBehaviour < Wx::Enum # Do nothing, this is default. # Tab_Stop = Wx::GRID::Grid::TabBehaviour.new(0) # Move to the beginning of the next (or the end of the previous) row. # Tab_Wrap = Wx::GRID::Grid::TabBehaviour.new(1) # Move to the next (or the previous) control after the grid. # Tab_Leave = Wx::GRID::Grid::TabBehaviour.new(2) end # TabBehaviour # @overload initialize() # Default constructor. # You must call {Wx::GRID::Grid#create} to really create the grid window and also call {Wx::GRID::Grid#create_grid} or {Wx::GRID::Grid#set_table} or {Wx::GRID::Grid#assign_table} to initialize its contents. # @return [Grid] # @overload initialize(parent, id, pos=Wx::DEFAULT_POSITION, size=Wx::DEFAULT_SIZE, style=Wx::WANTS_CHARS, name=Wx::GRID_NAME_STR) # Constructor creating the grid window. # You must call either {Wx::GRID::Grid#create_grid} or {Wx::GRID::Grid#set_table} or {Wx::GRID::Grid#assign_table} to initialize the grid contents before using it. # @param parent [Wx::Window] # @param id [Integer] # @param pos [Array(Integer, Integer), Wx::Point] # @param size [Array(Integer, Integer), Wx::Size] # @param style [Integer] # @param name [String] # @return [Grid] def initialize(*args) end # Creates the grid window for an object initialized using the default constructor. # You must call either {Wx::GRID::Grid#create_grid} or {Wx::GRID::Grid#set_table} or {Wx::GRID::Grid#assign_table} to initialize the grid contents before using it. # @param parent [Wx::Window] # @param id [Integer] # @param pos [Array(Integer, Integer), Wx::Point] # @param size [Array(Integer, Integer), Wx::Size] # @param style [Integer] # @param name [String] # @return [true,false] def create(parent, id, pos=Wx::DEFAULT_POSITION, size=Wx::DEFAULT_SIZE, style=Wx::WANTS_CHARS, name=Wx::GRID_NAME_STR) end # Creates a grid with the specified initial number of rows and columns. # Call this directly after the grid constructor. When you use this function {Wx::GRID::Grid} will create and manage a simple table of string values for you. All of the grid data will be stored in memory. # For applications with more complex data types or relationships, or for dealing with very large datasets, you should derive your own grid table class and pass a table object to the grid with {Wx::GRID::Grid#set_table} or {Wx::GRID::Grid#assign_table}. # @param numRows [Integer] # @param numCols [Integer] # @param selmode [GridSelectionModes] # @return [true,false] def create_grid(numRows, numCols, selmode=Wx::GRID_SELECT_CELLS) end # Assigns a pointer to a custom grid table to be used by the grid. # This function is identical to {Wx::GRID::Grid#set_table} with takeOwnership parameter set to true, i.e. it simply always takes the ownership of the passed in pointer. This makes it simpler to use than {Wx::GRID::Grid#set_table} in the common case when the table should be owned by the grid object. # Note that this function should be called at most once and can't be used to change the table used by the grid later on or reset it: if such extra flexibility is needed, use {Wx::GRID::Grid#set_table} directly. # @param table [Wx::GridTableBase] The heap-allocated pointer to the table. # @param selmode [GridSelectionModes] Selection mode to use. # @return [void] def assign_table(table, selmode=Wx::GRID_SELECT_CELLS) end # Receive and handle a message from the table. # @param msg [Wx::GridTableMessage] # @return [true,false] def process_table_message(msg) end # Turns the drawing of grid lines on or off. # @param enable [true,false] # @return [void] def enable_grid_lines(enable=true) end # Returns the pen used for vertical grid lines. # This virtual function may be overridden in derived classes in order to change the appearance of individual grid lines for the given column col. # See {Wx::GRID::Grid#get_row_grid_line_pen} for an example. # @param col [Integer] # @return [Wx::Pen] def get_col_grid_line_pen(col) end alias_method :col_grid_line_pen, :get_col_grid_line_pen # Returns the pen used for grid lines. # This virtual function may be overridden in derived classes in order to change the appearance of grid lines. Note that currently the pen width must be 1. # @see Wx::GRID::Grid#get_col_grid_line_pen # @see Wx::GRID::Grid#get_row_grid_line_pen # @return [Wx::Pen] def get_default_grid_line_pen; end alias_method :default_grid_line_pen, :get_default_grid_line_pen # Returns the colour used for grid lines. # # @see Wx::GRID::Grid#get_default_grid_line_pen # @return [Wx::Colour] def get_grid_line_colour; end alias_method :grid_line_colour, :get_grid_line_colour # Returns the pen used for horizontal grid lines. # This virtual function may be overridden in derived classes in order to change the appearance of individual grid line for the given row. # Example: # # // in a grid displaying music notation, use a solid black pen between # // octaves (C0=row 127, C1=row 115 etc.) # wxPen MidiGrid::GetRowGridLinePen(int row) # { # if ( row % 12 == 7 ) # return wxPen(*wxBLACK, 1, wxPENSTYLE_SOLID); # else # return GetDefaultGridLinePen(); # } # @param row [Integer] # @return [Wx::Pen] def get_row_grid_line_pen(row) end alias_method :row_grid_line_pen, :get_row_grid_line_pen # Returns true if drawing of grid lines is turned on, false otherwise. # @return [true,false] def grid_lines_enabled; end # Sets the colour used to draw grid lines. # @param colour [Wx::Colour,String,Symbol] # @return [void] def set_grid_line_colour(colour) end alias_method :grid_line_colour=, :set_grid_line_colour # Sets the arguments to the current column label alignment values. # Horizontal alignment will be one of {Wx::Alignment::ALIGN_LEFT}, {Wx::Alignment::ALIGN_CENTRE} or {Wx::Alignment::ALIGN_RIGHT}. # Vertical alignment will be one of {Wx::Alignment::ALIGN_TOP}, {Wx::Alignment::ALIGN_CENTRE} or {Wx::Alignment::ALIGN_BOTTOM}. # @return [Array(Integer,Integer)] def get_col_label_alignment; end alias_method :col_label_alignment, :get_col_label_alignment # Returns the orientation of the column labels (either {Wx::Orientation::HORIZONTAL} or {Wx::Orientation::VERTICAL}). # @return [Integer] def get_col_label_text_orientation; end alias_method :col_label_text_orientation, :get_col_label_text_orientation # Returns the specified column label. # The default grid table class provides column labels of the form A,B...Z,AA,AB...ZZ,AAA... If you are using a custom grid table you can override {Wx::GRID::GridTableBase#get_col_label_value} to provide your own labels. # @param col [Integer] # @return [String] def get_col_label_value(col) end alias_method :col_label_value, :get_col_label_value # Sets the arguments to the current corner label alignment values. # Horizontal alignment will be one of {Wx::Alignment::ALIGN_LEFT}, {Wx::Alignment::ALIGN_CENTRE} or {Wx::Alignment::ALIGN_RIGHT}. # Vertical alignment will be one of {Wx::Alignment::ALIGN_TOP}, {Wx::Alignment::ALIGN_CENTRE} or {Wx::Alignment::ALIGN_BOTTOM}. # @return [Array(Integer,Integer)] def get_corner_label_alignment; end alias_method :corner_label_alignment, :get_corner_label_alignment # Returns the orientation of the corner label (either {Wx::Orientation::HORIZONTAL} or {Wx::Orientation::VERTICAL}). # @return [Integer] def get_corner_label_text_orientation; end alias_method :corner_label_text_orientation, :get_corner_label_text_orientation # Returns the (top-left) corner label. # @return [String] def get_corner_label_value; end alias_method :corner_label_value, :get_corner_label_value # Returns the colour used for the background of row and column labels. # @return [Wx::Colour] def get_label_background_colour; end alias_method :label_background_colour, :get_label_background_colour # Returns the font used for row and column labels. # @return [Wx::Font] def get_label_font; end alias_method :label_font, :get_label_font # Returns the colour used for row and column label text. # @return [Wx::Colour] def get_label_text_colour; end alias_method :label_text_colour, :get_label_text_colour # Returns the alignment used for row labels. # Horizontal alignment will be one of {Wx::Alignment::ALIGN_LEFT}, {Wx::Alignment::ALIGN_CENTRE} or {Wx::Alignment::ALIGN_RIGHT}. # Vertical alignment will be one of {Wx::Alignment::ALIGN_TOP}, {Wx::Alignment::ALIGN_CENTRE} or {Wx::Alignment::ALIGN_BOTTOM}. # @return [Array(Integer,Integer)] def get_row_label_alignment; end alias_method :row_label_alignment, :get_row_label_alignment # Returns the specified row label. # The default grid table class provides numeric row labels. If you are using a custom grid table you can override {Wx::GRID::GridTableBase#get_row_label_value} to provide your own labels. # @param row [Integer] # @return [String] def get_row_label_value(row) end alias_method :row_label_value, :get_row_label_value # Hides the column labels by calling {Wx::GRID::Grid#set_col_label_size} with a size of 0. # The labels can be shown again by calling {Wx::GRID::Grid#set_col_label_size} with a height greater than 0. # Note that when the column labels are hidden, the grid won't have any visible border on the top side, which may result in a less than ideal appearance. Because of this, you may want to create the grid window with a border style, such as {Wx::Border::BORDER_SIMPLE}, when you don't plan to show the column labels for it. # @see Wx::GRID::Grid#hide_row_labels # @return [void] def hide_col_labels; end # Hides the row labels by calling {Wx::GRID::Grid#set_row_label_size} with a size of 0. # The labels can be shown again by calling {Wx::GRID::Grid#set_row_label_size} with a width greater than 0. # See {Wx::GRID::Grid#hide_col_labels} for a note explaining why you may want to use a border with a grid without the row labels. # @return [void] def hide_row_labels; end # Sets the horizontal and vertical alignment of column label text. # Horizontal alignment should be one of {Wx::Alignment::ALIGN_LEFT}, {Wx::Alignment::ALIGN_CENTRE} or {Wx::Alignment::ALIGN_RIGHT}. Vertical alignment should be one of {Wx::Alignment::ALIGN_TOP}, {Wx::Alignment::ALIGN_CENTRE} or {Wx::Alignment::ALIGN_BOTTOM}. # @param horiz [Integer] # @param vert [Integer] # @return [void] def set_col_label_alignment(horiz, vert) end # Sets the orientation of the column labels (either {Wx::Orientation::HORIZONTAL} or {Wx::Orientation::VERTICAL}). # @param textOrientation [Integer] # @return [void] def set_col_label_text_orientation(textOrientation) end alias_method :col_label_text_orientation=, :set_col_label_text_orientation # Set the value for the given column label. # If you are using a custom grid table you must override {Wx::GRID::GridTableBase#set_col_label_value} for this to have any effect. # @param col [Integer] # @param value [String] # @return [void] def set_col_label_value(col, value) end # Sets the horizontal and vertical alignment of the (top-left) corner label text. # Horizontal alignment should be one of {Wx::Alignment::ALIGN_LEFT}, {Wx::Alignment::ALIGN_CENTRE} or {Wx::Alignment::ALIGN_RIGHT}. Vertical alignment should be one of {Wx::Alignment::ALIGN_TOP}, {Wx::Alignment::ALIGN_CENTRE} or {Wx::Alignment::ALIGN_BOTTOM}. # @param horiz [Integer] # @param vert [Integer] # @return [void] def set_corner_label_alignment(horiz, vert) end # Sets the orientation of the (top-left) corner label (either {Wx::Orientation::HORIZONTAL} or {Wx::Orientation::VERTICAL}). # @param textOrientation [Integer] # @return [void] def set_corner_label_text_orientation(textOrientation) end alias_method :corner_label_text_orientation=, :set_corner_label_text_orientation # Set the value for the (top-left) corner label. # If you are using a custom grid table you must override {Wx::GRID::GridTableBase#set_corner_label_value} for this to have any effect. # @param arg [String] # @return [void] def set_corner_label_value(arg) end alias_method :corner_label_value=, :set_corner_label_value # Sets the background colour for row and column labels. # @param colour [Wx::Colour,String,Symbol] # @return [void] def set_label_background_colour(colour) end alias_method :label_background_colour=, :set_label_background_colour # Sets the font for row and column labels. # @param font [Wx::Font,Wx::FontInfo] # @return [void] def set_label_font(font) end alias_method :label_font=, :set_label_font # Sets the colour for row and column label text. # @param colour [Wx::Colour,String,Symbol] # @return [void] def set_label_text_colour(colour) end alias_method :label_text_colour=, :set_label_text_colour # Sets the horizontal and vertical alignment of row label text. # Horizontal alignment should be one of {Wx::Alignment::ALIGN_LEFT}, {Wx::Alignment::ALIGN_CENTRE} or {Wx::Alignment::ALIGN_RIGHT}. Vertical alignment should be one of {Wx::Alignment::ALIGN_TOP}, {Wx::Alignment::ALIGN_CENTRE} or {Wx::Alignment::ALIGN_BOTTOM}. # @param horiz [Integer] # @param vert [Integer] # @return [void] def set_row_label_alignment(horiz, vert) end # Sets the value for the given row label. # If you are using a derived grid table you must override {Wx::GRID::GridTableBase#set_row_label_value} for this to have any effect. # @param row [Integer] # @param value [String] # @return [void] def set_row_label_value(row, value) end # Call this in order to make the column labels use a native look by using Wx::RendererNative#draw_header_button internally. # There is no equivalent method for drawing row columns as there is not native look for that. This option is useful when using {Wx::GRID::Grid} for displaying tables and not as a spread-sheet. # @see Wx::GRID::Grid#use_native_col_header # @param native [true,false] # @return [void] def set_use_native_col_labels(native=true) end alias_method :use_native_col_labels=, :set_use_native_col_labels # Enable the use of native header window for column labels. # If this function is called with true argument, a {Wx::HeaderCtrl} is used instead to display the column labels instead of drawing them in {Wx::GRID::Grid} code itself. This has the advantage of making the grid look and feel perfectly the same as native applications (using {Wx::GRID::Grid#set_use_native_col_labels} the grid can be made to look more natively but it still doesn't feel natively, notably the column resizing and dragging still works slightly differently as it is implemented in wxWidgets itself) but results in different behaviour for column and row headers, for which there is no equivalent function, and, most importantly, is unsuitable for grids with huge numbers of columns as {Wx::HeaderCtrl} doesn't support virtual mode. Because of this, by default the grid does not use the native header control but you should call this function to enable it if you are using the grid to display tabular data and don't have thousands of columns in it. # Another difference between the default behaviour and the native header behaviour is that the latter provides the user with a context menu (which appears on right clicking the header) allowing to rearrange the grid columns if {Wx::GRID::Grid#can_drag_col_move} returns true. If you want to prevent this from happening for some reason, you need to define a handler for {Wx::GRID::EVT_GRID_LABEL_RIGHT_CLICK} event which simply does nothing (in particular doesn't skip the event) as this will prevent the default right click handling from working. # Also note that currently {Wx::GRID::EVT_GRID_LABEL_RIGHT_DCLICK} event is not generated for the column labels if the native columns header is used (but this limitation could possibly be lifted in the future). # Finally, please note that using the native control is currently incompatible with freezing columns in the grid (see {Wx::GRID::Grid#freeze_to}) and this function will return false, without doing anything, if it's called on a grid in which any columns are frozen. # @param native [true,false] # @return [true,false] def use_native_col_header(native=true) end # Sets the arguments to the horizontal and vertical text alignment values for the grid cell at the specified location. # Horizontal alignment will be one of {Wx::Alignment::ALIGN_LEFT}, {Wx::Alignment::ALIGN_CENTRE} or {Wx::Alignment::ALIGN_RIGHT}. # Vertical alignment will be one of {Wx::Alignment::ALIGN_TOP}, {Wx::Alignment::ALIGN_CENTRE} or {Wx::Alignment::ALIGN_BOTTOM}. # @param row [Integer] # @param col [Integer] # @return [Array(Integer,Integer)] def get_cell_alignment(row, col) end alias_method :cell_alignment, :get_cell_alignment # Returns the background colour of the cell at the specified location. # @param row [Integer] # @param col [Integer] # @return [Wx::Colour] def get_cell_background_colour(row, col) end alias_method :cell_background_colour, :get_cell_background_colour # Returns the font for text in the grid cell at the specified location. # @param row [Integer] # @param col [Integer] # @return [Wx::Font] def get_cell_font(row, col) end alias_method :cell_font, :get_cell_font # Returns the text colour for the grid cell at the specified location. # @param row [Integer] # @param col [Integer] # @return [Wx::Colour] def get_cell_text_colour(row, col) end alias_method :cell_text_colour, :get_cell_text_colour # Returns the default cell alignment. # Horizontal alignment will be one of {Wx::Alignment::ALIGN_LEFT}, {Wx::Alignment::ALIGN_CENTRE} or {Wx::Alignment::ALIGN_RIGHT}. # Vertical alignment will be one of {Wx::Alignment::ALIGN_TOP}, {Wx::Alignment::ALIGN_CENTRE} or {Wx::Alignment::ALIGN_BOTTOM}. # @see Wx::GRID::Grid#set_default_cell_alignment # @return [Array(Integer,Integer)] def get_default_cell_alignment; end alias_method :default_cell_alignment, :get_default_cell_alignment # Returns the current default background colour for grid cells. # @return [Wx::Colour] def get_default_cell_background_colour; end alias_method :default_cell_background_colour, :get_default_cell_background_colour # Returns the current default font for grid cell text. # @return [Wx::Font] def get_default_cell_font; end alias_method :default_cell_font, :get_default_cell_font # Returns the current default colour for grid cell text. # @return [Wx::Colour] def get_default_cell_text_colour; end alias_method :default_cell_text_colour, :get_default_cell_text_colour # Sets the horizontal and vertical alignment for grid cell text at the specified location. # Horizontal alignment should be one of {Wx::Alignment::ALIGN_LEFT}, {Wx::Alignment::ALIGN_CENTRE} or {Wx::Alignment::ALIGN_RIGHT}. # Vertical alignment should be one of {Wx::Alignment::ALIGN_TOP}, {Wx::Alignment::ALIGN_CENTRE} or {Wx::Alignment::ALIGN_BOTTOM}. # @param row [Integer] # @param col [Integer] # @param horiz [Integer] # @param vert [Integer] # @return [void] def set_cell_alignment(row, col, horiz, vert) end # Set the background colour for the given cell or all cells by default. # @param row [Integer] # @param col [Integer] # @param colour [Wx::Colour,String,Symbol] # @return [void] def set_cell_background_colour(row, col, colour) end # Sets the font for text in the grid cell at the specified location. # @param row [Integer] # @param col [Integer] # @param font [Wx::Font,Wx::FontInfo] # @return [void] def set_cell_font(row, col, font) end # Sets the text colour for the given cell. # @param row [Integer] # @param col [Integer] # @param colour [Wx::Colour,String,Symbol] # @return [void] def set_cell_text_colour(row, col, colour) end alias_method :cell_text_colour=, :set_cell_text_colour # Sets the default horizontal and vertical alignment for grid cell text. # Horizontal alignment should be one of {Wx::Alignment::ALIGN_LEFT}, {Wx::Alignment::ALIGN_CENTRE} or {Wx::Alignment::ALIGN_RIGHT}. Vertical alignment should be one of {Wx::Alignment::ALIGN_TOP}, {Wx::Alignment::ALIGN_CENTRE} or {Wx::Alignment::ALIGN_BOTTOM}. # @param horiz [Integer] # @param vert [Integer] # @return [void] def set_default_cell_alignment(horiz, vert) end # Sets the default background colour for grid cells. # @param colour [Wx::Colour,String,Symbol] # @return [void] def set_default_cell_background_colour(colour) end alias_method :default_cell_background_colour=, :set_default_cell_background_colour # Sets the default font to be used for grid cell text. # @param font [Wx::Font,Wx::FontInfo] # @return [void] def set_default_cell_font(font) end alias_method :default_cell_font=, :set_default_cell_font # Sets the current default colour for grid cell text. # @param colour [Wx::Colour,String,Symbol] # @return [void] def set_default_cell_text_colour(colour) end alias_method :default_cell_text_colour=, :set_default_cell_text_colour # Returns true if the in-place edit control for the current grid cell can be used and false otherwise. # This function always returns false for the read-only cells. # @return [true,false] def can_enable_cell_control; end alias_method :can_enable_cell_control?, :can_enable_cell_control # Disables in-place editing of grid cells. # Equivalent to calling EnableCellEditControl(false). # @return [void] def disable_cell_edit_control; end # Enables or disables in-place editing of grid cell data. # Enabling in-place editing generates {Wx::GRID::EVT_GRID_EDITOR_SHOWN} and, if it isn't vetoed by the application, shows the in-place editor which allows the user to change the cell value. # Disabling in-place editing does nothing if the in-place editor isn't currently shown, otherwise the {Wx::GRID::EVT_GRID_EDITOR_HIDDEN} event is generated but, unlike the "shown" event, it can't be vetoed and the in-place editor is dismissed unconditionally. # Note that it is an error to call this function if the current cell is read-only, use {Wx::GRID::Grid#can_enable_cell_control} to check for this precondition. # @param enable [true,false] # @return [void] def enable_cell_edit_control(enable=true) end # Makes the grid globally editable or read-only. # If the edit argument is false this function sets the whole grid as read-only. If the argument is true the grid is set to the default state where cells may be editable. In the default state you can set single grid cells and whole rows and columns to be editable or read-only via {Wx::GRID::GridCellAttr#set_read_only}. For single cells you can also use the shortcut function {Wx::GRID::Grid#set_read_only}. # For more information about controlling grid cell attributes see the {Wx::GRID::GridCellAttr} class and the wxGrid Overview. # @param edit [true,false] # @return [void] def enable_editing(edit) end # Returns a pointer to the editor for the cell at the specified location. # See {Wx::GRID::GridCellEditor} and the wxGrid Overview for more information about cell editors and renderers. # The caller must call DecRef() on the returned pointer. # @param row [Integer] # @param col [Integer] # @return [Wx::GRID::GridCellEditor] def get_cell_editor(row, col) end alias_method :cell_editor, :get_cell_editor # Returns a pointer to the renderer for the grid cell at the specified location. # See {Wx::GRID::GridCellRenderer} and the wxGrid Overview for more information about cell editors and renderers. # The caller must call DecRef() on the returned pointer. # @param row [Integer] # @param col [Integer] # @return [Wx::GRID::GridCellRenderer] def get_cell_renderer(row, col) end alias_method :cell_renderer, :get_cell_renderer # Returns the string contained in the cell at the specified location. # For simple applications where a grid object automatically uses a default grid table of string values you use this function together with {Wx::GRID::Grid#set_cell_value} to access cell values. For more complex applications where you have derived your own grid table class that contains various data types (e.g. numeric, boolean or user-defined custom types) then you only use this function for those cells that contain string values. # See {Wx::GRID::GridTableBase#can_get_value_as} and the wxGrid Overview for more information. # @param row [Integer] # @param col [Integer] # @return [String] def get_cell_value(row, col) end alias_method :cell_value, :get_cell_value # Returns a pointer to the current default grid cell editor. # See {Wx::GRID::GridCellEditor} and the wxGrid Overview for more information about cell editors and renderers. # @return [Wx::GRID::GridCellEditor] def get_default_editor; end alias_method :default_editor, :get_default_editor # Returns the default editor for the specified cell. # The base class version returns the editor appropriate for the current cell type but this method may be overridden in the derived classes to use custom editors for some cells by default. # Notice that the same may be achieved in a usually simpler way by associating a custom editor with the given cell or cells. # The caller must call DecRef() on the returned pointer. # @param row [Integer] # @param col [Integer] # @return [Wx::GRID::GridCellEditor] def get_default_editor_for_cell(row, col) end alias_method :default_editor_for_cell, :get_default_editor_for_cell # Returns the default editor for the cells containing values of the given type. # The base class version returns the editor which was associated with the specified typeName when it was registered {Wx::GRID::Grid#register_data_type} but this function may be overridden to return something different. This allows overriding an editor used for one of the standard types. # The caller must call DecRef() on the returned pointer. # @param typeName [String] # @return [Wx::GRID::GridCellEditor] def get_default_editor_for_type(typeName) end alias_method :default_editor_for_type, :get_default_editor_for_type # Returns a pointer to the current default grid cell renderer. # See {Wx::GRID::GridCellRenderer} and the wxGrid Overview for more information about cell editors and renderers. # The caller must call DecRef() on the returned pointer. # @return [Wx::GRID::GridCellRenderer] def get_default_renderer; end alias_method :default_renderer, :get_default_renderer # Returns the default renderer for the given cell. # The base class version returns the renderer appropriate for the current cell type but this method may be overridden in the derived classes to use custom renderers for some cells by default. # The caller must call DecRef() on the returned pointer. # @param row [Integer] # @param col [Integer] # @return [Wx::GRID::GridCellRenderer] def get_default_renderer_for_cell(row, col) end alias_method :default_renderer_for_cell, :get_default_renderer_for_cell # Returns the default renderer for the cell containing values of the given type. # # @see Wx::GRID::Grid#get_default_editor_for_type # @param typeName [String] # @return [Wx::GRID::GridCellRenderer] def get_default_renderer_for_type(typeName) end alias_method :default_renderer_for_type, :get_default_renderer_for_type # Hides the in-place cell edit control. # @return [void] def hide_cell_edit_control; end # Returns true if the in-place edit control is currently enabled. # @return [true,false] def is_cell_edit_control_enabled; end alias_method :cell_edit_control_enabled?, :is_cell_edit_control_enabled # Returns true if the in-place edit control is currently shown. # # @see Wx::GRID::Grid#hide_cell_edit_control # @return [true,false] def is_cell_edit_control_shown; end alias_method :cell_edit_control_shown?, :is_cell_edit_control_shown # Returns true if the current cell is read-only. # # @see Wx::GRID::Grid#set_read_only # @see Wx::GRID::Grid#is_read_only # @return [true,false] def is_current_cell_read_only; end alias_method :current_cell_read_only?, :is_current_cell_read_only # Returns false if the whole grid has been set as read-only or true otherwise. # See {Wx::GRID::Grid#enable_editing} for more information about controlling the editing status of grid cells. # @return [true,false] def is_editable; end alias_method :editable?, :is_editable # Returns true if the cell at the specified location can't be edited. # # @see Wx::GRID::Grid#set_read_only # @see Wx::GRID::Grid#is_current_cell_read_only # @param row [Integer] # @param col [Integer] # @return [true,false] def is_read_only(row, col) end alias_method :read_only?, :is_read_only # Register a new data type. # The data types allow to naturally associate specific renderers and editors to the cells containing values of the given type. For example, the grid automatically registers a data type with the name {Wx::GRID::GRID_VALUE_STRING} which uses {Wx::GRID::GridCellStringRenderer} and {Wx::GRID::GridCellTextEditor} as its renderer and editor respectively this is the data type used by all the cells of the default {Wx::GRID::GridStringTable}, so this renderer and editor are used by default for all grid cells. # However if a custom table returns {Wx::GRID::GRID_VALUE_BOOL} from its {Wx::GRID::GridTableBase#get_type_name} method, then {Wx::GRID::GridCellBoolRenderer} and {Wx::GRID::GridCellBoolEditor} are used for it because the grid also registers a boolean data type with this name. # And as this mechanism is completely generic, you may register your own data types using your own custom renderers and editors. Just remember that the table must identify a cell as being of the given type for them to be used for this cell. # @param typeName [String] Name of the new type. May be any string, but if the type name is the same as the name of an already registered type, including one of the standard ones (which are {Wx::GRID::GRID_VALUE_STRING}, {Wx::GRID::GRID_VALUE_BOOL}, {Wx::GRID::GRID_VALUE_NUMBER}, {Wx::GRID::GRID_VALUE_FLOAT}, {Wx::GRID::GRID_VALUE_CHOICE} and {Wx::GRID::GRID_VALUE_DATE}), then the new registration information replaces the previously used renderer and editor. # @param renderer [Wx::GridCellRenderer] The renderer to use for the cells of this type. Its ownership is taken by the grid, i.e. it will call DecRef() on this pointer when it doesn't need it any longer. # @param editor [Wx::GridCellEditor] The editor to use for the cells of this type. Its ownership is also taken by the grid. # @return [void] def register_data_type(typeName, renderer, editor) end # Sets the value of the current grid cell to the current in-place edit control value. # This is called automatically when the grid cursor moves from the current cell to a new cell. It is also a good idea to call this function when closing a grid since any edits to the final cell location will not be saved otherwise. # @return [void] def save_edit_control_value; end # Sets the editor for the grid cell at the specified location. # The grid will take ownership of the pointer. # See {Wx::GRID::GridCellEditor} and the wxGrid Overview for more information about cell editors and renderers. # @param row [Integer] # @param col [Integer] # @param editor [Wx::GridCellEditor] # @return [void] def set_cell_editor(row, col, editor) end # Sets the renderer for the grid cell at the specified location. # The grid will take ownership of the pointer. # See {Wx::GRID::GridCellRenderer} and the wxGrid Overview for more information about cell editors and renderers. # @param row [Integer] # @param col [Integer] # @param renderer [Wx::GridCellRenderer] # @return [void] def set_cell_renderer(row, col, renderer) end # Sets the string value for the cell at the specified location. # For simple applications where a grid object automatically uses a default grid table of string values you use this function together with {Wx::GRID::Grid#get_cell_value} to access cell values. For more complex applications where you have derived your own grid table class that contains various data types (e.g. numeric, boolean or user-defined custom types) then you only use this function for those cells that contain string values. # See {Wx::GRID::GridTableBase#can_set_value_as} and the wxGrid Overview for more information. # @param row [Integer] # @param col [Integer] # @param s [String] # @return [void] def set_cell_value(row, col, s) end # Sets the specified column to display boolean values. # # @see Wx::GRID::Grid#set_col_format_custom # @param col [Integer] # @return [void] def set_col_format_bool(col) end alias_method :col_format_bool=, :set_col_format_bool # Sets the specified column to display data in a custom format. # This method provides an alternative to defining a custom grid table which would return typeName from its GetTypeName() method for the cells in this column: while it doesn't really change the type of the cells in this column, it does associate the renderer and editor used for the cells of the specified type with them. # See the wxGrid Overview for more information on working with custom data types. # @param col [Integer] # @param typeName [String] # @return [void] def set_col_format_custom(col, typeName) end # Sets the specified column to display floating point values with the given width and precision. # # @see Wx::GRID::Grid#set_col_format_custom # @param col [Integer] # @param width [Integer] # @param precision [Integer] # @return [void] def set_col_format_float(col, width=-1, precision=-1) end alias_method :col_format_float=, :set_col_format_float # Sets the specified column to display integer values. # # @see Wx::GRID::Grid#set_col_format_custom # @param col [Integer] # @return [void] def set_col_format_number(col) end alias_method :col_format_number=, :set_col_format_number # Sets the specified column to display date values. # The format argument is used with {Wx::GRID::GridCellDateRenderer} and allows to specify the strftime-like format string to use for displaying the dates in this column. # @see Wx::GRID::Grid#set_col_format_custom # @param col [Integer] # @param format [String] # @return [void] def set_col_format_date(col, format=(())) end alias_method :col_format_date=, :set_col_format_date # Sets the default editor for grid cells. # The grid will take ownership of the pointer. # See {Wx::GRID::GridCellEditor} and the wxGrid Overview for more information about cell editors and renderers. # @param editor [Wx::GridCellEditor] # @return [void] def set_default_editor(editor) end alias_method :default_editor=, :set_default_editor # Sets the default renderer for grid cells. # The grid will take ownership of the pointer. # See {Wx::GRID::GridCellRenderer} and the wxGrid Overview for more information about cell editors and renderers. # @param renderer [Wx::GridCellRenderer] # @return [void] def set_default_renderer(renderer) end alias_method :default_renderer=, :set_default_renderer # Makes the cell at the specified location read-only or editable. # # @see Wx::GRID::Grid#is_read_only # @param row [Integer] # @param col [Integer] # @param isReadOnly [true,false] # @return [void] def set_read_only(row, col, isReadOnly=true) end # Displays the active in-place cell edit control for the current cell after it was hidden. # This method should only be called after calling {Wx::GRID::Grid#hide_cell_edit_control}, to start editing the current grid cell use {Wx::GRID::Grid#enable_cell_edit_control} instead. # @return [void] def show_cell_edit_control; end # Automatically sets the height and width of all rows and columns to fit their contents. # @return [void] def auto_size; end # Automatically adjusts width of the column to fit its label. # @param col [Integer] # @return [void] def auto_size_col_label_size(col) end # Automatically sizes the column to fit its contents. # If setAsMin is true the calculated width will also be set as the minimal width for the column. # @param col [Integer] # @param setAsMin [true,false] # @return [void] def auto_size_column(col, setAsMin=true) end # Automatically sizes all columns to fit their contents. # If setAsMin is true the calculated widths will also be set as the minimal widths for the columns. # @param setAsMin [true,false] # @return [void] def auto_size_columns(setAsMin=true) end # Automatically sizes the row to fit its contents. # If setAsMin is true the calculated height will also be set as the minimal height for the row. # @param row [Integer] # @param setAsMin [true,false] # @return [void] def auto_size_row(row, setAsMin=true) end # Automatically adjusts height of the row to fit its label. # @param col [Integer] # @return [void] def auto_size_row_label_size(col) end # Automatically sizes all rows to fit their contents. # If setAsMin is true the calculated heights will also be set as the minimal heights for the rows. # @param setAsMin [true,false] # @return [void] def auto_size_rows(setAsMin=true) end # Returns the cell fitting mode. # # @see Wx::GridFitMode # @param row [Integer] # @param col [Integer] # @return [Wx::GridFitMode] def get_cell_fit_mode(row, col) end alias_method :cell_fit_mode, :get_cell_fit_mode # Returns true if the cell value can overflow. # This is identical to calling {Wx::GRID::Grid#get_cell_fit_mode} and using Wx::GridFitMode#is_overflow on the returned value. # Prefer using {Wx::GRID::Grid#get_cell_fit_mode} directly in the new code. # @param row [Integer] # @param col [Integer] # @return [true,false] def get_cell_overflow(row, col) end alias_method :cell_overflow, :get_cell_overflow # Returns the current height of the column labels. # @return [Integer] def get_col_label_size; end alias_method :col_label_size, :get_col_label_size # Returns the minimal width to which a column may be resized. # Use {Wx::GRID::Grid#set_col_minimal_acceptable_width} to change this value globally or {Wx::GRID::Grid#set_col_minimal_width} to do it for individual columns. # @see Wx::GRID::Grid#get_row_minimal_acceptable_height # @return [Integer] def get_col_minimal_acceptable_width; end alias_method :col_minimal_acceptable_width, :get_col_minimal_acceptable_width # Returns the width of the specified column. # @param col [Integer] # @return [Integer] def get_col_size(col) end alias_method :col_size, :get_col_size # Returns true if the specified column is not currently hidden. # @param col [Integer] # @return [true,false] def is_col_shown(col) end alias_method :col_shown?, :is_col_shown # Returns the default cell fitting mode. # The default mode is "overflow", but can be modified using {Wx::GRID::Grid#set_default_cell_fit_mode}. # @see Wx::GridFitMode # @return [Wx::GridFitMode] def get_default_cell_fit_mode; end alias_method :default_cell_fit_mode, :get_default_cell_fit_mode # Returns true if the cells can overflow by default. # This is identical to calling {Wx::GRID::Grid#get_default_cell_fit_mode} and using Wx::GridFitMode#is_overflow on the returned value. # Prefer using {Wx::GRID::Grid#get_default_cell_fit_mode} directly in the new code. # @return [true,false] def get_default_cell_overflow; end alias_method :default_cell_overflow, :get_default_cell_overflow # Returns the default height for column labels. # @return [Integer] def get_default_col_label_size; end alias_method :default_col_label_size, :get_default_col_label_size # Returns the current default width for grid columns. # @return [Integer] def get_default_col_size; end alias_method :default_col_size, :get_default_col_size # Returns the default width for the row labels. # @return [Integer] def get_default_row_label_size; end alias_method :default_row_label_size, :get_default_row_label_size # Returns the current default height for grid rows. # @return [Integer] def get_default_row_size; end alias_method :default_row_size, :get_default_row_size # Returns the minimal size to which rows can be resized. # Use {Wx::GRID::Grid#set_row_minimal_acceptable_height} to change this value globally or {Wx::GRID::Grid#set_row_minimal_height} to do it for individual cells. # @see Wx::GRID::Grid#get_col_minimal_acceptable_width # @return [Integer] def get_row_minimal_acceptable_height; end alias_method :row_minimal_acceptable_height, :get_row_minimal_acceptable_height # Returns the current width of the row labels. # @return [Integer] def get_row_label_size; end alias_method :row_label_size, :get_row_label_size # Returns the height of the specified row. # @param row [Integer] # @return [Integer] def get_row_size(row) end alias_method :row_size, :get_row_size # Returns true if the specified row is not currently hidden. # @param row [Integer] # @return [true,false] def is_row_shown(row) end alias_method :row_shown?, :is_row_shown # Specifies the behaviour of the cell contents if it doesn't fit into the available space. # # @see Wx::GridFitMode # @param row [Integer] # @param col [Integer] # @param fitMode [Wx::GridFitMode] # @return [void] def set_cell_fit_mode(row, col, fitMode) end # Sets the overflow permission of the cell. # Prefer using {Wx::GRID::Grid#set_cell_fit_mode} in the new code. # @param row [Integer] # @param col [Integer] # @param allow [true,false] # @return [void] def set_cell_overflow(row, col, allow) end # Sets the height of the column labels. # If height equals to {Wx::GRID::GRID_AUTOSIZE} then height is calculated automatically so that no label is truncated. Note that this could be slow for a large table. # @param height [Integer] # @return [void] def set_col_label_size(height) end alias_method :col_label_size=, :set_col_label_size # Sets the minimal width to which the user can resize columns. # # @see Wx::GRID::Grid#get_col_minimal_acceptable_width # @param width [Integer] # @return [void] def set_col_minimal_acceptable_width(width) end alias_method :col_minimal_acceptable_width=, :set_col_minimal_acceptable_width # Sets the minimal width for the specified column col. # It is usually best to call this method during grid creation as calling it later will not resize the column to the given minimal width even if it is currently narrower than it. # width must be greater than the minimal acceptable column width as returned by {Wx::GRID::Grid#get_col_minimal_acceptable_width}. # @param col [Integer] # @param width [Integer] # @return [void] def set_col_minimal_width(col, width) end # Sets the width of the specified column. # @param col [Integer] The column index. # @param width [Integer] The new column width in pixels, 0 to hide the column or -1 to fit the column width to its label width. # @return [void] def set_col_size(col, width) end # Hides the specified column. # To show the column later you need to call {Wx::GRID::Grid#set_col_size} with non-0 width or {Wx::GRID::Grid#show_col} to restore the previous column width. # If the column is already hidden, this method doesn't do anything. # @param col [Integer] The column index. # @return [void] def hide_col(col) end # Shows the previously hidden column by resizing it to non-0 size. # The column is shown again with the same width that it had before {Wx::GRID::Grid#hide_col} call. # If the column is currently shown, this method doesn't do anything. # @see Wx::GRID::Grid#hide_col # @see Wx::GRID::Grid#set_col_size # @param col [Integer] # @return [void] def show_col(col) end # Specifies the default behaviour of the cell contents if it doesn't fit into the available space. # # @see Wx::GridFitMode # @param fitMode [Wx::GridFitMode] # @return [void] def set_default_cell_fit_mode(fitMode) end alias_method :default_cell_fit_mode=, :set_default_cell_fit_mode # Sets the default overflow permission of the cells. # Prefer using {Wx::GRID::Grid#set_default_cell_fit_mode} in the new code. # @param allow [true,false] # @return [void] def set_default_cell_overflow(allow) end alias_method :default_cell_overflow=, :set_default_cell_overflow # Sets the default width for columns in the grid. # This will only affect columns subsequently added to the grid unless resizeExistingCols is true. # If width is less than {Wx::GRID::Grid#get_col_minimal_acceptable_width}, then the minimal acceptable width is used instead of it. # @param width [Integer] # @param resizeExistingCols [true,false] # @return [void] def set_default_col_size(width, resizeExistingCols=false) end alias_method :default_col_size=, :set_default_col_size # Sets the default height for rows in the grid. # This will only affect rows subsequently added to the grid unless resizeExistingRows is true. # If height is less than {Wx::GRID::Grid#get_row_minimal_acceptable_height}, then the minimal acceptable height is used instead of it. # @param height [Integer] # @param resizeExistingRows [true,false] # @return [void] def set_default_row_size(height, resizeExistingRows=false) end alias_method :default_row_size=, :set_default_row_size # Sets the width of the row labels. # If width equals {Wx::GRID::GRID_AUTOSIZE} then width is calculated automatically so that no label is truncated. Note that this could be slow for a large table. # @param width [Integer] # @return [void] def set_row_label_size(width) end alias_method :row_label_size=, :set_row_label_size # Sets the minimal row height used by default. # See {Wx::GRID::Grid#set_col_minimal_acceptable_width} for more information. # @param height [Integer] # @return [void] def set_row_minimal_acceptable_height(height) end alias_method :row_minimal_acceptable_height=, :set_row_minimal_acceptable_height # Sets the minimal height for the specified row. # See {Wx::GRID::Grid#set_col_minimal_width} for more information. # @param row [Integer] # @param height [Integer] # @return [void] def set_row_minimal_height(row, height) end # Sets the height of the specified row. # See {Wx::GRID::Grid#set_col_size} for more information. # @param row [Integer] # @param height [Integer] # @return [void] def set_row_size(row, height) end # Hides the specified row. # To show the row later you need to call {Wx::GRID::Grid#set_row_size} with non-0 width or {Wx::GRID::Grid#show_row} to restore its original height. # If the row is already hidden, this method doesn't do anything. # @param col [Integer] The row index. # @return [void] def hide_row(col) end # Shows the previously hidden row. # The row is shown again with the same height that it had before {Wx::GRID::Grid#hide_row} call. # If the row is currently shown, this method doesn't do anything. # @see Wx::GRID::Grid#hide_row # @see Wx::GRID::Grid#set_row_size # @param col [Integer] # @return [void] def show_row(col) end # Get size information for all columns at once. # This method is useful when the information about all column widths needs to be saved. The widths can be later restored using {Wx::GRID::Grid#set_col_sizes}. # @see Wx::GridSizesInfo # @see Wx::GRID::Grid#get_row_sizes # @return [Wx::GridSizesInfo] def get_col_sizes; end alias_method :col_sizes, :get_col_sizes # Get size information for all row at once. # # @see Wx::GridSizesInfo # @see Wx::GRID::Grid#get_col_sizes # @return [Wx::GridSizesInfo] def get_row_sizes; end alias_method :row_sizes, :get_row_sizes # Restore all columns sizes. # This is usually called with {Wx::GridSizesInfo} object previously returned by {Wx::GRID::Grid#get_col_sizes}. # @see Wx::GRID::Grid#set_row_sizes # @param sizeInfo [Wx::GridSizesInfo] # @return [void] def set_col_sizes(sizeInfo) end alias_method :col_sizes=, :set_col_sizes # Restore all rows sizes. # # @see Wx::GRID::Grid#set_col_sizes # @param sizeInfo [Wx::GridSizesInfo] # @return [void] def set_row_sizes(sizeInfo) end alias_method :row_sizes=, :set_row_sizes # Set the size of the cell. # Specifying a value of more than 1 in num_rows or num_cols will make the cell at (row, col) span the block of the specified size, covering the other cells which would be normally shown in it. Passing 1 for both arguments resets the cell to normal appearance. # @see Wx::GRID::Grid#get_cell_size # @param row [Integer] The row of the cell. # @param col [Integer] The column of the cell. # @param num_rows [Integer] Number of rows to be occupied by this cell, must be >= 1. # @param num_cols [Integer] Number of columns to be occupied by this cell, must be >= 1. # @return [void] def set_cell_size(row, col, num_rows, num_cols) end # @overload get_cell_size(row, col) # Get the size of the cell in number of cells covered by it. # For normal cells, the function fills both num_rows and num_cols with 1 and returns CellSpan_None. For cells which span multiple cells, i.e. for which {Wx::GRID::Grid#set_cell_size} had been called, the returned values are the same ones as were passed to {Wx::GRID::Grid#set_cell_size} call and the function return value is CellSpan_Main. # More unexpectedly, perhaps, the returned values may be negative for the cells which are inside a span covered by a cell occupying multiple rows or columns. They correspond to the offset of the main cell of the span from the cell passed to this functions and the function returns CellSpan_Inside value to indicate this. # As an example, consider a 3*3 grid with the cell (1, 1) (the one in the middle) having a span of 2 rows and 2 columns, i.e. the grid looks like # # +----+----+----+ # | | | | # +----+----+----+ # | | | # +----+ | # | | | # +----+----+----+ # Then the function returns 2 and 2 in num_rows and num_cols for the cell (1, 1) itself and -1 and -1 for the cell (2, 2) as well as -1 and 0 for the cell (2, 1). # # The kind of this cell span (the return value is new in wxWidgets 2.9.1, this function was void in previous wxWidgets versions). # @param row [Integer] The row of the cell. # @param col [Integer] The column of the cell. # @return [Array(CellSpan,Integer,Integer)] # @overload get_cell_size(coords) # Get the number of rows and columns allocated for this cell. # This overload doesn't return a CellSpan value but the values returned may still be negative, see GetCellSize(int, int, int *, int *) for details. # @param coords [Wx::GridCellCoords] # @return [Wx::Size] def get_cell_size(*args) end alias_method :cell_size, :get_cell_size # Return true if the dragging of cells is enabled or false otherwise. # @return [true,false] def can_drag_cell; end alias_method :can_drag_cell?, :can_drag_cell # Returns true if columns can be moved by dragging with the mouse. # Columns can be moved by dragging on their labels. # @return [true,false] def can_drag_col_move; end alias_method :can_drag_col_move?, :can_drag_col_move # Returns true if the given column can be resized by dragging with the mouse. # This function returns true if resizing the columns interactively is globally enabled, i.e. if {Wx::GRID::Grid#disable_drag_col_size} hadn't been called, and if this column wasn't explicitly marked as non-resizable with {Wx::GRID::Grid#disable_col_resize}. # @param col [Integer] # @return [true,false] def can_drag_col_size(col) end alias_method :can_drag_col_size?, :can_drag_col_size # Return true if column edges inside the grid can be dragged to resize the rows. # # @see Wx::GRID::Grid#can_drag_grid_size # @see Wx::GRID::Grid#can_drag_col_size # @return [true,false] def can_drag_grid_col_edges; end alias_method :can_drag_grid_col_edges?, :can_drag_grid_col_edges # Return true if row edges inside the grid can be dragged to resize the rows. # # @see Wx::GRID::Grid#can_drag_grid_size # @see Wx::GRID::Grid#can_drag_row_size # @return [true,false] def can_drag_grid_row_edges; end alias_method :can_drag_grid_row_edges?, :can_drag_grid_row_edges # Return true if the dragging of grid lines to resize rows and columns is enabled or false otherwise. # @return [true,false] def can_drag_grid_size; end alias_method :can_drag_grid_size?, :can_drag_grid_size # Returns true if rows can be moved by dragging with the mouse. # Rows can be moved by dragging on their labels. # @return [true,false] def can_drag_row_move; end alias_method :can_drag_row_move?, :can_drag_row_move # Returns true if the given row can be resized by dragging with the mouse. # This is the same as {Wx::GRID::Grid#can_drag_col_size} but for rows. # @param row [Integer] # @return [true,false] def can_drag_row_size(row) end alias_method :can_drag_row_size?, :can_drag_row_size # Returns true if columns can be hidden from the popup menu of the native header. # @return [true,false] def can_hide_columns; end alias_method :can_hide_columns?, :can_hide_columns # Disable interactive resizing of the specified column. # This method allows one to disable resizing of an individual column in a grid where the columns are otherwise resizable (which is the case by default). # Notice that currently there is no way to make some columns resizable in a grid where columns can't be resized by default as there doesn't seem to be any need for this in practice. There is also no way to make the column marked as fixed using this method resizable again because it is supposed that fixed columns are used for static parts of the grid and so should remain fixed during the entire grid lifetime. # Also notice that disabling interactive column resizing will not prevent the program from changing the column size. # @see Wx::GRID::Grid#enable_drag_col_size # @param col [Integer] # @return [void] def disable_col_resize(col) end # Disable interactive resizing of the specified row. # This is the same as {Wx::GRID::Grid#disable_col_resize} but for rows. # @see Wx::GRID::Grid#enable_drag_row_size # @param row [Integer] # @return [void] def disable_row_resize(row) end # Disables column moving by dragging with the mouse. # Equivalent to passing false to {Wx::GRID::Grid#enable_drag_col_move}. # @return [void] def disable_drag_col_move; end # Disables row moving by dragging with the mouse. # Equivalent to passing false to {Wx::GRID::Grid#enable_drag_row_move}. # @return [void] def disable_drag_row_move; end # Disables column sizing by dragging with the mouse. # Equivalent to passing false to {Wx::GRID::Grid#enable_drag_col_size}. # @return [void] def disable_drag_col_size; end # Disable mouse dragging of grid lines to resize rows and columns. # Equivalent to passing false to {Wx::GRID::Grid#enable_drag_grid_size} # @return [void] def disable_drag_grid_size; end # Disables row sizing by dragging with the mouse. # Equivalent to passing false to {Wx::GRID::Grid#enable_drag_row_size}. # @return [void] def disable_drag_row_size; end # Disables column hiding from the header popup menu. # Equivalent to passing false to {Wx::GRID::Grid#enable_hiding_columns}. # @return [void] def disable_hiding_columns; end # Enables or disables cell dragging with the mouse. # @param enable [true,false] # @return [void] def enable_drag_cell(enable=true) end # Enables or disables column moving by dragging with the mouse. # Note that reordering columns by dragging them is currently not supported when the grid has any frozen columns (see {Wx::GRID::Grid#freeze_to}) and if this method is called with enable equal to true in this situation, it returns false without doing anything. Otherwise it returns true to indicate that it was successful. # @param enable [true,false] # @return [true,false] def enable_drag_col_move(enable=true) end # Enables or disables row moving by dragging with the mouse. # Note that reordering rows by dragging them is currently not supported when the grid has any frozen columns (see {Wx::GRID::Grid#freeze_to}) and if this method is called with enable equal to true in this situation, it returns false without doing anything. Otherwise it returns true to indicate that it was successful. # @param enable [true,false] # @return [true,false] def enable_drag_row_move(enable=true) end # Enables or disables column sizing by dragging with the mouse. # # @see Wx::GRID::Grid#disable_col_resize # @param enable [true,false] # @return [void] def enable_drag_col_size(enable=true) end # Enables or disables row and column resizing by dragging gridlines with the mouse. # @param enable [true,false] # @return [void] def enable_drag_grid_size(enable=true) end # Enables or disables row sizing by dragging with the mouse. # # @see Wx::GRID::Grid#disable_row_resize # @param enable [true,false] # @return [void] def enable_drag_row_size(enable=true) end # Enables or disables column hiding from the header popup menu. # Note that currently the popup menu can only be shown when using {Wx::HeaderCtrl}, i.e. if {Wx::GRID::Grid#use_native_col_header} had been called. # If the native header is not used, this method always simply returns false without doing anything, as hiding columns is not supported anyhow. If enable value is the same as {Wx::GRID::Grid#can_hide_columns}, it also returns false to indicate that nothing was done. Otherwise, it returns true to indicate that the value of this option was successfully changed. # The main use case for this method is to disallow hiding the columns interactively when using the native header. # @see Wx::GRID::Grid#disable_hiding_columns # @param enable [true,false] # @return [true,false] def enable_hiding_columns(enable=true) end # Returns the column ID of the specified column position. # @param colPos [Integer] # @return [Integer] def get_col_at(colPos) end alias_method :col_at, :get_col_at # Returns the position of the specified column. # @param colID [Integer] # @return [Integer] def get_col_pos(colID) end alias_method :col_pos, :get_col_pos # Sets the position of the specified column. # @param colID [Integer] # @param newPos [Integer] # @return [void] def set_col_pos(colID, newPos) end # Sets the positions of all columns at once. # This method takes an array containing the indices of the columns in their display order, i.e. uses the same convention as Wx::HeaderCtrl#set_columns_order. # @param order [Array] # @return [void] def set_columns_order(order) end alias_method :columns_order=, :set_columns_order # Resets the position of the columns to the default. # @return [void] def reset_col_pos; end # Returns the row ID of the specified row position. # @param rowPos [Integer] # @return [Integer] def get_row_at(rowPos) end alias_method :row_at, :get_row_at # Returns the position of the specified row. # @param rowID [Integer] # @return [Integer] def get_row_pos(rowID) end alias_method :row_pos, :get_row_pos # Sets the position of the specified row. # @param rowID [Integer] # @param newPos [Integer] # @return [void] def set_row_pos(rowID, newPos) end # Sets the positions of all rows at once. # This method takes an array containing the indices of the rows in their display order. # @param order [Array] # @return [void] def set_rows_order(order) end alias_method :rows_order=, :set_rows_order # Resets the position of the rows to the default. # @return [void] def reset_row_pos; end # Returns the current grid cursor position. # If grid cursor doesn't have any valid position (e.g. if the grid is completely empty and doesn't have any rows or columns), returns {Wx::GridNoCellCoords} which has both row and columns set to -1. # @return [Wx::GridCellCoords] def get_grid_cursor_coords; end alias_method :grid_cursor_coords, :get_grid_cursor_coords # Returns the current grid cell column position. # # @see Wx::GRID::Grid#get_grid_cursor_coords # @return [Integer] def get_grid_cursor_col; end alias_method :grid_cursor_col, :get_grid_cursor_col # Returns the current grid cell row position. # # @see Wx::GRID::Grid#get_grid_cursor_coords # @return [Integer] def get_grid_cursor_row; end alias_method :grid_cursor_row, :get_grid_cursor_row # @overload go_to_cell(row, col) # Make the given cell current and ensure it is visible. # This method is equivalent to calling {Wx::GRID::Grid#make_cell_visible} and {Wx::GRID::Grid#set_grid_cursor} and so, as with the latter, a {Wx::GRID::EVT_GRID_SELECT_CELL} event is generated by it and the selected cell doesn't change if the event is vetoed. # @param row [Integer] # @param col [Integer] # @return [void] # @overload go_to_cell(coords) # Make the given cell current and ensure it is visible. # This method is equivalent to calling {Wx::GRID::Grid#make_cell_visible} and {Wx::GRID::Grid#set_grid_cursor} and so, as with the latter, a {Wx::GRID::EVT_GRID_SELECT_CELL} event is generated by it and the selected cell doesn't change if the event is vetoed. # @param coords [Wx::GridCellCoords] # @return [void] def go_to_cell(*args) end # Moves the grid cursor down by one row. # If a block of cells was previously selected it will expand if the argument is true or be cleared if the argument is false. # @param expandSelection [true,false] # @return [true,false] def move_cursor_down(expandSelection) end # Moves the grid cursor down in the current column such that it skips to the beginning or end of a block of non-empty cells. # If a block of cells was previously selected it will expand if the argument is true or be cleared if the argument is false. # @param expandSelection [true,false] # @return [true,false] def move_cursor_down_block(expandSelection) end # Moves the grid cursor left by one column. # If a block of cells was previously selected it will expand if the argument is true or be cleared if the argument is false. # @param expandSelection [true,false] # @return [true,false] def move_cursor_left(expandSelection) end # Moves the grid cursor left in the current row such that it skips to the beginning or end of a block of non-empty cells. # If a block of cells was previously selected it will expand if the argument is true or be cleared if the argument is false. # @param expandSelection [true,false] # @return [true,false] def move_cursor_left_block(expandSelection) end # Moves the grid cursor right by one column. # If a block of cells was previously selected it will expand if the argument is true or be cleared if the argument is false. # @param expandSelection [true,false] # @return [true,false] def move_cursor_right(expandSelection) end # Moves the grid cursor right in the current row such that it skips to the beginning or end of a block of non-empty cells. # If a block of cells was previously selected it will expand if the argument is true or be cleared if the argument is false. # @param expandSelection [true,false] # @return [true,false] def move_cursor_right_block(expandSelection) end # Moves the grid cursor up by one row. # If a block of cells was previously selected it will expand if the argument is true or be cleared if the argument is false. # @param expandSelection [true,false] # @return [true,false] def move_cursor_up(expandSelection) end # Moves the grid cursor up in the current column such that it skips to the beginning or end of a block of non-empty cells. # If a block of cells was previously selected it will expand if the argument is true or be cleared if the argument is false. # @param expandSelection [true,false] # @return [true,false] def move_cursor_up_block(expandSelection) end # Moves the grid cursor down by some number of rows so that the previous bottom visible row becomes the top visible row. # @return [true,false] def move_page_down; end # Moves the grid cursor up by some number of rows so that the previous top visible row becomes the bottom visible row. # @return [true,false] def move_page_up; end # @overload set_grid_cursor(row, col) # Set the grid cursor to the specified cell. # The grid cursor indicates the current cell and can be moved by the user using the arrow keys or the mouse. # Calling this function generates a {Wx::GRID::EVT_GRID_SELECT_CELL} event and if the event handler vetoes this event, the cursor is not moved. # This function doesn't make the target call visible, use {Wx::GRID::Grid#go_to_cell} to do this. # @param row [Integer] # @param col [Integer] # @return [void] # @overload set_grid_cursor(coords) # Set the grid cursor to the specified cell. # The grid cursor indicates the current cell and can be moved by the user using the arrow keys or the mouse. # Calling this function generates a {Wx::GRID::EVT_GRID_SELECT_CELL} event and if the event handler vetoes this event, the cursor is not moved. # This function doesn't make the target call visible, use {Wx::GRID::Grid#go_to_cell} to do this. # @param coords [Wx::GridCellCoords] # @return [void] def set_grid_cursor(*args) end alias_method :grid_cursor=, :set_grid_cursor # Set the grid's behaviour when the user presses the TAB key. # Pressing the TAB key moves the grid cursor right in the current row, if there is a cell at the right and, similarly, Shift-TAB moves the cursor to the left in the current row if it's not in the first column. # What happens if the cursor can't be moved because it it's already at the beginning or end of the row can be configured using this function, see {Wx::GRID::Grid::TabBehaviour} documentation for the detailed description. # IF none of the standard behaviours is appropriate, you can always handle {Wx::GRID::EVT_GRID_TABBING} event directly to implement a custom TAB-handling logic. # @param behaviour [TabBehaviour] # @return [void] def set_tab_behaviour(behaviour) end alias_method :tab_behaviour=, :set_tab_behaviour # Deselects all cells that are currently selected. # @return [void] def clear_selection; end # Deselects a row of cells. # @param row [Integer] # @return [void] def deselect_row(row) end # Deselects a column of cells. # @param col [Integer] # @return [void] def deselect_col(col) end # Deselects a cell. # @param row [Integer] # @param col [Integer] # @return [void] def deselect_cell(row, col) end # Returns an ordered range of non-overlapping selected rows. # For the grids using {Wx::GRID::Grid::GridSelectionModes::GridSelectRows} selection mode, returns the possibly empty vector containing the coordinates of non-overlapping selected row blocks in the natural order, i.e. from smallest to the biggest row indices. # To see the difference between this method and {Wx::GRID::Grid#get_selected_blocks}, consider the case when the user selects rows 2..4 in the grid and then also selects (using Ctrl/Shift keys) the rows 1..3. Iterating over the result of {Wx::GRID::Grid#get_selected_blocks} would yield two blocks directly corresponding to the users selection, while this method returns a vector with a single element corresponding to the rows 1..4. # This method returns empty vector for the other selection modes. # @see Wx::GRID::Grid#get_selected_blocks # @see Wx::GRID::Grid#get_selected_col_blocks # @return [Wx::GridBlockCoordsVector] def get_selected_row_blocks; end alias_method :selected_row_blocks, :get_selected_row_blocks # Returns an ordered range of non-overlapping selected columns. # This method is symmetric to {Wx::GRID::Grid#get_selected_row_blocks}, but is useful only in {Wx::GRID::Grid::GridSelectionModes::GridSelectColumns} selection mode. # @see Wx::GRID::Grid#get_selected_blocks # @return [Wx::GridBlockCoordsVector] def get_selected_col_blocks; end alias_method :selected_col_blocks, :get_selected_col_blocks # Returns an array of individually selected cells. # Notice that this array does not contain all the selected cells in general as it doesn't include the cells selected as part of column, row or block selection. You must use this method, {Wx::GRID::Grid#get_selected_cols}, {Wx::GRID::Grid#get_selected_rows} and {Wx::GRID::Grid#get_selection_block_top_left} and {Wx::GRID::Grid#get_selection_block_bottom_right} methods to obtain the entire selection in general. # Please notice this behaviour is by design and is needed in order to support grids of arbitrary size (when an entire column is selected in a grid with a million of columns, we don't want to create an array with a million of entries in this function, instead it returns an empty array and {Wx::GRID::Grid#get_selected_cols} returns an array containing one element). # The function can be slow for the big grids, use {Wx::GRID::Grid#get_selected_blocks} in the new code. # @return [Array] def get_selected_cells; end alias_method :selected_cells, :get_selected_cells # Returns an array of selected columns. # Please notice that this method alone is not sufficient to find all the selected columns as it contains only the columns which were individually selected but not those being part of the block selection or being selected in virtue of all of their cells being selected individually, please see {Wx::GRID::Grid#get_selected_cells} for more details. # The function can be slow for the big grids, use {Wx::GRID::Grid#get_selected_blocks} in the new code. # @return [Array] def get_selected_cols; end alias_method :selected_cols, :get_selected_cols # Returns an array of selected rows. # Please notice that this method alone is not sufficient to find all the selected rows as it contains only the rows which were individually selected but not those being part of the block selection or being selected in virtue of all of their cells being selected individually, please see {Wx::GRID::Grid#get_selected_cells} for more details. # The function can be slow for the big grids, use {Wx::GRID::Grid#get_selected_blocks} in the new code. # @return [Array] def get_selected_rows; end alias_method :selected_rows, :get_selected_rows # Returns the colour used for drawing the selection background. # @return [Wx::Colour] def get_selection_background; end alias_method :selection_background, :get_selection_background # Returns an array of the bottom right corners of blocks of selected cells. # Please see {Wx::GRID::Grid#get_selected_cells} for more information about the selection representation in {Wx::GRID::Grid}. # The function can be slow for the big grids, use {Wx::GRID::Grid#get_selected_blocks} in the new code. # @see Wx::GRID::Grid#get_selection_block_top_left # @return [Array] def get_selection_block_bottom_right; end alias_method :selection_block_bottom_right, :get_selection_block_bottom_right # Returns an array of the top left corners of blocks of selected cells. # Please see {Wx::GRID::Grid#get_selected_cells} for more information about the selection representation in {Wx::GRID::Grid}. # The function can be slow for the big grids, use {Wx::GRID::Grid#get_selected_blocks} in the new code. # @see Wx::GRID::Grid#get_selection_block_bottom_right # @return [Array] def get_selection_block_top_left; end alias_method :selection_block_top_left, :get_selection_block_top_left # Returns the colour used for drawing the selection foreground. # @return [Wx::Colour] def get_selection_foreground; end alias_method :selection_foreground, :get_selection_foreground # Returns the current selection mode. # # @see Wx::GRID::Grid#set_selection_mode. # @return [GridSelectionModes] def get_selection_mode; end alias_method :selection_mode, :get_selection_mode # Returns true if the given cell is selected. # @param row [Integer] # @param col [Integer] # @return [true,false] def is_in_selection(row, col) end alias_method :in_selection?, :is_in_selection # Returns true if there are currently any selected cells, rows, columns or blocks. # @return [true,false] def is_selection; end alias_method :selection?, :is_selection # Selects all cells in the grid. # @return [void] def select_all; end # Selects a rectangular block of cells. # If addToSelected is false then any existing selection will be deselected; if true the column will be added to the existing selection. # @param topRow [Integer] # @param leftCol [Integer] # @param bottomRow [Integer] # @param rightCol [Integer] # @param addToSelected [true,false] # @return [void] def select_block(topRow, leftCol, bottomRow, rightCol, addToSelected=false) end # Selects the specified column. # If addToSelected is false then any existing selection will be deselected; if true the column will be added to the existing selection. # This method won't select anything if the current selection mode is {Wx::GRID::Grid::GridSelectionModes::GridSelectRows}. # @param col [Integer] # @param addToSelected [true,false] # @return [void] def select_col(col, addToSelected=false) end # Selects the specified row. # If addToSelected is false then any existing selection will be deselected; if true the row will be added to the existing selection. # This method won't select anything if the current selection mode is {Wx::GRID::Grid::GridSelectionModes::GridSelectColumns}. # @param row [Integer] # @param addToSelected [true,false] # @return [void] def select_row(row, addToSelected=false) end # Set the colour to be used for drawing the selection background. # @param c [Wx::Colour,String,Symbol] # @return [void] def set_selection_background(c) end alias_method :selection_background=, :set_selection_background # Set the colour to be used for drawing the selection foreground. # @param c [Wx::Colour,String,Symbol] # @return [void] def set_selection_foreground(c) end alias_method :selection_foreground=, :set_selection_foreground # Set the selection behaviour of the grid. # The existing selection is converted to conform to the new mode if possible and discarded otherwise (e.g. any individual selected cells are deselected if the new mode allows only the selection of the entire rows or columns). # @param selmode [GridSelectionModes] # @return [void] def set_selection_mode(selmode) end alias_method :selection_mode=, :set_selection_mode # Returns the number of pixels per horizontal scroll increment. # The default is 15. # @see Wx::GRID::Grid#get_scroll_line_y # @see Wx::GRID::Grid#set_scroll_line_x # @see Wx::GRID::Grid#set_scroll_line_y # @return [Integer] def get_scroll_line_x; end alias_method :scroll_line_x, :get_scroll_line_x # Returns the number of pixels per vertical scroll increment. # The default is 15. # @see Wx::GRID::Grid#get_scroll_line_x # @see Wx::GRID::Grid#set_scroll_line_x # @see Wx::GRID::Grid#set_scroll_line_y # @return [Integer] def get_scroll_line_y; end alias_method :scroll_line_y, :get_scroll_line_y # Returns true if a cell is either entirely or at least partially visible in the grid window. # By default, the cell must be entirely visible for this function to return true but if wholeCellVisible is false, the function returns true even if the cell is only partially visible. # @param row [Integer] # @param col [Integer] # @param wholeCellVisible [true,false] # @return [true,false] def is_visible(row, col, wholeCellVisible=true) end alias_method :visible?, :is_visible # Brings the specified cell into the visible grid cell area with minimal scrolling. # Does nothing if the cell is already visible. # @param row [Integer] # @param col [Integer] # @return [void] def make_cell_visible(row, col) end # Returns the topmost row of the current visible area. # Returns -1 if the grid doesn't have any rows. # @return [Integer] def get_first_fully_visible_row; end alias_method :first_fully_visible_row, :get_first_fully_visible_row # Returns the leftmost column of the current visible area. # Returns -1 if the grid doesn't have any columns. # @return [Integer] def get_first_fully_visible_column; end alias_method :first_fully_visible_column, :get_first_fully_visible_column # Sets the number of pixels per horizontal scroll increment. # The default is 15. # @see Wx::GRID::Grid#get_scroll_line_x # @see Wx::GRID::Grid#get_scroll_line_y # @see Wx::GRID::Grid#set_scroll_line_y # @param x [Integer] # @return [void] def set_scroll_line_x(x) end alias_method :scroll_line_x=, :set_scroll_line_x # Sets the number of pixels per vertical scroll increment. # The default is 15. # @see Wx::GRID::Grid#get_scroll_line_x # @see Wx::GRID::Grid#get_scroll_line_y # @see Wx::GRID::Grid#set_scroll_line_x # @param y [Integer] # @return [void] def set_scroll_line_y(y) end alias_method :scroll_line_y=, :set_scroll_line_y # Convert grid cell coordinates to grid window pixel coordinates. # This function returns the rectangle that encloses the block of cells limited by topLeft and bottomRight cell in device coords and clipped to the client size of the grid window. # @see Wx::GRID::Grid#cell_to_rect # @param topLeft [Wx::GridCellCoords] # @param bottomRight [Wx::GridCellCoords] # @param gridWindow [Wx::GridWindow] # @return [Wx::Rect] def block_to_device_rect(topLeft, bottomRight, gridWindow=nil) end # Return the rectangle corresponding to the grid cell's size and position in logical coordinates. # # @see Wx::GRID::Grid#block_to_device_rect # @param row [Integer] # @param col [Integer] # @return [Wx::Rect] def cell_to_rect(row, col) end # @overload cell_to_grid_window(row, col) # Returns the grid window that contains the cell. # In a grid without frozen rows or columns (see {Wx::GRID::Grid#freeze_to}), this will always return the same window as {Wx::GRID::Grid#get_grid_window}, however if some parts of the grid are frozen, this function returns the window containing the given cell. # @param row [Integer] # @param col [Integer] # @return [Wx::GridWindow] # @overload cell_to_grid_window(coords) # This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. # @param coords [Wx::GridCellCoords] # @return [Wx::GridWindow] def cell_to_grid_window(*args) end # @overload device_pos_to_grid_window(pos) # Returns the grid window that includes the input coordinates. # @param pos [Wx::Point] # @return [Wx::GridWindow] # @overload device_pos_to_grid_window(x, y) # This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. # @param x [Integer] # @param y [Integer] # @return [Wx::GridWindow] def device_pos_to_grid_window(*args) end # @overload get_grid_window_offset(gridWindow, x, y) # Returns the grid window's offset from the grid starting position taking into account the frozen cells. # If there are no frozen cells, returns (0, 0). # @see Wx::GRID::Grid#freeze_to # @param gridWindow [Wx::GridWindow] # @param x [int] # @param y [int] # @return [void] # @overload get_grid_window_offset(gridWindow) # This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. # @param gridWindow [Wx::GridWindow] # @return [Wx::Point] def get_grid_window_offset(*args) end alias_method :grid_window_offset, :get_grid_window_offset # This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. # @param pt [Array(Integer, Integer), Wx::Point] # @param gridWindow [Wx::GridWindow] # @return [Wx::Point] def calc_grid_window_unscrolled_position(pt, gridWindow) end # This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. # @param pt [Array(Integer, Integer), Wx::Point] # @param gridWindow [Wx::GridWindow] # @return [Wx::Point] def calc_grid_window_scrolled_position(pt, gridWindow) end # Returns the column at the given pixel position depending on the window. # The column index or {Wx::NOT_FOUND}. # @param x [Integer] The x position to evaluate. # @param clipToMinMax [true,false] If true, rather than returning {Wx::NOT_FOUND}, it returns either the first or last column depending on whether x is too far to the left or right respectively. # @param gridWindow [Wx::GridWindow] The associated grid window that limits the search (note that this parameter is only available since wxWidgets 3.1.3). If gridWindow is NULL, it will consider all the cells, no matter which grid they belong to. # @return [Integer] def x_to_col(x, clipToMinMax=false, gridWindow=nil) end # Returns the column whose right hand edge is close to the given logical x position. # If no column edge is near to this position {Wx::NOT_FOUND} is returned. # @param x [Integer] # @return [Integer] def x_to_edge_of_col(x) end # @overload xy_to_cell(x, y, gridWindow=nil) # Translates logical pixel coordinates to the grid cell coordinates. # Notice that this function expects logical coordinates on input so if you use this function in a mouse event handler you need to translate the mouse position, which is expressed in device coordinates, to logical ones. # The parameter gridWindow is new since wxWidgets 3.1.3. If it is specified, i.e. non-NULL, the coordinates must be in this window coordinate system and only the cells of this window are considered, i.e. the function returns {Wx::NOT_FOUND} if the coordinates are out of bounds. # If gridWindow is NULL, coordinates are relative to the main grid window and all cells are considered. # @see Wx::GRID::Grid#x_to_col # @see Wx::GRID::Grid#y_to_row # @param x [Integer] # @param y [Integer] # @param gridWindow [Wx::GridWindow] # @return [Array(Integer, Integer)] # @overload xy_to_cell(pos, gridWindow=nil) # This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. # @param pos [Array(Integer, Integer), Wx::Point] # @param gridWindow [Wx::GridWindow] # @return [Array(Integer, Integer)] def xy_to_cell(*args) end # Returns the row whose bottom edge is close to the given logical y position. # If no row edge is near to this position {Wx::NOT_FOUND} is returned. # @param y [Integer] # @return [Integer] def y_to_edge_of_row(y) end # Returns the grid row that corresponds to the logical y coordinate. # The parameter gridWindow is new since wxWidgets 3.1.3. If it is specified, i.e. non-NULL, only the cells of this window are considered, i.e. the function returns {Wx::NOT_FOUND} if y is out of bounds. # If gridWindow is NULL, the function returns {Wx::NOT_FOUND} only if there is no row at all at the y position. # @param y [Integer] # @param clipToMinMax [true,false] # @param gridWindow [Wx::GridWindow] # @return [Integer] def y_to_row(y, clipToMinMax=false, gridWindow=nil) end # Appends one or more new columns to the right of the grid. # The updateLabels argument is not used at present. If you are using a derived grid table class you will need to override {Wx::GRID::GridTableBase#append_cols}. See {Wx::GRID::Grid#insert_cols} for further information. # true on success or false if appending columns failed. # @param numCols [Integer] # @param updateLabels [true,false] # @return [true,false] def append_cols(numCols=1, updateLabels=true) end # Appends one or more new rows to the bottom of the grid. # The updateLabels argument is not used at present. If you are using a derived grid table class you will need to override {Wx::GRID::GridTableBase#append_rows}. See {Wx::GRID::Grid#insert_rows} for further information. # true on success or false if appending rows failed. # @param numRows [Integer] # @param updateLabels [true,false] # @return [true,false] def append_rows(numRows=1, updateLabels=true) end # Return true if the horizontal grid lines stop at the last column boundary or false if they continue to the end of the window. # The default is to clip grid lines. # @see Wx::GRID::Grid#clip_horz_grid_lines # @see Wx::GRID::Grid#are_vert_grid_lines_clipped # @return [true,false] def are_horz_grid_lines_clipped; end # Return true if the vertical grid lines stop at the last row boundary or false if they continue to the end of the window. # The default is to clip grid lines. # @see Wx::GRID::Grid#clip_vert_grid_lines # @see Wx::GRID::Grid#are_horz_grid_lines_clipped # @return [true,false] def are_vert_grid_lines_clipped; end # Increments the grid's batch count. # When the count is greater than zero repainting of the grid is suppressed. Each call to BeginBatch must be matched by a later call to {Wx::GRID::Grid#end_batch}. Code that does a lot of grid modification can be enclosed between {Wx::GRID::Grid#begin_batch} and {Wx::GRID::Grid#end_batch} calls to avoid screen flicker. The final {Wx::GRID::Grid#end_batch} call will cause the grid to be repainted. # Notice that you should use {Wx::GridUpdateLocker} which ensures that there is always a matching {Wx::GRID::Grid#end_batch} call for this {Wx::GRID::Grid#begin_batch} if possible instead of calling this method directly. # @return [void] def begin_batch; end # Clears all data in the underlying grid table and repaints the grid. # The table is not deleted by this function. If you are using a derived table class then you need to override {Wx::GRID::GridTableBase#clear} for this function to have any effect. # @return [void] def clear_grid; end # Change whether the horizontal grid lines are clipped by the end of the last column. # By default the grid lines are not drawn beyond the end of the last column but after calling this function with clip set to false they will be drawn across the entire grid window. # @see Wx::GRID::Grid#are_horz_grid_lines_clipped # @see Wx::GRID::Grid#clip_vert_grid_lines # @param clip [true,false] # @return [void] def clip_horz_grid_lines(clip) end # Change whether the vertical grid lines are clipped by the end of the last row. # By default the grid lines are not drawn beyond the end of the last row but after calling this function with clip set to false they will be drawn across the entire grid window. # @see Wx::GRID::Grid#are_vert_grid_lines_clipped # @see Wx::GRID::Grid#clip_horz_grid_lines # @param clip [true,false] # @return [void] def clip_vert_grid_lines(clip) end # Deletes one or more columns from a grid starting at the specified position. # The updateLabels argument is not used at present. If you are using a derived grid table class you will need to override {Wx::GRID::GridTableBase#delete_cols}. See {Wx::GRID::Grid#insert_cols} for further information. # true on success or false if deleting columns failed. # @param pos [Integer] # @param numCols [Integer] # @param updateLabels [true,false] # @return [true,false] def delete_cols(pos=0, numCols=1, updateLabels=true) end # Deletes one or more rows from a grid starting at the specified position. # The updateLabels argument is not used at present. If you are using a derived grid table class you will need to override {Wx::GRID::GridTableBase#delete_rows}. See {Wx::GRID::Grid#insert_rows} for further information. # true on success or false if deleting rows failed. # @param pos [Integer] # @param numRows [Integer] # @param updateLabels [true,false] # @return [true,false] def delete_rows(pos=0, numRows=1, updateLabels=true) end # @overload freeze_to(row, col) # Sets or resets the frozen columns and rows. # true on success or false if it failed. # # Note that this method doesn't do anything, and returns false, if any of the following conditions are true: # - Either row or col are out of range- Size of the frozen area would be bigger than the current viewing area- There are any merged cells in the area to be frozen- Grid uses a native header control (see {Wx::GRID::Grid#use_native_col_header}) # # (some of these limitations could be lifted in the future). # @param row [unsigned] The number of rows to freeze, 0 means to unfreeze all rows. # @param col [unsigned] The number of columns to freeze, 0 means to unfreeze all columns. # @return [true,false] # @overload freeze_to(coords) # This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. # @param coords [Wx::GridCellCoords] # @return [true,false] def freeze_to(*args) end # Decrements the grid's batch count. # When the count is greater than zero repainting of the grid is suppressed. Each previous call to {Wx::GRID::Grid#begin_batch} must be matched by a later call to {Wx::GRID::Grid#end_batch}. Code that does a lot of grid modification can be enclosed between {Wx::GRID::Grid#begin_batch} and {Wx::GRID::Grid#end_batch} calls to avoid screen flicker. The final {Wx::GRID::Grid#end_batch} will cause the grid to be repainted. # @see Wx::GridUpdateLocker # @return [void] def end_batch; end # Overridden {Wx::Window} method. # @return [void] def fit; end # Causes immediate repainting of the grid. # Use this instead of the usual {Wx::Window#refresh}. # @return [void] def force_refresh; end # Returns the number of times that {Wx::GRID::Grid#begin_batch} has been called without (yet) matching calls to {Wx::GRID::Grid#end_batch}. # While the grid's batch count is greater than zero the display will not be updated. # @return [Integer] def get_batch_count; end alias_method :batch_count, :get_batch_count # Returns the total number of grid columns. # This is the same as the number of columns in the underlying grid table. # @return [Integer] def get_number_cols; end alias_method :number_cols, :get_number_cols # Returns the total number of grid rows. # This is the same as the number of rows in the underlying grid table. # @return [Integer] def get_number_rows; end alias_method :number_rows, :get_number_rows # Returns the number of frozen grid columns. # If there are no frozen columns, returns 0. # @see Wx::GRID::Grid#freeze_to # @return [Integer] def get_number_frozen_cols; end alias_method :number_frozen_cols, :get_number_frozen_cols # Returns the number of frozen grid rows. # If there are no frozen rows, returns 0. # @see Wx::GRID::Grid#freeze_to # @return [Integer] def get_number_frozen_rows; end alias_method :number_frozen_rows, :get_number_frozen_rows # Returns the attribute for the given cell creating one if necessary. # If the cell already has an attribute, it is returned. Otherwise a new attribute is created, associated with the cell and returned. In any case the caller must call DecRef() on the returned pointer. # Prefer to use {Wx::GRID::Grid#get_or_create_cell_attr_ptr} to avoid the need to call DecRef() on the returned pointer. # This function may only be called if {Wx::GRID::Grid#can_have_attributes} returns true. # @param row [Integer] # @param col [Integer] # @return [Wx::GRID::GridCellAttr] def get_or_create_cell_attr(row, col) end alias_method :or_create_cell_attr, :get_or_create_cell_attr # Returns a base pointer to the current table object. # The returned pointer is still owned by the grid. # @return [Wx::GridTableBase] def get_table; end alias_method :table, :get_table # Inserts one or more new columns into a grid with the first new column at the specified position. # Notice that inserting the columns in the grid requires grid table cooperation: when this method is called, grid object begins by requesting the underlying grid table to insert new columns. If this is successful the table notifies the grid and the grid updates the display. For a default grid (one where you have called {Wx::GRID::Grid#create_grid}) this process is automatic. If you are using a custom grid table (specified with {Wx::GRID::Grid#set_table} or {Wx::GRID::Grid#assign_table}) then you must override {Wx::GRID::GridTableBase#insert_cols} in your derived table class. # # true if the columns were successfully inserted, false if an error occurred (most likely the table couldn't be updated). # @param pos [Integer] The position which the first newly inserted column will have. # @param numCols [Integer] The number of columns to insert. # @param updateLabels [true,false] Currently not used. # @return [true,false] def insert_cols(pos=0, numCols=1, updateLabels=true) end # Inserts one or more new rows into a grid with the first new row at the specified position. # Notice that you must implement {Wx::GRID::GridTableBase#insert_rows} if you use a grid with a custom table, please see {Wx::GRID::Grid#insert_cols} for more information. # # true if the rows were successfully inserted, false if an error occurred (most likely the table couldn't be updated). # @param pos [Integer] The position which the first newly inserted row will have. # @param numRows [Integer] The number of rows to insert. # @param updateLabels [true,false] Currently not used. # @return [true,false] def insert_rows(pos=0, numRows=1, updateLabels=true) end # Invalidates the cached attribute for the given cell. # For efficiency reasons, {Wx::GRID::Grid} may cache the recently used attributes (currently it caches only the single most recently used one, in fact) which can result in the cell appearance not being refreshed even when the attribute returned by your custom {Wx::GridCellAttrProvider}-derived class has changed. To force the grid to refresh the cell attribute, this function may be used. Notice that calling it will not result in actually redrawing the cell, you still need to call {Wx::Window#refresh_rect} to invalidate the area occupied by the cell in the window to do this. Also note that you don't need to call this function if you store the attributes in {Wx::GRID::Grid} itself, i.e. use its {Wx::GRID::Grid#set_attr} and similar methods, it is only useful when using a separate custom attributes provider. # @param row [Integer] The row of the cell whose attribute needs to be queried again. # @param col [Integer] The column of the cell whose attribute needs to be queried again. # @return [void] def refresh_attr(row, col) end # @overload refresh_block(topLeft, bottomRight) # Redraw all the cells in the given block. # Refresh the block of cells with the given corners. # If the bottom right corner coordinates are invalid, i.e. set to -1, the top left corner coordinates are used for it, i.e. just a single cell is refreshed. If the top left corner coordinates are invalid as well, the function simply returns without doing anything. Note, however, that both coordinates need to be valid or invalid simultaneously, i.e. setting the top row to -1 but using a valid value for the left column is unsupported and would result in an assertion failure. # @param topLeft [Wx::GridCellCoords] # @param bottomRight [Wx::GridCellCoords] # @return [void] # @overload refresh_block(topRow, leftCol, bottomRow, rightCol) # This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. # @param topRow [Integer] # @param leftCol [Integer] # @param bottomRow [Integer] # @param rightCol [Integer] # @return [void] def refresh_block(*args) end # Draws part or all of a {Wx::GRID::Grid} on a {Wx::DC} for printing or display. # Pagination can be accomplished by using sequential {Wx::GRID::Grid#render} calls with appropriate values in {Wx::GridCellCoords} topLeft and bottomRight. # @param dc [Wx::DC] The {Wx::DC} to be drawn on. # @param pos [Array(Integer, Integer), Wx::Point] The position on the {Wx::DC} where rendering should begin. If not specified drawing will begin at the {Wx::DC} MaxX() and MaxY(). # @param size [Array(Integer, Integer), Wx::Size] The size of the area on the {Wx::DC} that the rendered {Wx::GRID::Grid} should occupy. If not specified the drawing will be scaled to fit the available dc width or height. The {Wx::GRID::Grid}'s aspect ratio is maintained whether or not size is specified. # @param topLeft [Wx::GridCellCoords] The top left cell of the block to be drawn. Defaults to ( 0, 0 ). # @param bottomRight [Wx::GridCellCoords] The bottom right cell of the block to be drawn. Defaults to row and column counts. # @param style [Integer] A combination of values from {Wx::GRID::GridRenderStyle}. # @return [void] def render(dc, pos=Wx::DEFAULT_POSITION, size=Wx::DEFAULT_SIZE, topLeft=(Wx::GridCellCoords.new(-1, -1)), bottomRight=(Wx::GridCellCoords.new(-1, -1)), style=Wx::GRID_DRAW_DEFAULT) end # Sets the cell attributes for the specified cell. # The grid takes ownership of the attribute pointer. # See the {Wx::GRID::GridCellAttr} class for more information about controlling cell attributes. # @param row [Integer] # @param col [Integer] # @param attr [Wx::GridCellAttr] # @return [void] def set_attr(row, col, attr) end # Sets the cell attributes for all cells in the specified column. # For more information about controlling grid cell attributes see the {Wx::GRID::GridCellAttr} cell attribute class and the wxGrid Overview. # @param col [Integer] # @param attr [Wx::GridCellAttr] # @return [void] def set_col_attr(col, attr) end # Sets the extra margins used around the grid area. # A grid may occupy more space than needed for its data display and this function allows setting how big this extra space is # @param extraWidth [Integer] # @param extraHeight [Integer] # @return [void] def set_margins(extraWidth, extraHeight) end # Sets the cell attributes for all cells in the specified row. # The grid takes ownership of the attribute pointer. # See the {Wx::GRID::GridCellAttr} class for more information about controlling cell attributes. # @param row [Integer] # @param attr [Wx::GridCellAttr] # @return [void] def set_row_attr(row, attr) end # Appends one or more new columns to the right of the grid. # The updateLabels argument is not used at present. If you are using a derived grid table class you will need to override {Wx::GRID::GridTableBase#append_cols}. See {Wx::GRID::Grid#insert_cols} for further information. # true on success or false if appending columns failed. # @param reg [Wx::Region] # @param gridWindow [Wx::GridWindow] # @return [Array] def calc_row_labels_exposed(reg, gridWindow=nil) end # Appends one or more new columns to the right of the grid. # The updateLabels argument is not used at present. If you are using a derived grid table class you will need to override {Wx::GRID::GridTableBase#append_cols}. See {Wx::GRID::Grid#insert_cols} for further information. # true on success or false if appending columns failed. # @param reg [Wx::Region] # @param gridWindow [Wx::GridWindow] # @return [Array] def calc_col_labels_exposed(reg, gridWindow=nil) end # Appends one or more new columns to the right of the grid. # The updateLabels argument is not used at present. If you are using a derived grid table class you will need to override {Wx::GRID::GridTableBase#append_cols}. See {Wx::GRID::Grid#insert_cols} for further information. # true on success or false if appending columns failed. # @param reg [Wx::Region] # @param gridWindow [Wx::GridWindow] # @return [Array] def calc_cells_exposed(reg, gridWindow=nil) end # Return the column in which the sorting indicator is currently displayed. # Returns {Wx::NOT_FOUND} if sorting indicator is not currently displayed at all. # @see Wx::GRID::Grid#set_sorting_column # @return [Integer] def get_sorting_column; end alias_method :sorting_column, :get_sorting_column # Return true if this column is currently used for sorting. # # @see Wx::GRID::Grid#get_sorting_column # @param col [Integer] # @return [true,false] def is_sorting_by(col) end alias_method :sorting_by?, :is_sorting_by # Return true if the current sorting order is ascending or false if it is descending. # It only makes sense to call this function if {Wx::GRID::Grid#get_sorting_column} returns a valid column index and not {Wx::NOT_FOUND}. # @see Wx::GRID::Grid#set_sorting_column # @return [true,false] def is_sort_order_ascending; end alias_method :sort_order_ascending?, :is_sort_order_ascending # Set the column to display the sorting indicator in and its direction. # # @see Wx::GRID::Grid#get_sorting_column # @see Wx::GRID::Grid#is_sort_order_ascending # @param col [Integer] The column to display the sorting indicator in or {Wx::NOT_FOUND} to remove any currently displayed sorting indicator. # @param ascending [true,false] If true, display the ascending sort indicator, otherwise display the descending sort indicator. # @return [void] def set_sorting_column(col, ascending=true) end alias_method :sorting_column=, :set_sorting_column # Remove any currently shown sorting indicator. # This is equivalent to calling {Wx::GRID::Grid#set_sorting_column} with {Wx::NOT_FOUND} first argument. # @return [void] def unset_sorting_column; end # Return the main grid window containing the grid cells. # This window is always shown. # @return [Wx::Window] def get_grid_window; end alias_method :grid_window, :get_grid_window # Return the corner grid window containing frozen cells. # This window is shown only when there are frozen rows and columns. # @return [Wx::Window] def get_frozen_corner_grid_window; end alias_method :frozen_corner_grid_window, :get_frozen_corner_grid_window # Return the rows grid window containing row frozen cells. # This window is shown only when there are frozen rows. # @return [Wx::Window] def get_frozen_row_grid_window; end alias_method :frozen_row_grid_window, :get_frozen_row_grid_window # Return the columns grid window containing column frozen cells. # This window is shown only when there are frozen columns. # @return [Wx::Window] def get_frozen_col_grid_window; end alias_method :frozen_col_grid_window, :get_frozen_col_grid_window # Return the row labels window. # This window is not shown if the row labels were hidden using {Wx::GRID::Grid#hide_row_labels}. # @return [Wx::Window] def get_grid_row_label_window; end alias_method :grid_row_label_window, :get_grid_row_label_window # Return the column labels window. # This window is not shown if the columns labels were hidden using {Wx::GRID::Grid#hide_col_labels}. # Depending on whether {Wx::GRID::Grid#use_native_col_header} was called or not this can be either a {Wx::HeaderCtrl} or a plain {Wx::Window}. This function returns a valid window pointer in either case but in the former case you can also use {Wx::GRID::Grid#get_grid_col_header} to access it if you need {Wx::HeaderCtrl}-specific functionality. # @return [Wx::Window] def get_grid_col_label_window; end alias_method :grid_col_label_window, :get_grid_col_label_window # Return the window in the top left grid corner. # This window is shown only of both columns and row labels are shown and normally doesn't contain anything. Clicking on it is handled by {Wx::GRID::Grid} however and can be used to select the entire grid. # @return [Wx::Window] def get_grid_corner_label_window; end alias_method :grid_corner_label_window, :get_grid_corner_label_window # Return the header control used for column labels display. # This function can only be called if {Wx::GRID::Grid#use_native_col_header} had been called. # @see Wx::GRID::Grid#is_using_native_header # @return [Wx::HeaderCtrl] def get_grid_col_header; end alias_method :grid_col_header, :get_grid_col_header # Return true if native header control is currently being used. # @return [true,false] def is_using_native_header; end alias_method :using_native_header?, :is_using_native_header # @param dc [Wx::DC] # @param attr [Wx::GridCellAttr] # @return [void] def draw_cell_highlight(dc, attr) end # @param dc [Wx::DC] # @param rows [Array] # @return [void] def draw_row_labels(dc, rows) end # @param dc [Wx::DC] # @param row [Integer] # @return [void] def draw_row_label(dc, row) end # @param dc [Wx::DC] # @param cols [Array] # @return [void] def draw_col_labels(dc, cols) end # @param dc [Wx::DC] # @param col [Integer] # @return [void] def draw_col_label(dc, col) end # @param dc [Wx::DC] # @return [void] def draw_corner_label(dc) end # @overload draw_text_rectangle(dc, text, rect, horizontalAlignment=Wx::ALIGN_LEFT, verticalAlignment=Wx::ALIGN_TOP, textOrientation=Wx::HORIZONTAL) # @param dc [Wx::DC] # @param text [String] # @param rect [Wx::Rect] # @param horizontalAlignment [Integer] # @param verticalAlignment [Integer] # @param textOrientation [Integer] # @return [void] # @overload draw_text_rectangle(dc, lines, rect, horizontalAlignment=Wx::ALIGN_LEFT, verticalAlignment=Wx::ALIGN_TOP, textOrientation=Wx::HORIZONTAL) # @param dc [Wx::DC] # @param lines [Array] # @param rect [Wx::Rect] # @param horizontalAlignment [Integer] # @param verticalAlignment [Integer] # @param textOrientation [Integer] # @return [void] def draw_text_rectangle(*args) end # @return [Wx::Colour] def get_cell_highlight_colour; end alias_method :cell_highlight_colour, :get_cell_highlight_colour # @return [Integer] def get_cell_highlight_pen_width; end alias_method :cell_highlight_pen_width, :get_cell_highlight_pen_width # @return [Integer] def get_cell_highlight_ro_pen_width; end alias_method :cell_highlight_ro_pen_width, :get_cell_highlight_ro_pen_width # @param arg [Wx::Colour,String,Symbol] # @return [void] def set_cell_highlight_colour(arg) end alias_method :cell_highlight_colour=, :set_cell_highlight_colour # @param width [Integer] # @return [void] def set_cell_highlight_pen_width(width) end alias_method :cell_highlight_pen_width=, :set_cell_highlight_pen_width # @param width [Integer] # @return [void] def set_cell_highlight_ro_pen_width(width) end alias_method :cell_highlight_ro_pen_width=, :set_cell_highlight_ro_pen_width # @param arg [Wx::Colour,String,Symbol] # @return [void] def set_grid_frozen_border_colour(arg) end alias_method :grid_frozen_border_colour=, :set_grid_frozen_border_colour # @param width [Integer] # @return [void] def set_grid_frozen_border_pen_width(width) end alias_method :grid_frozen_border_pen_width=, :set_grid_frozen_border_pen_width end # Grid end