gtk Constants

gtk Constants — the built-in constants of the gtk module

Synopsis

GTK Accel Flags Constants
GTK Anchor Type Constants
GTK Arrow Type Constants
GTK Assistant Page Type Constants
GTK Attach Flag Options Constants
GTK ButtonBox Style Constants
GTK Buttons Type Constants
GTK Calendar Display Options Constants
GTK CellRenderer Mode Constants
GTK CellRenderer State Constants
GTK CellRendererAccel Mode Constants
GTK Corner Type Constants
GTK Curve Type Constants
GTK Debug Flag Constants
GTK Delete Type Constants
GTK Dest Defaults Constants
GTK Dialog Flag Constants
GTK Direction Type Constants
GTK Expander Style Constants
GTK FileChooser Action Constants
GTK FileChooser Confirmation Constants
GTK FileChooser Error Constants
GTK FileFilter Flags Constants
GTK Icon Lookup Flags Constants
GTK Icon Size Constants
GTK IconTheme Error Constants
GTK IconView Drop Position Constants
GTK IM Pre-edit Style Constants
GTK IM Status Style Constants
GTK Image Type Constants
GTK Justification Constants
GTK Menu Direction Type Constants
GTK Message Type Constants
GTK Metric Type Constants
GTK Movement Step Constants
GTK Notebook Tab Constants
GTK Object Flags Constants
GTK Orientation Constants
GTK Pack Direction Constants
GTK Pack Type Constants
GTK Page Orientation Constants
GTK Page Set Constants
GTK Papaer Name Constants
GTK Path Priority Type Constants
GTK Path Type Constants
GTK Policy Type Constants
GTK Position Type Constants
GTK Print Duplex Constants
GTK Print Error Constants
GTK Print Pages Constants
GTK Print Operation Action Constants
GTK Print Operation Result Constants
GTK Print Quality Constants
GTK Print Status Constants
GTK ProgressBar Orientation Constants
GTK ProgressBar Style Constants
GTK RC Flags Constants
GTK RC Token Type Constants
GTK Recent Chooser Error Constants
GTK Recent Filter Flags
GTK Recent Sort Type Constants
GTK Relief Style Constants
GTK Resize Mode Constants
GTK Response Type Constants
GTK Scroll Step Constants
GTK Scroll Type Constants
GTK Selection Mode Constants
GTK Shadow Type Constants
GTK SizeGroup Mode Constants
GTK Sort Type Constants
GTK SpinButton Update Policy Constants
GTK Spin Type Constants
GTK State Type Constants
GTK Target Flags Constants
GTK Text Direction Constants
GTK Text Search Flags Constants Constants
GTK Text Window Type Constants
GTK TextBuffer Target Info Constants
GTK Toolbar Space Style Constants
GTK Toolbar Style Constants
GTK TreeModel Flags Constants
GTK TreeView Drop Position Constants
GTK TreeView Grid Lines Constants
GTK TreeViewColumn Sizing Constants
GTK UIManager Item Type Constants
GTK Unit Constants
GTK Update Type Constants
GTK Version Constants
GTK Widget Flags  Constants
GTK Widget Help Type Constants
GTK Window Position Constants
GTK Window Type Constants
GTK Wrap Mode Constants

Description

GTK Accel Flags Constants

The Accel Flags constants are a set of bit-flags that specify characteristics of the accelerator.

gtk.ACCEL_VISIBLEif set, the accelerator is visible in a label
gtk.ACCEL_LOCKEDIf set the accelerator cannot be changed by the user.
gtk.ACCEL_MASKA mask for the Accel Flags

GTK Anchor Type Constants

The Anchor Type constants specify the anchor point of a widget.

gtk.ANCHOR_CENTER
gtk.ANCHOR_NORTH
gtk.ANCHOR_NORTH_WEST
gtk.ANCHOR_NORTH_EAST
gtk.ANCHOR_SOUTH
gtk.ANCHOR_SOUTH_WEST
gtk.ANCHOR_SOUTH_EAST
gtk.ANCHOR_WEST
gtk.ANCHOR_EAST,
gtk.ANCHOR_NSame as gtk.ANCHOR_NORTH
gtk.ANCHOR_NWSame as gtk.ANCHOR_NORTH_WEST
gtk.ANCHOR_NESame as gtk.ANCHOR_NORTH_EAST
gtk.ANCHOR_SSame as gtk.ANCHOR_SOUTH
gtk.ANCHOR_SWSame as gtk.ANCHOR_SOUTH_WEST
gtk.ANCHOR_SESame as gtk.ANCHOR_SOUTH_EAST
gtk.ANCHOR_WSame as gtk.ANCHOR_WEST
gtk.ANCHOR_ESame as gtk.ANCHOR_EAST

GTK Arrow Type Constants

The Arrow Type constants specify the direction a gtk.Arrow should point.

gtk.ARROW_UPRepresents an upward pointing arrow.
gtk.ARROW_DOWNRepresents a downward pointing arrow.
gtk.ARROW_LEFTRepresents a left pointing arrow.
gtk.ARROW_RIGHTRepresents a right pointing arrow.

GTK Assistant Page Type Constants

The Assistant Page Type constants are used to determine the page role inside the gtk.Assistant. It's used to handle buttons sensitivity and visibility.

Note

An assistant needs to end its page flow with a page of type gtk.ASSISTANT_PAGE_CONFIRM or gtk.ASSISTANT_PAGE_SUMMARY to be correct.

gtk.ASSISTANT_PAGE_CONTENTThe page has regular contents.
gtk.ASSISTANT_PAGE_INTROThe page contains an introduction to the assistant task.
gtk.ASSISTANT_PAGE_CONFIRMThe page lets the user confirm or deny the changes.
gtk.ASSISTANT_PAGE_SUMMARYThe page informs the user of the changes done.
gtk.ASSISTANT_PAGE_PROGRESSUsed for tasks that take a long time to complete, blocks the assistant until the page is marked as complete.

GTK Attach Flag Options Constants

The Attach Flag Options constants are a set of bit-flags that specify the expansion properties that a widget will have when it (or its parent) is resized.

gtk.EXPANDThe widget should expand to take up any extra space in its container that has been allocated.
gtk.SHRINKThe widget should shrink as and when possible.
gtk.FILLThe widget should fill the space allocated to it.

GTK ButtonBox Style Constants

The ButtonBox Style constants specify the style that a gtk.ButtonBox uses to layout the buttons it contains. (See also: gtk.VButtonBox and gtk.HButtonBox).

gtk.BUTTONBOX_DEFAULT_STYLEDefault packing.
gtk.BUTTONBOX_SPREADButtons are evenly spread across the ButtonBox.
gtk.BUTTONBOX_EDGEButtons are placed at the edges of the ButtonBox.
gtk.BUTTONBOX_STARTButtons are grouped toward the start of box, (on the left for a HBox, or the top for a VBox).
gtk.BUTTONBOX_ENDButtons are grouped toward the end of a box, (on the right for a HBox, or the bottom for a VBox).

GTK Buttons Type Constants

The Buttons Type constants specify the pre-defined sets of buttons for the dialog. If none of these choices are appropriate, simply use gtk.BUTTONS_NONE then call the add_buttons() method.

gtk.BUTTONS_NONEno buttons at all
gtk.BUTTONS_OKan OK button
gtk.BUTTONS_CLOSEa Close button
gtk.BUTTONS_CANCELa Cancel button
gtk.BUTTONS_YES_NOYes and No buttons
gtk.BUTTONS_OK_CANCELOK and Cancel buttons

GTK Calendar Display Options Constants

The Calendar Display Options constants are a set of bit-flags that specify the display and behavior of a gtk.Calendar.

gtk.CALENDAR_SHOW_HEADINGSpecifies that the month and year should be displayed.
gtk.CALENDAR_SHOW_DAY_NAMESSpecifies that three letter day descriptions should be present.
gtk.CALENDAR_NO_MONTH_CHANGEPrevents the user from switching months with the calendar.
gtk.CALENDAR_SHOW_WEEK_NUMBERSDisplays each week numbers of the current year, down the left side of the calendar.
gtk.CALENDAR_WEEK_START_MONDAYSince GTK+ 2.4, this option is deprecated and ignored by GTK+. The information on which day the calendar week starts is derived from the locale.

GTK CellRenderer Mode Constants

The CellRenderer Mode constants specify how the user can interact with a particular cell.

gtk.CELL_RENDERER_MODE_INERTThe cell is just for display and cannot be interacted with. Note that this doesn't mean that e.g. the row being drawn can't be selected -- just that a particular element of it cannot be individually modified.
gtk.CELL_RENDERER_MODE_ACTIVATABLEThe cell can be clicked.
gtk.CELL_RENDERER_MODE_EDITABLEThe cell can be edited or otherwise modified.

GTK CellRenderer State Constants

The CellRenderer State constants specify how a cell is to be rendered.

gtk.CELL_RENDERER_SELECTEDThe cell is currently selected, and probably has a selection colored background to render to.
gtk.CELL_RENDERER_PRELITThe mouse is hovering over the cell.
gtk.CELL_RENDERER_INSENSITIVEThe cell is drawn in an insensitive manner
gtk.CELL_RENDERER_SORTEDThe cell is in a sorted row
gtk.CELL_RENDERER_FOCUSEDThe cell has the focus.

GTK CellRendererAccel Mode Constants

The CellRendererAccel Mode constants specify if the edited accelerators are GTK+ accelerators. If they are, consumed modifiers are suppressed, only accelerators accepted by GTK+ are allowed, and the accelerators are rendered in the same way as they are in menus.

gtk.CELL_RENDERER_ACCEL_MODE_GTKOnly accelerators accepted by GTK+ are allowed.
gtk.CELL_RENDERER_ACCEL_MODE_OTHERAny accelerators are allowed.

GTK Corner Type Constants

The Corner Type constants specify the corner a child widget should be placed in when packed into a gtk.ScrolledWindow. This is effectively the opposite of where the scroll bars are placed.

gtk.CORNER_TOP_LEFTPlace the scrollbars on the right and bottom of the widget (default behavior).
gtk.CORNER_BOTTOM_LEFTPlace the scrollbars on the top and right of the widget.
gtk.CORNER_TOP_RIGHTPlace the scrollbars on the left and bottom of the widget.
gtk.CORNER_BOTTOM_RIGHTPlace the scrollbars on the top and left of the widget.

GTK Curve Type Constants

The Curve Type constants specify the type of curve to use for a gtk.Curve.

gtk.CURVE_TYPE_LINEARLinear interpolation
gtk.CURVE_TYPE_SPLINESpline interpolation
gtk.CURVE_TYPE_FREEFree form curve

GTK Debug Flag Constants

The Debug Flag constants are a set of bit-flags that specify the debug options.

gtk.DEBUG_MISC
gtk.DEBUG_PLUGSOCKET
gtk.DEBUG_TEXT
gtk.DEBUG_TREE
gtk.DEBUG_UPDATES
gtk.DEBUG_KEYBINDINGS
gtk.DEBUG_MULTIHEAD

GTK Delete Type Constants

The Delete Type constants specify the deletion type.

gtk.DELETE_CHARSDelete a character at the cursor
gtk.DELETE_WORD_ENDSDelete from the cursor to the end of a word
gtk.DELETE_WORDSDelete a number of words
gtk.DELETE_DISPLAY_LINESDelete a single line at the cursor
gtk.DELETE_DISPLAY_LINE_ENDS,Delete from the cursor to the end of the line.
gtk.DELETE_PARAGRAPH_ENDSDelete from the cursor to a paragraph end (usually to the period)
gtk.DELETE_PARAGRAPHSDelete several complete paragraphs at the cursor
gtk.DELETE_WHITESPACEDelete the whitespace at the cursor.

GTK Dest Defaults Constants

The Dest Defaults constants are a set of bit-flags that specify the various types of action that will be taken on behalf of the user for a drag destination site.

gtk.DEST_DEFAULT_MOTIONIf set for a widget, during a drag over this widget will check if the drag matches this widget's list of possible targets and actions. The gtk.gdk.DragContext.drag_status() method will be called as appropriate.
gtk.DEST_DEFAULT_HIGHLIGHT If set for a widget, draw a highlight on this widget as long as a drag is over this widget and the widget drag format and action are acceptable.
gtk.DEST_DEFAULT_DROPIf set for a widget, when a drop occurs, check if the drag matches this widget's list of possible targets and actions. If so, call the gtk.Widget.drag_get_data() method on behalf of the widget. Whether or not the drop is successful, call the gtk.gdk.DragContext.finish() method. If the action was a move, then if the drag was successful, then TRUE will be passed for the delete parameter to the gtk.gdk.DragContext.finish() method.
gtk.DEST_DEFAULT_ALLIf set, specifies that all default actions should be taken.

GTK Dialog Flag Constants

The Dialog Flag constants are a set of bit-flags that specify characteristics of a dialog.

gtk.DIALOG_MODALIf set, the dialog grabs all keyboard events
gtk.DIALOG_DESTROY_WITH_PARENTIf set, the dialog is destroyed when its parent is.
gtk.DIALOG_NO_SEPARATORIf set, there is no separator bar above the buttons.

GTK Direction Type Constants

The Direction Type constants specify a direction for moving a cursor or focus.

gtk.DIR_TAB_FORWARDTab forward.
gtk.DIR_TAB_BACKWARDTab backward.
gtk.DIR_UPUp.
gtk.DIR_DOWNDown.
gtk.DIR_LEFTLeft.
gtk.DIR_RIGHTRight.

GTK Expander Style Constants

The Expander Style constants specify the style of the expanders drawn by a gtk.TreeView

gtk.EXPANDER_COLLAPSEDThe style used for a collapsed subtree.
gtk.EXPANDER_SEMI_COLLAPSEDIntermediate style used during animation.
gtk.EXPANDER_SEMI_EXPANDEDIntermediate style used during animation.
gtk.EXPANDER_EXPANDEDThe style used for an expanded subtree.

GTK FileChooser Action Constants

The FileChooser Action constants specify the mode of a gtk.FileChooser i.e. whether it is being used to open existing files or to save to a possibly new file.

gtk.FILE_CHOOSER_ACTION_OPENIndicates open mode. The file chooser will only let the user pick an existing file.
gtk.FILE_CHOOSER_ACTION_SAVEIndicates save mode. The file chooser will let the user pick an existing file, or type in a new filename.
gtk.FILE_CHOOSER_ACTION_SELECT_FOLDERIndicates an Open mode for selecting folders. The file chooser will let the user pick an existing folder.
gtk.FILE_CHOOSER_ACTION_CREATE_FOLDERIndicates a mode for creating a new folder. The file chooser will let the user name an existing or new folder.

GTK FileChooser Confirmation Constants

Note

These constants are available in PyGTK 2.8 and above.

The FileChooser Confirmation constants are used to specify the return value of a gtk.FileChooser "confirm-overwrite" signal handler. This value determines whether the file chooser will present the stock confirmation dialog, accept the user's choice of a filename, or let the user choose another filename.

gtk.FILE_CHOOSER_CONFIRMATION_CONFIRMThe file chooser will present its stock dialog to confirm overwriting an existing file.
gtk.FILE_CHOOSER_CONFIRMATION_ACCEPT_FILENAMEThe file chooser will terminate and accept the user's choice of a file name.
gtk.FILE_CHOOSER_CONFIRMATION_SELECT_AGAINThe file chooser will continue running, allowing the user to select another file name.

GTK FileChooser Error Constants

The FileChooser Error constants specify the various errors that can occur while calling gtk.FileChooser functions.

gtk.FILE_CHOOSER_ERROR_NONEXISTENTIndicates that a file does not exist.
gtk.FILE_CHOOSER_ERROR_BAD_FILENAMEIndicates a malformed filename.

GTK FileFilter Flags Constants

The FileFilter Flags constants are a set of bit-flags that specify the file types to filter the files against.

gtk.FILE_FILTER_FILENAMEThe full pathname of the file e.g. /tmp/junk.
gtk.FILE_FILTER_URIThe full URI of the file e.g. file:///tmp/junk.
gtk.FILE_FILTER_DISPLAY_NAMEThe simple name of the file e.g. junk.
gtk.FILE_FILTER_MIME_TYPEThe MIME type of the file e.g. text/html.

GTK Icon Lookup Flags Constants

The Icon Lookup Flags constants are a set of bit-flags that specify options for the gtk.IconTheme.lookup_icon() method

gtk.ICON_LOOKUP_NO_SVG Never return SVG (Scalable Vector Graphics) icons, even if gdk-pixbuf supports them. Cannot be used together with gtk.ICON_LOOKUP_FORCE_SVG.
gtk.ICON_LOOKUP_FORCE_SVGReturn SVG icons, even if gdk-pixbuf doesn't support them. Cannot be used together with gtk.ICON_LOOKUP_NO_SVG.
gtk.ICON_LOOKUP_USE_BUILTINWhen passed to the gtk.IconTheme.lookup_icon() method includes builtin icons as well as files. For a builtin icon, the gtk.IconInfo.get_filename() method returns None and you need to call the gtk.IconInfo.get_builtin_pixbuf() method.

GTK Icon Size Constants

The Icon Size constants specify the pre-defined sizes of icons for various application uses.

gtk.ICON_SIZE_INVALID
gtk.ICON_SIZE_MENU
gtk.ICON_SIZE_SMALL_TOOLBAR
gtk.ICON_SIZE_LARGE_TOOLBAR
gtk.ICON_SIZE_BUTTON
gtk.ICON_SIZE_DND
gtk.ICON_SIZE_DIALOG

GTK IconTheme Error Constants

The IconTheme Error constants specify error codes for gtk.IconTheme operations.

gtk.ICON_THEME_NOT_FOUNDThe icon specified does not exist in the theme
gtk.ICON_THEME_FAILEDAn unspecified error occurred.

GTK IconView Drop Position Constants

The IconView Drop Position constants specify the location relative to the receiving item where the drop should take place.

gtk.ICON_VIEW_NO_DROP
gtk.ICON_VIEW_DROP_INTO
gtk.ICON_VIEW_DROP_LEFT
gtk.ICON_VIEW_DROP_RIGHT
gtk.ICON_VIEW_DROP_ABOVE
gtk.ICON_VIEW_DROP_BELOW

GTK IM Pre-edit Style Constants

The IM Pre-edit Style constants specify the style of input method pre-edit display.

gtk.IM_PREEDIT_NOTHING
gtk.IM_PREEDIT_CALLBACK
gtk.IM_PREEDIT_NONE

GTK IM Status Style Constants

The IM Status Style constants specify the style of input method display.

gtk.IM_STATUS_NOTHING
gtk.IM_STATUS_CALLBACK
gtk.IM_STATUS_NONE

GTK Image Type Constants

The Image Type constants specify the type of image in a gtk.Image.

gtk.IMAGE_EMPTYThere is no image displayed by the widget
gtk.IMAGE_PIXMAPThe widget contains a gtk.gdk.Pixmap
gtk.IMAGE_IMAGEThe widget contains a gtk.gdk.Image
gtk.IMAGE_PIXBUFThe widget contains a gtk.gdk.Pixbuf
gtk.IMAGE_STOCKThe widget contains a stock icon name (see the Stock Items reference)
gtk.IMAGE_ICON_SETThe widget contains a gtk.IconSet
gtk.IMAGE_ANIMATIONThe widget contains a gtk.gdk.PixbufAnimation

GTK Justification Constants

The Justification constants specify the justification of the text inside a gtk.Label widget. (See also gtk.Alignment).

gtk.JUSTIFY_LEFTThe text is placed at the left edge of the label.
gtk.JUSTIFY_RIGHTThe text is placed at the right edge of the label.
gtk.JUSTIFY_CENTERThe text is placed in the center of the label.
gtk.JUSTIFY_FILLThe text is placed is distributed across the label.

GTK Menu Direction Type Constants

The Menu Direction Type constants specify directional movements within a menu.

gtk.MENU_DIR_PARENTTo the parent menu shell.
gtk.MENU_DIR_CHILDTo the submenu, if any, associated with the item.
gtk.MENU_DIR_NEXTTo the next menu item.
gtk.MENU_DIR_PREVTo the previous menu item.

GTK Message Type Constants

The Message Type constants specify the type of message being displayed in the message dialog.

gtk.MESSAGE_INFOInformational message
gtk.MESSAGE_WARNINGNonfatal warning message
gtk.MESSAGE_QUESTIONQuestion requiring a choice
gtk.MESSAGE_ERRORFatal error message

GTK Metric Type Constants

The Metric Type constants specify the metric used by a gtk.Ruler.

gtk.PIXELSPixels.
gtk.INCHESInches.
gtk.CENTIMETERSCentimeters.

GTK Movement Step Constants

The Movement Step constants specify the steps used in movement through text.

gtk.MOVEMENT_LOGICAL_POSITIONSmove by graphemes
gtk.MOVEMENT_VISUAL_POSITIONSmove by graphemes
gtk.MOVEMENT_WORDSmove by words
gtk.MOVEMENT_DISPLAY_LINESmove by lines(wrapped lines)
gtk.MOVEMENT_DISPLAY_LINE_ENDSmove to line ends(wrapped lines)
gtk.MOVEMENT_PARAGRAPHSmove by paragraphs(newline-ended lines)
gtk.MOVEMENT_PARAGRAPH_ENDSmove to ends of a paragraph
gtk.MOVEMENT_PAGESmove by pages
gtk.MOVEMENT_BUFFER_ENDSmove to ends of the buffer

GTK Notebook Tab Constants

The Notebook Tab constants specify the tab position to receive focus.

gtk.NOTEBOOK_TAB_FIRSTThe first gtk.Notebook tab
gtk.NOTEBOOK_TAB_LASTThe last gtk.Notebook tab

GTK Object Flags Constants

The Object Flags constants are a set of bit-flags that specify the state of the gtk.Object.

gtk.IN_DESTRUCTIONThe object is currently being destroyed. This is used internally to prevent reinvocations during destruction.
gtk.FLOATINGThe object is orphaned.

GTK Orientation Constants

The Orientation constants specify the orientation of widgets which can be switched between horizontal and vertical orientation on the fly, like gtk.Toolbar.

gtk.ORIENTATION_HORIZONTALThe widget is in horizontal orientation.
gtk.ORIENTATION_VERTICALThe widget is in vertical orientation.

GTK Pack Direction Constants

The Pack Direction constants specify the arrangement of gtk.MenuItems in a gtk.MenuBar or in a child gtk.MenuItem of a menubar.

gtk.ACK_DIRECTION_LTRPack left to right
gtk.PACK_DIRECTION_RTLPack right to left
gtk.PACK_DIRECTION_TTBPack top to bottom
gtk.PACK_DIRECTION_BTTPack bottom to top

GTK Pack Type Constants

The Pack Type constants specify the packing location gtk.Box children. (See: gtk.VBox, gtk.HBox, and gtk.ButtonBox).

gtk.PACK_STARTThe child is packed into the start of the box
gtk.PACK_ENDThe child is packed into the end of the box

GTK Page Orientation Constants

The Page Orientation constants specify the orientation of a page.

gtk.PAGE_ORIENTATION_PORTRAIT
gtk.PAGE_ORIENTATION_LANDSCAPE
gtk.PAGE_ORIENTATION_REVERSE_PORTRAIT
gtk.PAGE_ORIENTATION_REVERSE_LANDSCAPE

GTK Page Set Constants

The Page Set constants specify the set of pages to print.

gtk.PAGE_SET_ALLprint all pages
gtk.PAGE_SET_EVENprint even pages only
gtk.PAGE_SET_ODDprint odd pages only

GTK Papaer Name Constants

The Paper Name constants specify the common standard sizes of paper as a string.

gtk.PAPER_NAME_A3Name for the A4 paper size.
gtk.PAPER_NAME_A4Name for the A4 paper size.
gtk.PAPER_NAME_A5Name for the A5 paper size.
gtk.PAPER_NAME_B5Name for the B5 paper size.
gtk.PAPER_NAME_LETTERName for the Letter paper size.
gtk.PAPER_NAME_EXECUTIVEName for the Executive paper size.
gtk.Name for the Legal paper size.

GTK Path Priority Type Constants

The Path Priority Type constants are a set of bit-flags that specify the priority of path lookup.

gtk.PATH_PRIO_LOWEST
gtk.PATH_PRIO_GTK
gtk.PATH_PRIO_APPLICATION
gtk.PATH_PRIO_THEME
gtk.PATH_PRIO_RC
gtk.PATH_PRIO_HIGHEST

GTK Path Type Constants

The Path Type constants specify

gtk.PATH_WIDGET
gtk.PATH_WIDGET_CLASS
gtk.PATH_CLASS

GTK Policy Type Constants

The Policy Type constants specify when a scroll bar will be visible.

gtk.POLICY_ALWAYSthe scrollbar is always present
gtk.POLICY_AUTOMATICthe scrollbar is present only if needed i.e. the contents are larger than the window
gtk.POLICY_NEVERthe scrollbar is never present

GTK Position Type Constants

The Position Type constants specify

gtk.POS_LEFTThe feature is at the left edge.
gtk.POS_RIGHTThe feature is at the right edge.
gtk.POS_TOPThe feature is at the top edge.
gtk.POS_BOTTOMThe feature is at the bottom edge

GTK Print Duplex Constants

The Print Status constants specify how the output pages should be duplexed:

gtk.PRINT_DUPLEX_SIMPLEXone page per sheet i.e. no duplexing
gtk.PRINT_DUPLEX_HORIZONTALtwo pages per sheet horizontally duplexed
gtk.PRINT_DUPLEX_VERTICALtwo pages per sheet vertically duplexed

GTK Print Error Constants

The Print Error constants specify the type of printing error:

gtk.PRINT_ERROR_GENERAL
gtk.PRINT_ERROR_INTERNAL_ERROR
gtk.PRINT_ERROR_NOMEM

GTK Print Pages Constants

The Print Pages constants specify the set that should be printed:

gtk.PRINT_PAGES_ALLprint all pages
gtk.PRINT_PAGES_CURRENTprint the current page
gtk.PRINT_PAGES_RANGESprint the specified ranges of pages

GTK Print Operation Action Constants

The Print Operation Action constants specify the print operation to be performed:

gtk.PRINT_OPERATION_ACTION_PRINT_DIALOGShow the print dialog.
gtk.PRINT_OPERATION_ACTION_PRINTStart to print without showing the print dialog, based on the current print settings.
gtk.PRINT_OPERATION_ACTION_PREVIEWShow the print preview.
gtk.PRINT_OPERATION_ACTION_EXPORTExport to a file. This requires the "export-filename" property to be set.

GTK Print Operation Result Constants

The Print Operation Result constants specify the result of the print operation as returned by the gtk.PrintOperation.run()) method:

gtk.PRINT_OPERATION_RESULT_ERRORAn error has occured.
gtk.PRINT_OPERATION_RESULT_APPLYThe print settings should be stored.
gtk.PRINT_OPERATION_RESULT_CANCELThe print operation has been canceled, the print settings should not be stored.
gtk.PRINT_OPERATION_RESULT_IN_PROGRESSThe print operation is complete yet. This value will only be returned when running asynchronously.

GTK Print Quality Constants

The Print Quality constants specify the quality that should be used when printing the output pages:

gtk.PRINT_QUALITY_LOWlow quality
gtk.PRINT_QUALITY_NORMALnormal quality
gtk.PRINT_QUALITY_HIGHhigh quality
gtk.PRINT_QUALITY_DRAFTdraft quality

GTK Print Status Constants

The Print Status constants specify

gtk.PRINT_STATUS_INITIALThe printing has not started yet; this status is set initially, and while the print dialog is shown.
gtk.PRINT_STATUS_PREPARINGThis status is set while the "begin-print" signal is emitted and during pagination.
gtk.PRINT_STATUS_GENERATING_DATAThis status is set while the pages are being rendered.
gtk.PRINT_STATUS_SENDING_DATAThe print job is being sent off to the printer.
gtk.PRINT_STATUS_PENDINGThe print job has been sent to the printer, but is not printed for some reason, e.g. the printer may be stopped.
gtk.PRINT_STATUS_PENDING_ISSUESome problem has occurred during printing, e.g. a paper jam.
gtk.PRINT_STATUS_PRINTINGThe printer is processing the print job.
gtk.PRINT_STATUS_FINISHEDThe printing has been completed successfully.
gtk.PRINT_STATUS_FINISHED_ABORTEDThe printing has been aborted.

GTK ProgressBar Orientation Constants

The ProgressBar Orientation constants specify the orientation and growth direction for a visible progress bar.

gtk.PROGRESS_LEFT_TO_RIGHTA horizontal progress bar growing from left to right.
gtk.PROGRESS_RIGHT_TO_LEFTA horizontal progress bar growing from right to left.
gtk.PROGRESS_BOTTOM_TO_TOPA vertical progress bar growing from bottom to top.
gtk.PROGRESS_TOP_TO_BOTTOMA vertical progress bar growing from top to bottom.

GTK ProgressBar Style Constants

The ProgressBar Style constants specify the style of the gtk.ProgressBar display.

gtk.PROGRESS_CONTINUOUSThe progress bar grows in a smooth, continuous manner.
gtk.PROGRESS_DISCRETEThe progress bar grows in discrete, visible blocks.

GTK RC Flags Constants

The>RC Flags constants are a set of bit-flags that specify which fields of a gtk.RcStyle have been set for each state.

gtk.RC_FGIf present, the foreground color has been set for this state.
gtk.RC_BGIf present, the background color has been set for this state.
gtk.RC_TEXTIf present, the text color has been set for this state.
gtk.RC_BASEIf present, the base color has been set for this state.

GTK RC Token Type Constants

The RC Token Type constants specify the tokens in the RC file. It is exposed so that theme engines can reuse these tokens when parsing the theme-engine specific portions of a RC file.

gtk.RC_TOKEN_INVALID
gtk.RC_TOKEN_INCLUDE
gtk.RC_TOKEN_NORMAL
gtk.RC_TOKEN_ACTIVE
gtk.RC_TOKEN_PRELIGHT
gtk.RC_TOKEN_SELECTED
gtk.RC_TOKEN_INSENSITIVE
gtk.RC_TOKEN_FG
gtk.RC_TOKEN_BG
gtk.RC_TOKEN_TEXT
gtk.RC_TOKEN_BASE
gtk.RC_TOKEN_XTHICKNESS
gtk.RC_TOKEN_YTHICKNESS
gtk.RC_TOKEN_FONT
gtk.RC_TOKEN_FONTSET
gtk.RC_TOKEN_FONT_NAME
gtk.RC_TOKEN_BG_PIXMAP
gtk.RC_TOKEN_PIXMAP_PATH
gtk.RC_TOKEN_STYLE
gtk.RC_TOKEN_BINDING
gtk.RC_TOKEN_BIND
gtk.RC_TOKEN_WIDGET
gtk.RC_TOKEN_WIDGET_CLASS
gtk.RC_TOKEN_CLASS
gtk.RC_TOKEN_LOWEST
gtk.RC_TOKEN_GTK
gtk.RC_TOKEN_APPLICATION
gtk.RC_TOKEN_THEME
gtk.RC_TOKEN_RC
gtk.RC_TOKEN_HIGHEST
gtk.RC_TOKEN_ENGINE
gtk.RC_TOKEN_MODULE_PATH
gtk.RC_TOKEN_IM_MODULE_PATH
gtk.RC_TOKEN_IM_MODULE_FILE
gtk.RC_TOKEN_STOCK
gtk.RC_TOKEN_LTR
gtk.RC_TOKEN_RTL
gtk.RC_TOKEN_LAST

GTK Recent Chooser Error Constants

The Recent Recent Chooser Error constants specify the various errors that can occur while calling gtk.RecentChooser methods:

gtk.RECENT_CHOOSER_ERROR_NOT_FOUNDIndicates that a file does not exist
gtk.RECENT_CHOOSER_ERROR_INVALID_URIIndicates a malformed URI

GTK Recent Filter Flags

The Recent Filter Flags specify what types of filtering are needed:

gtk.RECENT_FILTER_URIthe URI of the file being tested
gtk.RECENT_FILTER_DISPLAY_NAMEthe string that will be used to display the file in the recent chooser
gtk.RECENT_FILTER_MIME_TYPEthe mime type of the file
gtk.RECENT_FILTER_APPLICATIONthe list of applications that have registered the file
gtk.RECENT_FILTER_GROUPthe groups to which the file belongs
gtk.RECENT_FILTER_AGEthe number of days elapsed since the file has been registered

GTK Recent Sort Type Constants

The Recent Sort Type constants specify the sorting method to be applyed to the recently used resource list.

gtk.RECENT_SORT_NONEDo not sort the returned list of recently used resources.
gtk.RECENT_SORT_MRUSort the returned list with the most recently used items first.
gtk.RECENT_SORT_LRUSort the returned list with the least recently used items first.
gtk.RECENT_SORT_CUSTOMSort the returned list using a custom sorting function passed using the gtk.RecentChooser.set_sort_func() method.

GTK Relief Style Constants

The Relief Style constants specify

gtk.RELIEF_NORMALDraw a normal relief.
gtk.RELIEF_HALFDraw a half relief.
gtk.RELIEF_NONEDraw no relief.

GTK Resize Mode Constants

The Resize Mode constants specify how resize requests are handled by a widget.

gtk.RESIZE_PARENTPass resize request to the parent
gtk.RESIZE_QUEUEQueue resizes on this widget
gtk.RESIZE_IMMEDIATEPerform the resizes now

GTK Response Type Constants

The Response Type constants specify pre-defined response values.

gtk.RESPONSE_NONE
gtk.RESPONSE_REJECT
gtk.RESPONSE_ACCEPT
gtk.RESPONSE_DELETE_EVENT
gtk.RESPONSE_OK
gtk.RESPONSE_CANCEL
gtk.RESPONSE_CLOSE
gtk.RESPONSE_YES
gtk.RESPONSE_NO
gtk.RESPONSE_APPLY
gtk.RESPONSE_HELP

GTK Scroll Step Constants

The Scroll Step constants specify the size of the scroll movements.

gtk.SCROLL_STEPSScroll up or down in step increments
gtk.SCROLL_PAGES,Scroll up or down in page increments
gtk.SCROLL_ENDSScroll to the beginning or end
gtk.SCROLL_HORIZONTAL_STEPSScroll left or right in step increments
gtk.SCROLL_HORIZONTAL_PAGESScroll left or right in step increments
gtk.SCROLL_HORIZONTAL_ENDSScroll to the far left end or far right end.

GTK Scroll Type Constants

The Scroll Type constants specify the type of scroll \movement.

gtk.SCROLL_NONE
gtk.SCROLL_JUMP
gtk.SCROLL_STEP_BACKWARD
gtk.SCROLL_STEP_FORWARD
gtk.SCROLL_PAGE_BACKWARD
gtk.SCROLL_PAGE_FORWARD
gtk.SCROLL_STEP_UP
gtk.SCROLL_STEP_DOWN
gtk.SCROLL_PAGE_UP
gtk.SCROLL_PAGE_DOWN
gtk.SCROLL_STEP_LEFT,
gtk.SCROLL_STEP_RIGHT
gtk.SCROLL_PAGE_LEFT
gtk.SCROLL_PAGE_RIGHT
gtk.SCROLL_START
gtk.SCROLL_END

GTK Selection Mode Constants

The Selection Mode constants specify the mode of selection in a gtk.Treeview

gtk.SELECTION_NONENo selection allowed.
gtk.SELECTION_SINGLEA single selection allowed by clicking.
gtk.SELECTION_BROWSEA single selection allowed by browsing with the pointer.
gtk.SELECTION_MULTIPLEMultiple items can be selected at once.
gtk.SELECTION_EXTENDEDDeprecated.

GTK Shadow Type Constants

The Shadow Type constants specify the appearance of an outline typically provided by a gtk.Frame.

gtk.SHADOW_NONENo outline.
gtk.SHADOW_INThe outline is beveled inward.
gtk.SHADOW_OUTThe outline is beveled outward like a button.
gtk.SHADOW_ETCHED_INThe outline itself is an inward bevel, but the frame bevels outward
gtk.SHADOW_ETCHED_OUTThe outline itself is an outward bevel, but the frame bevels inward

GTK SizeGroup Mode Constants

The SizeGroup Mode constants specify the directions in which the size group affects the requested sizes of its component widgets.

gtk.SIZE_GROUP_NONEThe group has no affect
gtk.SIZE_GROUP_HORIZONTALThe group affects horizontal requisition
gtk.SIZE_GROUP_VERTICALThe group affects vertical requisition
gtk.SIZE_GROUP_BOTHThe group affects both horizontal and vertical requisition

GTK Sort Type Constants

The Sort Type constants specify he direction of a sort.

gtk.SORT_ASCENDINGSorting is in ascending order.
gtk.SORT_DESCENDINGSorting is in descending order.

GTK SpinButton Update Policy Constants

The SpinButton Update Policy constants specify the update policy for a gtk.SpinButton.

gtk.UPDATE_ALWAYSWhen refreshing a gtk.SpinButton, the value is always displayed.
gtk.UPDATE_IF_VALIDWhen refreshing a gtk.SpinButton, the value is only displayed if it is valid within the bounds of the spin button's gtk.Adjustment.

GTK Spin Type Constants

The Spin Type constants specify the step movement of a gtk.SpinButton.

gtk.SPIN_STEP_FORWARDSpin a gtk.SpinButton forward by the step value of the spin button's gtk.Adjustment.
gtk.SPIN_STEP_BACKWARDSpin a gtk.SpinButton backward by the step value of the spin button's gtk.Adjustment.
gtk.SPIN_PAGE_FORWARDSpin a gtk.SpinButton forward by the page value of the spin button's gtk.Adjustment.
gtk.SPIN_PAGE_BACKWARDSpin a gtk.SpinButton backward by the page value of the spin button's gtk.Adjustment.
gtk.SPIN_HOMESet the spin button's value to the minimum possible value specified by its gtk.Adjustment
gtk.SPIN_ENDSet the spin button's value to the maximum possible value specified by its gtk.Adjustment
gtk.SPIN_USER_DEFINEDThe programmer must specify the exact amount to spin the gtk.SpinButton.

GTK State Type Constants

The State Type constants specify the current state of a widget; the state determines how the widget is drawn. The State Type constants are also used to identify different colors in a gtk.Style for drawing, so states can be used for subparts of a widget as well as entire widgets.

gtk.STATE_NORMALState during normal operation.
gtk.STATE_ACTIVEState of a currently active widget, such as a depressed button.
gtk.STATE_PRELIGHTState indicating that the mouse pointer is over the widget and the widget will respond to mouse clicks.
gtk.STATE_SELECTEDState of a selected item, such the selected row in a list.
gtk.STATE_INSENSITIVEState indicating that the widget is unresponsive to user actions.

GTK Target Flags Constants

The Target Flags constants are a set of bit-flags that specify constraints on the target of a drag operation.

gtk.TARGET_SAME_APP If this is set, the target will only be selected for drags within a single application.
gtk.TARGET_SAME_WIDGETf this is set, the target will only be selected for drags within a single widget.

GTK Text Direction Constants

The Text Direction constants specify the direction of the text.

gtk.TEXT_DIR_NONEText direction not specified.
gtk.TEXT_DIR_LTR,Left to right direction.
gtk.TEXT_DIR_RTLRight to left direction

GTK Text Search Flags Constants Constants

The Text Search Flags constants are a set of bit-flags that specify what types of text are suitable for search matches in a gtk.TextView.

gtk.TEXT_SEARCH_VISIBLE_ONLYOnly visible text can match the search criteria.
gtk.TEXT_SEARCH_TEXT_ONLYBoth visible and invisible text can match the search criteria.

GTK Text Window Type Constants

The Text Window Type constants specify the gtk.gdk.Window objects that make up a gtk.TextView. See the gtk.TextView.get_window() method for more detail.

gtk.TEXT_WINDOW_WIDGETThe gtk.gdk.Window of the gtk.TextView widget.
gtk.TEXT_WINDOW_TEXTThe gtk.gdk.Window that contains the text in the gtk.TextView.
gtk.TEXT_WINDOW_LEFTThe left child gtk.gdk.Window of the gtk.TextView.
gtk.TEXT_WINDOW_RIGHTThe right child gtk.gdk.Window of the gtk.TextView.
gtk.TEXT_WINDOW_TOPThe top child gtk.gdk.Window of the gtk.TextView.
gtk.TEXT_WINDOW_BOTTOMThe bottom child gtk.gdk.Window of the gtk.TextView.

GTK TextBuffer Target Info Constants

The TextBuffer Target Info constants specify the info integer for use with the gtk.target_list_add_rich_text_targets() and gtk.target_list_add_text_targets() functions.

gtk.TEXT_BUFFER_TARGET_INFO_BUFFER_CONTENTS
gtk.TEXT_BUFFER_TARGET_INFO_RICH_TEXT
gtk.TEXT_BUFFER_TARGET_INFO_TEXT

GTK Toolbar Space Style Constants

The Toolbar Space Style constants specify whether a spacer is displayed as a vertical line or space.

gtk.TOOLBAR_SPACE_EMPTY,Show as an empty space
gtk.TOOLBAR_SPACE_LINEShow as a vertical line.

GTK Toolbar Style Constants

The Toolbar Style constants specify the appearance of a gtk.Toolbar. Note that setting the toolbar style overrides the user's preferences for the default toolbar style.

gtk.TOOLBAR_ICONSButtons display only icons in the toolbar.
gtk.TOOLBAR_TEXTButtons display only text labels in the toolbar.
gtk.TOOLBAR_BOTHButtons display text and icons in the toolbar.
gtk.TOOLBAR_BOTH_HORIZButtons display icons and text alongside each other, rather than vertically stacked

GTK TreeModel Flags Constants

The TreeModel Flags constants are a set of bit-flags that specify various properties of a gtk.TreeModel. They are returned by the gtk.TreeModel.get_flags() method, and must be static for the lifetime of the object. A more complete description of gtk.TREE_MODEL_ITERS_PERSIST can be found in the gtk.TreeView reference description.

gtk.TREE_MODEL_ITERS_PERSISTIterators survive all signals emitted by the tree.
gtk.TREE_MODEL_LIST_ONLYThe model is a list only, and never has children

GTK TreeView Drop Position Constants

The TreeView Drop Position constants specify where a dropped row goes.

gtk.TREE_VIEW_DROP_BEFOREThe dropped item goes before the row it's dropped on.
gtk.TREE_VIEW_DROP_AFTERThe dropped item goes after the row it's dropped on.
gtk.TREE_VIEW_DROP_INTO_OR_BEFOREThe dropped item becomes a child of the row it's dropped on. Fallback to goes before.
gtk.TREE_VIEW_DROP_INTO_OR_AFTERThe dropped item becomes a child of the row it's dropped on. Fallback to goes after.

GTK TreeView Grid Lines Constants

The TreeView Grid Lines constants specify how grid lines should be applied to a TreeView.

gtk.TREE_VIEW_GRID_LINES_NONE
gtk.TREE_VIEW_GRID_LINES_HORIZONTAL
gtk.TREE_VIEW_GRID_LINES_VERTICAL
gtk.TREE_VIEW_GRID_LINES_BOTH

GTK TreeViewColumn Sizing Constants

The TreeViewColumn Sizing constants specify the sizing method the column uses to determine its width. Please note that gtk.TREE_VIEW_COLUMN_AUTOSIZE are inefficient for large views, and can make columns appear choppy.

gtk.TREE_VIEW_COLUMN_GROW_ONLYColumns only get bigger in reaction to changes in the model
gtk.TREE_VIEW_COLUMN_AUTOSIZEColumns resize to be the optimal size every time the model changes.
gtk.TREE_VIEW_COLUMN_FIXEDColumns are a fixed numbers of pixels wide.

GTK UIManager Item Type Constants

The UIManager Item Type constants specify what UI element to create.

gtk.UI_MANAGER_AUTOPick the type of the UI element according to context.
gtk.UI_MANAGER_MENUBARCreate a menubar.
gtk.UI_MANAGER_MENUCreate a menu.
gtk.UI_MANAGER_TOOLBARCreate a toolbar.
gtk.UI_MANAGER_PLACEHOLDERInsert a placeholder.
gtk.UI_MANAGER_POPUPCreate a popup menu.
gtk.UI_MANAGER_MENUITEMCreate a menuitem.
gtk.UI_MANAGER_TOOLITEMCreate a toolitem.
gtk.UI_MANAGER_SEPARATORCreate a separator.
gtk.UI_MANAGER_ACCELERATORInstall an accelerator.

GTK Unit Constants

The Unit constants specify the

gtk.UNIT_PIXEL
gtk.UNIT_POINTS
gtk.UNIT_INCH
gtk.UNIT_MM

GTK Update Type Constants

The Update Type constants specify the update policy of a gtk.Range and gtk.SpinButton.

gtk.UPDATE_CONTINUOUSUpdate the display continuously as the pointer is moved.
gtk.UPDATE_DISCONTINUOUSUpdate the display at intervals while the pointer is being moved.
gtk.UPDATE_DELAYEDUpdate the display after the pointer has finished moving.

GTK Version Constants

The Version constants specify the versions of GTK+ and PyGTK as a 3-tuple containing the major, minor and patch release numbers.

gtk.gtk_versionA 3-tuple containing the GTK+ (major, minor, patch) release numbers.
gtk.pygtk_versionA 3-tuple containing the PyGTK (major, minor, patch) release numbers.

GTK Widget Flags Constants

The Widget Flags constants are a set of bit-flags that specify certain properties of the widget.

gtk.TOPLEVELWidgets without a real parent, as there are gtk.Window and gtk.Menu objects that have this flag set throughout their lifetime. Toplevel widgets always contain their own gtk.gdk.Window.
gtk.NO_WINDOW Indicative for a widget that does not provide its own gtk.gdk.Window. Visible action (e.g. drawing) is performed on the parent's gtk.gdk.Window.
gtk.REALIZEDSet by the gtk.Widget.realize() method , unset by the gtk.Widget.unrealize() method. A realized widget has an associated gtk.gdk.Window.
gtk.MAPPED Set by the gtk.Widget.map() method, unset by the gtk.Widget.unmap() method. Only realized widgets can be mapped. It means that the gtk.Window.show() method has been called on the widgets window(s).
gtk.VISIBLESet by the gtk.Widget.show() method, unset by the gtk.Widget.hide() method. Implies that a widget will be mapped as soon as its parent is mapped.
gtk.SENSITIVESet and unset by the gtk.Widget.set_sensitive() method. The sensitivity of a widget determines whether it will receive certain events (e.g. button or key presses). One premise for the widgets sensitivity is to have this flag set.
gtk.PARENT_SENSITIVESet and unset by the gtk.Widget.set_sensitive() method operations on the parents of the widget. This is the second premise for the widgets sensitivity. Once it has gtk.SENSITIVE and gtk.PARENT_SENSITIVE set, its state is effectively sensitive.
gtk.CAN_FOCUSDetermines if a widget is able to handle focus grabs.
gtk.HAS_FOCUSSet by the gtk.Widget.grab_focus() method for widgets that also have gtk.CAN_FOCUS set. The flag will be unset once another widget grabs the focus.
gtk.CAN_DEFAULTThe widget is allowed to receive the default action via the gtk.Widget.grab_default() method.
gtk.HAS_DEFAULTThe widget currently is receiving the default action.
gtk.HAS_GRABSet by the gtk.Widget.grab_add() method, unset by the gtk.Widget.grab_remove() method. It means that the widget is in the grab_widgets stack, and will be the preferred one for receiving events other than ones of cosmetic value.
gtk.RC_STYLE Indicates that the widgets style has been looked up through the rc mechanism. It does not imply that the widget actually had a style defined through the rc mechanism.
gtk.COMPOSITE_CHILDIndicates that the widget is a composite child of its parent; see the gtk.widget_push_composite_child() and gtk.widget_pop_composite_child() functions.
gtk.NO_REPARENTUnused.
gtk.APP_PAINTABLESet and unset by the gtk.Widget.set_app_paintable() method. Must be set on widgets whose window the application directly draws on, in order to keep PyGTK and GTK+ from overwriting the drawn stuff.
gtk.RECEIVES_DEFAULTThe widget when focused will receive the default action and have gtk.HAS_DEFAULT set even if there is a different widget set as default.
gtk.DOUBLE_BUFFEREDSet and unset by the gtk.Widget.set_double_buffered() method. Indicates that exposes done on the widget should be double-buffered.
gtk.NO_SHOW_ALLIf TRUE, the show_all() and hide_all() methods do not affect the widget.

GTK Widget Help Type Constants

The Widget Help Type constants specify the help type of the widget.

gtk.WIDGET_HELP_TOOLTIPTooltip help.
gtk.WIDGET_HELP_WHATS_THISWhat's this help.

GTK Window Position Constants

The Window Position constants specify hints for initial window placement.

gtk.WIN_POS_NONENo influence is made on placement.
gtk.WIN_POS_CENTERWindows should be placed in the center of the screen.
gtk.WIN_POS_MOUSEWindows should be placed at the current mouse position.
gtk.WIN_POS_CENTER_ALWAYSKeep window centered as it changes size, etc.
gtk.WIN_POS_CENTER_ON_PARENTCenter the window on its transient parent (see the gtk.Window.set_transient_for()) method.

GTK Window Type Constants

The Window Type constants specify the type of a gtk.Window. Most things you'd consider a "window" should have type gtk.WINDOW_TOPLEVEL; windows with this type are managed by the window manager and have a frame by default (call the set_decorated() method to toggle the frame). Windows with type gtk.WINDOW_POPUP are ignored by the window manager; window manager keybindings won't work on them, the window manager won't decorate the window with a frame, many GTK+ features that rely on the window manager will not work (e.g. resize grips and maximization/minimization). gtk.WINDOW_POPUP is used to implement widgets such as gtk.Menu or tooltips that you normally don't think of as windows per se. Nearly all windows should be gtk.WINDOW_TOPLEVEL. In particular, do not use gtk.WINDOW_POPUP just to turn off the window borders; use the gtk.Window.set_decorated() method for that.

gtk.WINDOW_TOPLEVELA regular window, such as a dialog.
gtk.WINDOW_POPUPA special window such as a tooltip.

GTK Wrap Mode Constants

The Wrap Mode constants specify the type of line wrapping in a gtk.TextView.

gtk.WRAP_NONEDo not wrap lines - just make the text area wider
gtk.WRAP_CHARWrap text, breaking lines anywhere the cursor can appear (usually between characters)
gtk.WRAP_WORDWrap text, breaking lines in between words
gtk.WRAP_WORD_CHARWrap text, breaking lines in between words, or if that is not enough, also between graphemes.