GrafX2 2.9.3227
The ultimate 256-color painting program
|
Almost all the editor actions that are called by the menu are here. More...
Functions | |
void | Stencil_update_color (byte color) |
void | Stencil_tag_color (byte color, byte tag_color) |
void | Message_out_of_memory (void) |
Displays an error message when there is no more memory for the requested operation. More... | |
void | Button_Message_initial (void) |
Displays the splash screen at program startup. More... | |
void | Change_paintbrush_shape (byte shape) |
Changes brush shape. More... | |
void | Button_Pal_left (int) |
Callback for the palette scroller buttons left click. More... | |
void | Button_Pal_left_fast (int) |
Callback for the palette scroller buttons right click. More... | |
void | Button_Pal_right (int) |
Callback for the palette scroller buttons left click. More... | |
void | Button_Pal_right_fast (int) |
Callback for the palette scroller buttons right click. More... | |
void | Button_Select_forecolor (int) |
Callback for the palette color buttons left click. More... | |
void | Button_Select_backcolor (int) |
Callback for the palette color buttons right click. More... | |
void | Button_Brush_monochrome (int) |
Callback for the brush button left click. More... | |
void | Button_Paintbrush_menu (int) |
Callback for the brush button right click. More... | |
void | Button_Draw (int) |
Callback for the freehand draw button left click. More... | |
void | Button_Draw_switch_mode (int) |
Callback for the freehand draw button right click. More... | |
void | Button_Lines (int) |
Callback for the lines button left click. More... | |
void | Button_Lines_switch_mode (int) |
Callback for the lines button right click. More... | |
void | Button_Fill (int) |
Callback for the fill button left click. More... | |
void | Button_Replace (int) |
Callback for the fill button right click. More... | |
void | Button_Unselect_fill (int) |
Disable and release the fill button. More... | |
void | Button_Airbrush (int) |
Callback for the spray button left click. More... | |
void | Button_Airbrush_menu (int) |
Callback for the spray button right click. More... | |
void | Button_Curves (int) |
Callback for the curves button left click. More... | |
void | Button_Curves_switch_mode (int) |
Callback for the curves button right click. More... | |
void | Button_Empty_rectangle (int) |
Callback for the empty rectangle button. More... | |
void | Button_Filled_rectangle (int) |
Callback for the filled rectangle button. More... | |
void | Button_Text (int) |
Callback for the text button. More... | |
void | Button_Gradients (int) |
Callback for the gradation button. More... | |
void | Load_gradient_data (int index) |
Gets the informations from the gradations table and set the global vars for the current gradation. More... | |
void | Button_Grad_rectangle (int) |
Callback for the gradation rectangle button. More... | |
void | Button_circle_ellipse (int btn) |
Callback for the circle/ellipse buttons Starts drawing circle/ellipse. More... | |
void | Button_Circle_switch_mode (int) |
Callback for the cicle button right click. More... | |
void | Button_polygon (int) |
Callback for the polyline button left click. More... | |
void | Button_Polyform (int) |
Callback for the polyline right click. More... | |
void | Button_Polyfill (int) |
Callback for the polyfill button left click. More... | |
void | Button_Filled_polyform (int) |
Callback for the polyfill button right click. More... | |
void | Button_Adjust (int) |
Callback for the adjust picture button. More... | |
void | Button_Shade_mode (void) |
Callback for the shade button (in the FX window). More... | |
void | Button_Quick_shade_mode (void) |
Callback for the QSHade button (in the FX window). More... | |
void | Button_Shade_menu (void) |
Callback for the Shade button (in the FX window) right click. More... | |
void | Button_Stencil_mode (void) |
Callback for the Stencil button (in the FX window) left click. More... | |
void | Button_Stencil_menu (void) |
Callback for the Stencil button (in the FX window) right click. More... | |
void | Button_Mask_mode (void) |
Callback for the Mask button (in the FX window) left click. More... | |
void | Button_Mask_menu (void) |
Callback for the Mask button (in the FX window) right click. More... | |
void | Button_Snap_mode (void) |
Callback for the Grid button (in the FX window) left click. More... | |
void | Button_Grid_menu (void) |
Callback for the Grid button (in the FX window) right click. More... | |
void | Button_Show_grid (void) |
Callback to toggle the grid visible in the magnified view. More... | |
void | Copy_preset_sieve (byte index) |
In the sieve window, copy one of the presets patterns to the current one. More... | |
void | Invert_trame (void) |
In the sieve window, swaps black and white in the current pattern. More... | |
void | Button_Sieve_mode (void) |
Callback for the Sieve button (in the FX window) left click. More... | |
void | Button_Sieve_menu (void) |
Callback for the Sieve button (in the FX window) right click. More... | |
void | Button_Smooth_mode (void) |
Callback for the smooth button (in the FX window) left click. More... | |
void | Compute_colorize_table (void) |
Computes the tables used by the transparency/colorize mode. More... | |
void | Button_Colorize_mode (void) |
Callback for the Tranparency button (in the FX window) left click. More... | |
void | Button_Colorize_menu (void) |
Callback for the Transparency button (in the FX window) right click. More... | |
void | Button_Tiling_mode (void) |
Callback for the Tiling button (in the FX window) left click. More... | |
void | Button_Tiling_menu (void) |
Callback for the Tiling button (in the FX window) right click. More... | |
void | Button_Constraint_mode (void) |
Constaint enforcer/checker. More... | |
void | Button_Constraint_menu (void) |
void | Button_Tilemap_mode (void) |
void | Button_Tilemap_menu (void) |
void | Effects_off (void) |
Callback for the command that turns off all drawaing effects. More... | |
void | Button_Effects (int) |
Callback for the effects button click. More... | |
void | Button_Brush (int) |
Callback for the brush button left click. More... | |
void | Button_Restore_brush (int) |
Callback for the brush button right click. More... | |
void | Button_Unselect_brush (int) |
Disables the custom brush and set back a regular one. More... | |
void | Button_Lasso (int) |
Callback for the freehand brush pick button left click. More... | |
void | Button_Unselect_lasso (int) |
Disables the custom freehand brush and set back a regular one. More... | |
void | Button_Colorpicker (int) |
Starts the color picking operation. More... | |
void | Button_Unselect_colorpicker (int) |
Disables the color picker button and get back to the previously selected drawing mode. More... | |
void | Button_Invert_foreback (int) |
Swap fore- and background colors. More... | |
void | Button_Magnify (int) |
Enters magnify mode. More... | |
void | Button_Magnify_menu (int) |
Displays magnify menu. More... | |
void | Button_Unselect_magnifier (int) |
Exit magnify mode. More... | |
void | Button_Brush_FX (int) |
Display the Brush effects window. More... | |
void | Button_Page (int) |
Swap main and spare drawing pages. More... | |
void | Button_Copy_page (int) |
Copy main page to spare page. More... | |
void | Copy_image_only (void) |
Copy only pixel data from main page to spare page (no palette copy). More... | |
void | Button_Kill (int) |
Kill (free from memory) the current page. More... | |
void | Button_Resolution (int) |
Display the screenmode menu. More... | |
void | Button_Safety_resolution (int) |
Set the screen to the "safe resolution" (320x200 pixel window). More... | |
void | Button_Load (int) |
Opens the load file dialog. More... | |
void | Button_Reload (int) |
Reload current picture from disk. More... | |
void | Button_Save (int) |
Open the save file dialog. More... | |
void | Button_Autosave (int) |
Saves the current file without asking for a new name. More... | |
void | Button_Settings (int) |
Display the setting menu. More... | |
void | Button_Skins (int) |
Display the skin selector window. More... | |
void | Button_Undo (int) |
Undo the last modification to the picture. More... | |
void | Button_Redo (int) |
Redo the last modification to the picture. More... | |
void | Button_Clear (int) |
Clear the whole screen with black (color index 0). More... | |
void | Button_Clear_with_backcolor (int) |
Clear the screen with the selected backcolor. More... | |
void | Button_Quit (int) |
Quits the program. More... | |
void | Button_Hide_menu (int) |
Hides the menubar. More... | |
void | Button_Toggle_toolbar (int) |
Shows a dropdown panel where you can choose which toolbars are visible. More... | |
void | Button_Toggle_all_toolbars (int) |
Hides all toolbars (except status) or shows them again. More... | |
void | Load_picture (enum CONTEXT_TYPE type) |
Load picture from file. More... | |
void | Save_picture (enum CONTEXT_TYPE type) |
Save picture to file. More... | |
void | Menu_tag_colors (char *window_title, byte *table, byte *mode, byte can_cancel, const char *help_section, word close_shortcut) |
Generic color tagging menu, for various effects. More... | |
void | Button_Smooth_menu (void) |
Display the menu for the smooth effect. More... | |
void | Button_Smear_mode (void) |
Toogles the smear mode. More... | |
void | Button_Brush_container (void) |
byte | Store_paintbrush (int index) |
Store the current brush in paintbrush slot, if possible. More... | |
void | Select_paintbrush (int index) |
Retrieve a normal paintbrush. More... | |
byte | Any_effect_active (void) |
Almost all the editor actions that are called by the menu are here.
void Stencil_update_color | ( | byte | color | ) |
References Update_window_area, and Window_palette_button_list.
Referenced by Button_Airbrush_menu(), and Menu_tag_colors().
References Window_palette_button_list, and Window_rectangle().
Referenced by Button_Airbrush_menu(), and Menu_tag_colors().
void Message_out_of_memory | ( | void | ) |
Displays an error message when there is no more memory for the requested operation.
References Close_window(), Display_cursor(), Key, KEY_ESC, KEY_o, KEY_RETURN, MC_Black, MC_Light, Open_window(), Print_in_window(), Update_window_area, Window_clicked_button(), Window_height, Window_set_normal_button(), and Window_width.
Referenced by Button_Transform_menu(), Copy_image_only(), Pre_load(), and Resize_image().
void Button_Message_initial | ( | void | ) |
Displays the splash screen at program startup.
References T_Document::backups, Check_menu_mode(), Close_window(), Config, T_Config::Default_mode_layers, Display_all_screen(), Display_cursor(), Display_menu(), Get_input(), Gfx, GFX2_DEBUG, GFX2_Log(), T_Document::image_height, T_Page::Image_mode, IMAGE_MODE_ANIMATION, IMAGE_MODE_LAYERED, T_Document::image_width, Key, KEY_a, KEY_l, T_Gui_skin::Logo_grafx2, Main, MC_Black, MC_Dark, MC_Light, Mouse_K, Open_window(), T_List_of_pages::Pages, Pixel_in_window(), Print_in_window(), Program_version, Quit_is_required, Redraw_spare_image(), Spare, Switch_layer_mode(), Update_spare_buffers(), Update_window_area, Wait_end_of_click(), Window_display_frame_in(), Window_get_button_shortcut(), Window_get_clicked_button(), Window_height, Window_rectangle(), Window_set_normal_button(), and Window_width.
Referenced by Init_program().
void Change_paintbrush_shape | ( | byte | shape | ) |
Changes brush shape.
This function saves the current brush shape and swith to the default one (single pixel brush) for the filler and the color picker. These functions don't need (and will not work with) a custom brush.
References Current_operation, Display_paintbrush_in_menu(), OPERATION_COLORPICK, OPERATION_FILL, Paintbrush_shape, Paintbrush_shape_before_colorpicker, Paintbrush_shape_before_fill, PAINTBRUSH_SHAPE_NONE, and PAINTBRUSH_SHAPE_POINT.
Referenced by Button_Brush_monochrome(), Button_Paintbrush_menu(), Button_Restore_brush(), Button_Sieve_menu(), Button_Text(), Load_picture(), Main_handler(), Restore_brush(), Return_to_draw_mode(), and Select_paintbrush().
void Button_Pal_left | ( | int | btn | ) |
Callback for the palette scroller buttons left click.
Scrolls the menubar palette one column to the left.
References Config, Display_cursor(), Display_menu_palette(), First_color_in_palette, Hide_cursor, Palette_cells_X(), Palette_cells_Y(), T_Config::Palette_vertical, and Unselect_button().
void Button_Pal_left_fast | ( | int | btn | ) |
Callback for the palette scroller buttons right click.
Scrolls the menubar palette faster to the left.
References Display_cursor(), Display_menu_palette(), First_color_in_palette, Hide_cursor, Palette_cells_X(), Palette_cells_Y(), and Unselect_button().
void Button_Pal_right | ( | int | btn | ) |
Callback for the palette scroller buttons left click.
Scrolls the menubar palette one column to the right.
References Config, Display_cursor(), Display_menu_palette(), First_color_in_palette, Hide_cursor, Palette_cells_X(), Palette_cells_Y(), T_Config::Palette_vertical, and Unselect_button().
void Button_Pal_right_fast | ( | int | btn | ) |
Callback for the palette scroller buttons right click.
Scrolls the menubar palette faster to the right.
References Config, Display_cursor(), Display_menu_palette(), First_color_in_palette, Hide_cursor, Palette_cells_X(), Palette_cells_Y(), T_Config::Palette_vertical, and Unselect_button().
void Button_Select_forecolor | ( | int | btn | ) |
Callback for the palette color buttons left click.
Selects the foreground drawing color when clicking on the menubar palette.
References Button_Palette(), Button_under_mouse(), Config, Display_cursor(), T_Config::Double_click_speed, Fore_color, Get_input(), GFX2_GetTicks(), Hide_cursor, Mouse_K, Pick_color_in_palette(), Set_fore_color(), and Status_print_palette_color().
void Button_Select_backcolor | ( | int | btn | ) |
Callback for the palette color buttons right click.
Selects the background drawing color when clicking on the menubar palette.
References Back_color, Button_under_mouse(), Display_cursor(), Get_input(), Hide_cursor, Mouse_K, Pick_color_in_palette(), Set_back_color(), and Status_print_palette_color().
void Button_Brush_monochrome | ( | int | btn | ) |
Callback for the brush button left click.
Selects the monochrome brush mode when right clicking on the brush button.
References Change_paintbrush_shape(), Display_cursor(), Hide_cursor, PAINTBRUSH_SHAPE_MONO_BRUSH, and Unselect_button().
void Button_Paintbrush_menu | ( | int | btn | ) |
Callback for the brush button right click.
Displays the "Paintbrush menu".
References BRUSH_CONTAINER_COLUMNS, BRUSH_CONTAINER_ROWS, BUTTON_HELP, BUTTON_PAINTBRUSHES, Change_paintbrush_shape(), Close_window(), Display_cursor(), Display_paintbrush_in_window(), Display_stored_brush_in_window(), Hide_cursor, Is_shortcut(), Key, KEY_ESC, LEFT_SIDE, Max(), MC_White, NB_PAINTBRUSH_SPRITES, NULL, Open_window(), Paintbrush_height, Paintbrush_shape, PAINTBRUSH_SHAPE_ANTISLASH, PAINTBRUSH_SHAPE_CROSS, PAINTBRUSH_SHAPE_DIAMOND, PAINTBRUSH_SHAPE_HORIZONTAL_BAR, PAINTBRUSH_SHAPE_PLUS, PAINTBRUSH_SHAPE_RANDOM, PAINTBRUSH_SHAPE_ROUND, PAINTBRUSH_SHAPE_SIEVE_ROUND, PAINTBRUSH_SHAPE_SIEVE_SQUARE, PAINTBRUSH_SHAPE_SLASH, PAINTBRUSH_SHAPE_SQUARE, PAINTBRUSH_SHAPE_VERTICAL_BAR, Paintbrush_width, Restore_brush(), RIGHT_SIDE, Same_paintbrush(), Select_paintbrush(), Set_paintbrush_size(), Store_brush(), Store_paintbrush(), Unselect_button(), Update_window_area, Window_attribute2, Window_clicked_button(), Window_display_frame(), Window_dropdown_add_item(), Window_dropdown_button_list, Window_height, Window_help(), Window_rectangle(), Window_set_dropdown_button(), Window_set_normal_button(), and Window_width.
void Button_Draw | ( | int | btn | ) |
Callback for the freehand draw button left click.
Selects freehand drawing mode, depending on the current state of the freehand button.
References Display_cursor(), Hide_cursor, Selected_freehand_mode, and Start_operation_stack().
void Button_Draw_switch_mode | ( | int | btn | ) |
Callback for the freehand draw button right click.
Cycles the drawing modes for the freehand tool.
References T_Dropdown_button::Bottom_up, BUTTON_PRESSED, Buttons_Pool, Display_cursor(), Display_sprite_in_menu(), Draw_menu_button(), Dropdown_activate(), T_Dropdown_button::Dropdown_width, T_Dropdown_button::First_item, T_Dropdown_button::Height, T_Toolbar_button::Height, Hide_cursor, icon, MENU_SPRITE_CONTOUR_DRAW, MENU_SPRITE_DISCONTINUOUS_DRAW, MENU_SPRITE_POINT_DRAW, Menu_Y, Mouse_K, NULL, T_Dropdown_choice::Number, OPERATION_CONTINUOUS_DRAW, OPERATION_DISCONTINUOUS_DRAW, OPERATION_FILLED_CONTOUR, OPERATION_POINT_DRAW, T_Dropdown_button::Pos_X, T_Dropdown_button::Pos_Y, Selected_freehand_mode, Start_operation_stack(), Window_dropdown_add_item(), Window_dropdown_clear_items(), T_Toolbar_button::X_offset, and T_Toolbar_button::Y_offset.
void Button_Lines | ( | int | btn | ) |
Callback for the lines button left click.
Selects lines drawing mode, depending on the current state of the lines button.
References Display_cursor(), Hide_cursor, Selected_line_mode, and Start_operation_stack().
void Button_Lines_switch_mode | ( | int | btn | ) |
Callback for the lines button right click.
Cycles the drawing modes for the lines tool.
References BUTTON_PRESSED, Display_cursor(), Display_sprite_in_menu(), Draw_menu_button(), Hide_cursor, icon, MENU_SPRITE_CENTERED_LINES, MENU_SPRITE_K_LINE, OPERATION_CENTERED_LINES, OPERATION_K_LINE, OPERATION_LINE, Selected_line_mode, and Start_operation_stack().
void Button_Fill | ( | int | btn | ) |
Callback for the fill button left click.
Start the filling operation.
References Current_operation, Display_cursor(), Hide_cursor, T_Document::magnifier_mode, Main, Menu_is_visible, Menu_Y, Mouse_X, Mouse_Y, OPERATION_FILL, OPERATION_REPLACE, Paintbrush_shape, Paintbrush_shape_before_fill, PAINTBRUSH_SHAPE_POINT, Print_in_menu(), T_Document::separator_position, Start_operation_stack(), and T_Document::X_zoom.
void Button_Replace | ( | int | btn | ) |
Callback for the fill button right click.
Start the color replace operation.
References Current_operation, Display_cursor(), Hide_cursor, T_Document::magnifier_mode, Main, Menu_is_visible, Menu_Y, Mouse_X, Mouse_Y, OPERATION_FILL, OPERATION_REPLACE, Paintbrush_shape, Paintbrush_shape_before_fill, PAINTBRUSH_SHAPE_POINT, Print_in_menu(), T_Document::separator_position, Start_operation_stack(), and T_Document::X_zoom.
void Button_Unselect_fill | ( | int | btn | ) |
Disable and release the fill button.
Restores the cursor (custom brushes are disabled for the fill operation). Cleans the status bar if the color replacement tool put a preview color inside it.
References Current_operation, T_Document::magnifier_mode, Main, Menu_is_visible, Menu_Y, Mouse_X, Mouse_Y, OPERATION_REPLACE, Paintbrush_shape, Paintbrush_shape_before_fill, Print_in_menu(), T_Document::separator_position, and T_Document::X_zoom.
void Button_Airbrush | ( | int | btn | ) |
Callback for the spray button left click.
Start the spray operation.
References Display_cursor(), Hide_cursor, OPERATION_AIRBRUSH, and Start_operation_stack().
void Button_Airbrush_menu | ( | int | btn | ) |
Callback for the spray button right click.
Opens the spray's setup menu.
References Airbrush_delay, Airbrush_mode, Airbrush_mono_flow, Airbrush_multi_flow, Airbrush_size, BUTTON_AIRBRUSH, BUTTON_HELP, Close_window(), Current_operation, Display_cursor(), Fore_color, Get_color_behind_window(), Hide_cursor, INPUT_TYPE_INTEGER, Is_shortcut(), Key, KEY_BACKQUOTE, KEY_c, KEY_COMMA, KEY_d, KEY_ESC, KEY_i, KEY_KP_ENTER, KEY_KP_MINUS, KEY_KP_MULTIPLY, KEY_KP_PLUS, KEY_m, KEY_RETURN, KEY_s, KEY_TAB, LEFT_SIDE, MC_Black, MC_Dark, MC_Light, MC_White, Mouse_K, Mouse_X, Mouse_Y, NULL, Num2str, Open_window(), OPERATION_AIRBRUSH, Print_in_window(), Print_in_window_underscore(), Quit_is_required, Read_pixel, Readline(), Refresh_airbrush_settings(), Select_button(), Stencil_tag_color(), Stencil_update_color(), Update_window_area, Wait_end_of_click(), Window_attribute2, Window_clear_tags(), Window_clicked_button(), Window_display_frame(), Window_height, Window_help(), Window_input_content(), Window_set_input_button_s(), Window_set_normal_button(), Window_set_palette_button(), Window_set_scroller_button(), and Window_width.
void Button_Curves | ( | int | btn | ) |
Callback for the curves button left click.
Start curve operation according to the selected mode.
References Display_cursor(), Hide_cursor, Selected_curve_mode, and Start_operation_stack().
void Button_Curves_switch_mode | ( | int | btn | ) |
Callback for the curves button right click.
Select the curve mode (1-point, 2-point)
References BUTTON_PRESSED, Display_cursor(), Display_sprite_in_menu(), Draw_menu_button(), Hide_cursor, MENU_SPRITE_4_POINTS_CURVE, OPERATION_3_POINTS_CURVE, OPERATION_4_POINTS_CURVE, Selected_curve_mode, and Start_operation_stack().
void Button_Empty_rectangle | ( | int | btn | ) |
Callback for the empty rectangle button.
Start the rectangle operation.
References Display_cursor(), Hide_cursor, OPERATION_EMPTY_RECTANGLE, and Start_operation_stack().
void Button_Filled_rectangle | ( | int | btn | ) |
Callback for the filled rectangle button.
Start the filled rectangle operation.
References Display_cursor(), Hide_cursor, OPERATION_FILLED_RECTANGLE, and Start_operation_stack().
void Button_Text | ( | int | btn | ) |
Callback for the text button.
Opens the text setup window.
References T_Config::Auto_discontinuous, Back_color, Best_color_perceptual_except(), Brush_height, Brush_offset_X, Brush_offset_Y, Brush_original_palette, Brush_width, BUTTON_DRAW, BUTTON_EFFECTS, BUTTON_HELP, BUTTON_PRESSED, BUTTON_TEXT, Change_paintbrush_shape(), Close_window(), Colorize_current_mode, Colorize_mode, Config, Current_operation, T_List_button::Cursor_position, Display_brush, Display_cursor(), Draw_menu_button(), Draw_one_font_name(), Effect_alpha_colorize(), Effect_function, Error, Font_count(), Fore_color, T_Special_button::Height, Hide_cursor, INPUT_TYPE_INTEGER, INPUT_TYPE_STRING, Is_shortcut(), Key, KEY_a, KEY_b, KEY_ESC, KEY_i, KEY_NONE, KEY_RETURN, KEY_s, KEY_t, LEFT_SIDE, T_List_button::List_start, MC_Black, MC_Dark, MC_Light, Menu_factor_X, Menu_factor_Y, Min(), NULL, Num2str, Open_window(), OPERATION_DISCONTINUOUS_DRAW, PAINTBRUSH_SHAPE_COLOR_BRUSH, PAINTBRUSH_SHAPE_MONO_BRUSH, T_Special_button::Pos_X, T_Special_button::Pos_Y, Print_in_window(), Print_in_window_underscore(), Quick_shade_mode, Quit_is_required, Readline(), Readline_ex(), Realloc_brush(), Remap_brush(), Remap_general_lowlevel(), Render_text(), RIGHT_SIDE, Select_button(), Shade_mode, Smear_mode, Smooth_mode, Tiling_mode, TrueType_font(), Unselect_button(), Update_window_area, T_Special_button::Width, Window_attribute2, Window_clicked_button(), Window_display_frame_in(), Window_height, Window_help(), Window_input_content(), Window_pos_X, Window_pos_Y, Window_rectangle(), Window_redraw_list(), Window_set_input_button_s(), Window_set_list_button(), Window_set_normal_button(), Window_set_repeatable_button(), Window_set_scroller_button(), Window_set_special_button(), and Window_width.
void Button_Gradients | ( | int | btn | ) |
Callback for the gradation button.
Opens the "Gradation menu".
References Allow_colorcycling, T_Document::backups, BUTTON_GRADRECT, BUTTON_HELP, Close_window(), COLOR_CYCLING_SPEED_MAX, Current_gradient, Current_operation, Cycling_mode, Display_cursor(), Display_pixel(), Draw_button_gradient_style(), Draw_gradient_preview(), T_Gradient_range::End, Get_color_behind_window(), GFX2_MOD_SHIFT, Gradient_pixel, T_Page::Gradients, Hide_cursor, Input_sticky_control, T_Gradient_range::Inverse, Is_shortcut(), Key, KEY_BACKQUOTE, KEY_COMMA, KEY_ESC, KEY_MOUSEWHEELDOWN, KEY_MOUSEWHEELUP, KEY_NONE, KEY_RETURN, KEY_TAB, Main, MC_Black, MC_Dark, MC_Light, T_Gradient_range::Mix, Mouse_K, Mouse_X, Mouse_Y, NULL, Num2str, Open_window(), OPERATION_GRAD_RECTANGLE, T_List_of_pages::Pages, T_Document::palette, Pixel, T_Scroller_button::Position, Print_color_cycling_details(), Print_in_window(), Quit_is_required, T_Gradient_array::Range, Read_pixel, Set_palette(), SPECIAL_CYCLE_MODE, T_Gradient_range::Speed, T_Gradient_range::Start, Tag_color_gradient_range(), T_Gradient_range::Technique, Unselect_button(), Update_window_area, Wait_end_of_click(), Window_attribute2, Window_clicked_button(), Window_display_frame_in(), Window_draw_slider(), Window_height, Window_help(), Window_set_horizontal_scroller_button(), Window_set_normal_button(), Window_set_palette_button(), Window_set_scroller_button(), and Window_width.
void Load_gradient_data | ( | int | index | ) |
Gets the informations from the gradations table and set the global vars for the current gradation.
index | index of the selected gradation |
References T_Document::backups, T_Gradient_range::End, Error, Gradient_basic(), Gradient_bounds_range, Gradient_dithered(), Gradient_extra_dithered(), Gradient_function, Gradient_is_inverted, Gradient_lower_bound, Gradient_random_factor, Gradient_upper_bound, T_Page::Gradients, T_Gradient_range::Inverse, Main, T_Gradient_range::Mix, T_List_of_pages::Pages, T_Gradient_array::Range, T_Gradient_range::Start, and T_Gradient_range::Technique.
Referenced by Draw_gradient_preview(), Grad_circle_12_0(), Grad_ellipse_12_0(), and Grad_rectangle_12_0().
void Button_Grad_rectangle | ( | int | btn | ) |
Callback for the gradation rectangle button.
Starts the gradation rectangle drawing operation.
References Display_cursor(), Hide_cursor, OPERATION_GRAD_RECTANGLE, and Start_operation_stack().
void Button_circle_ellipse | ( | int | btn | ) |
Callback for the circle/ellipse buttons Starts drawing circle/ellipse.
References BUTTON_CIRCLES, BUTTON_FILLCIRC, BUTTON_SPHERES, Display_cursor(), Hide_cursor, OPERATION_EMPTY_CIRCLE_CTR, OPERATION_FILLED_CIRCLE_CTR, OPERATION_GRAD_CIRCLE_CTR, Selected_circle_ellipse_mode, and Start_operation_stack().
Referenced by Button_Circle_switch_mode().
void Button_Circle_switch_mode | ( | int | btn | ) |
Callback for the cicle button right click.
Circle modes
References T_Dropdown_button::Bottom_up, Button_circle_ellipse(), BUTTON_CIRCLES, BUTTON_FILLCIRC, BUTTON_PRESSED, BUTTON_RELEASED, BUTTON_SPHERES, Buttons_Pool, Display_cursor(), Display_sprite_in_menu(), Draw_menu_button(), Dropdown_activate(), T_Dropdown_button::Dropdown_width, T_Dropdown_button::First_item, T_Dropdown_button::Height, T_Toolbar_button::Height, Hide_cursor, MENU_SPRITE_ELLIPSES, MENU_SPRITE_GRAD_ELLIPSE, Menu_Y, Mouse_K, NULL, T_Dropdown_choice::Number, T_Dropdown_button::Pos_X, T_Dropdown_button::Pos_Y, Selected_circle_ellipse_mode, Window_dropdown_add_item(), Window_dropdown_clear_items(), T_Toolbar_button::X_offset, and T_Toolbar_button::Y_offset.
void Button_polygon | ( | int | btn | ) |
Callback for the polyline button left click.
Starts drawing a polygon.
References Display_cursor(), Hide_cursor, OPERATION_POLYGON, and Start_operation_stack().
void Button_Polyform | ( | int | btn | ) |
Callback for the polyline right click.
Starts drawing a polyform.
References Display_cursor(), Hide_cursor, OPERATION_POLYFORM, and Start_operation_stack().
void Button_Polyfill | ( | int | btn | ) |
Callback for the polyfill button left click.
Starts drawing a filled polygon.
References Display_cursor(), Hide_cursor, OPERATION_POLYFILL, and Start_operation_stack().
void Button_Filled_polyform | ( | int | btn | ) |
Callback for the polyfill button right click.
Starts drawing a filled polyform.
References Display_cursor(), Hide_cursor, OPERATION_FILLED_POLYFORM, and Start_operation_stack().
void Button_Adjust | ( | int | btn | ) |
Callback for the adjust picture button.
Start the adjust picture operation.
References Display_cursor(), Hide_cursor, OPERATION_SCROLL, and Start_operation_stack().
void Button_Shade_mode | ( | void | ) |
Callback for the shade button (in the FX window).
Toogle the shade mode.
References Colorize_mode, Effect_function, Effect_shade(), No_effect(), Quick_shade_mode, Shade_mode, Smear_mode, Smooth_mode, and Tiling_mode.
Referenced by Button_Effects(), Button_Shade_menu(), and Main_handler().
void Button_Quick_shade_mode | ( | void | ) |
Callback for the QSHade button (in the FX window).
Toogle the Quick Shade effect.
References Colorize_mode, Effect_function, Effect_quick_shade(), No_effect(), Quick_shade_mode, Shade_mode, Smear_mode, Smooth_mode, and Tiling_mode.
Referenced by Button_Effects(), Button_Quick_shade_menu(), and Main_handler().
void Button_Shade_menu | ( | void | ) |
Callback for the Shade button (in the FX window) right click.
Displays the shade setup menu.
References Button_Shade_mode(), Shade_mode, and Shade_settings_menu().
Referenced by Button_Effects(), and Main_handler().
void Button_Stencil_mode | ( | void | ) |
Callback for the Stencil button (in the FX window) left click.
Toogle stencil mode.
References Stencil_mode.
Referenced by Button_Effects(), and Main_handler().
void Button_Stencil_menu | ( | void | ) |
Callback for the Stencil button (in the FX window) right click.
Displays the stencil setup menu.
References Menu_tag_colors(), SPECIAL_STENCIL_MENU, Stencil, and Stencil_mode.
Referenced by Button_Effects(), and Main_handler().
void Button_Mask_mode | ( | void | ) |
Callback for the Mask button (in the FX window) left click.
Toogles the mask mode/
References Mask_mode.
Referenced by Button_Effects(), and Main_handler().
void Button_Mask_menu | ( | void | ) |
Callback for the Mask button (in the FX window) right click.
Displays the mask setup menu.
References Mask_mode, Mask_table, Menu_tag_colors(), and SPECIAL_MASK_MENU.
Referenced by Button_Effects(), and Main_handler().
void Button_Snap_mode | ( | void | ) |
Callback for the Grid button (in the FX window) left click.
Toogle the grid.
References Compute_paintbrush_coordinates(), Display_cursor(), Hide_cursor, and Snap_mode.
Referenced by Button_Effects(), and Main_handler().
void Button_Grid_menu | ( | void | ) |
Callback for the Grid button (in the FX window) right click.
Displays the grid setup menu.
References BUTTON_EFFECTS, BUTTON_HELP, Close_window(), Disable_tilemap(), Display_cursor(), Hide_cursor, INPUT_TYPE_INTEGER, Is_shortcut(), Key, KEY_ESC, KEY_RETURN, MC_Black, MC_Dark, MC_Light, MIN, Num2str, Open_window(), Print_in_window(), Readline(), Snap_height, Snap_mode, Snap_offset_X, Snap_offset_Y, Snap_width, Spare, Tilemap_update(), Update_window_area, Window_clicked_button(), Window_height, Window_help(), Window_input_content(), Window_set_input_button(), Window_set_normal_button(), and Window_width.
Referenced by Button_Effects(), and Main_handler().
void Button_Show_grid | ( | void | ) |
Callback to toggle the grid visible in the magnified view.
References Display_all_screen(), Display_cursor(), Hide_cursor, and Show_grid.
Referenced by Main_handler().
void Copy_preset_sieve | ( | byte | index | ) |
In the sieve window, copy one of the presets patterns to the current one.
index | Index of the pattern to copy |
References Gfx, Sieve, Sieve_height, T_Gui_skin::Sieve_pattern, and Sieve_width.
Referenced by Button_Sieve_menu(), and Init_program().
void Invert_trame | ( | void | ) |
In the sieve window, swaps black and white in the current pattern.
References Sieve, Sieve_height, and Sieve_width.
Referenced by Button_Sieve_menu(), and Main_handler().
void Button_Sieve_mode | ( | void | ) |
Callback for the Sieve button (in the FX window) left click.
Toogle sieve mode.
References Sieve_mode.
Referenced by Button_Effects(), Button_Sieve_menu(), and Main_handler().
void Button_Sieve_menu | ( | void | ) |
Callback for the Sieve button (in the FX window) right click.
Displays the sieve setup menu.
References Back_color, Block, Brush_height, Brush_offset_X, Brush_offset_Y, Brush_original_palette, Brush_original_pixels, Brush_width, BUTTON_EFFECTS, BUTTON_HELP, Button_Sieve_mode(), Change_paintbrush_shape(), Close_window(), Copy_preset_sieve(), Display_cursor(), Draw_preset_sieve_patterns(), Draw_sieve_scaled(), Fore_color, GFX2_MOD_SHIFT, Hide_cursor, Invert_trame(), Is_shortcut(), Key, KEY_c, KEY_DOWN, KEY_ESC, KEY_F1, KEY_g, KEY_i, KEY_INSERT, KEY_LEFT, KEY_RETURN, KEY_RIGHT, KEY_t, KEY_UP, LEFT_SIDE, Main, MC_Black, MC_Dark, MC_Light, MC_White, Menu_factor_X, Menu_factor_Y, Mouse_K, Mouse_X, Mouse_Y, NULL, Num2str, Open_window(), PAINTBRUSH_SHAPE_COLOR_BRUSH, T_Document::palette, T_Normal_button::Pos_X, T_Normal_button::Pos_Y, Print_in_window(), Read_pixel_from_brush(), Realloc_brush(), Remap_brush(), Sieve, Sieve_height, Sieve_mode, Sieve_width, Update_rect(), Update_sieve_area(), Update_window_area, Window_clicked_button(), Window_display_frame(), Window_display_frame_in(), Window_height, Window_help(), Window_pos_X, Window_pos_Y, Window_rectangle(), Window_set_normal_button(), Window_set_repeatable_button(), Window_set_special_button(), Window_special_button_list, and Window_width.
Referenced by Button_Effects(), and Main_handler().
void Button_Smooth_mode | ( | void | ) |
Callback for the smooth button (in the FX window) left click.
Callback for the Smooth button (in the FX window) right click.
Toogles smooth mode.
Displays the smooth setup menu.
References Colorize_mode, Effect_function, Effect_smooth(), No_effect(), Quick_shade_mode, Shade_mode, Smear_mode, Smooth_mode, and Tiling_mode.
Referenced by Button_Effects(), Button_Smooth_menu(), and Main_handler().
void Compute_colorize_table | ( | void | ) |
Computes the tables used by the transparency/colorize mode.
These tables are used to match the drawing color*picture color to the color that is painted on screen.
References Colorize_opacity, Factors_inv_table, and Factors_table.
Referenced by Button_Colorize_menu(), Init_program(), and Transparency_set().
void Button_Colorize_mode | ( | void | ) |
Callback for the Tranparency button (in the FX window) left click.
Toogles transparent drawing mode.
References Colorize_current_mode, Colorize_mode, Effect_additive_colorize(), Effect_alpha_colorize(), Effect_function, Effect_interpolated_colorize(), Effect_substractive_colorize(), No_effect(), Quick_shade_mode, Shade_mode, Smooth_mode, and Tiling_mode.
Referenced by Button_Colorize_menu(), Button_Effects(), and Main_handler().
void Button_Colorize_menu | ( | void | ) |
Callback for the Transparency button (in the FX window) right click.
Displays the tranparency setup menu.
References Button_Colorize_display_selection(), Button_Colorize_mode(), BUTTON_EFFECTS, BUTTON_HELP, Close_window(), Colorize_current_mode, Colorize_mode, Colorize_opacity, Compute_colorize_table(), Display_cursor(), Hide_cursor, INPUT_TYPE_INTEGER, Is_shortcut(), Key, KEY_a, KEY_d, KEY_ESC, KEY_i, KEY_RETURN, KEY_s, MC_Dark, MC_Light, Num2str, Open_window(), Print_in_window(), Readline(), SPECIAL_COLORIZE_MENU, Update_window_area, Window_clicked_button(), Window_display_frame(), Window_height, Window_help(), Window_input_content(), Window_set_input_button(), Window_set_normal_button(), Window_special_button_list, and Window_width.
Referenced by Button_Effects(), and Main_handler().
void Button_Tiling_mode | ( | void | ) |
Callback for the Tiling button (in the FX window) left click.
Toogles tiling mode.
References Colorize_mode, Effect_function, Effect_tiling(), No_effect(), Quick_shade_mode, Shade_mode, Smear_mode, Smooth_mode, and Tiling_mode.
Referenced by Button_Effects(), Button_Tiling_menu(), and Main_handler().
void Button_Tiling_menu | ( | void | ) |
Callback for the Tiling button (in the FX window) right click.
Displays the tiling setup menu.
References Brush_height, Brush_width, BUTTON_EFFECTS, BUTTON_HELP, Button_Tiling_mode(), Close_window(), Display_cursor(), INPUT_TYPE_INTEGER, Is_shortcut(), Key, KEY_ESC, KEY_RETURN, MC_Dark, MC_Light, Num2str, Open_window(), Print_in_window(), Readline(), Tiling_mode, Tiling_offset_X, Tiling_offset_Y, Update_window_area, Window_clicked_button(), Window_height, Window_help(), Window_input_content(), Window_set_input_button(), Window_set_normal_button(), and Window_width.
Referenced by Button_Effects(), and Main_handler().
void Button_Constraint_mode | ( | void | ) |
Constaint enforcer/checker.
A call toggles between constraint mode and Layered mode.
Setting the palette is done in Button_Constraint_menu (8-bit constraint window)
References Add_layer(), T_Document::backups, C64_pixels_to_FLI(), Check_block_constraints(), Convert_to_dhgr(), Convert_to_hgr(), GFX2_INFO, GFX2_Log(), T_Page::Image, T_Document::image_height, T_Page::Image_mode, IMAGE_MODE_ANIMATION, IMAGE_MODE_C64FLI, IMAGE_MODE_DHGR, IMAGE_MODE_EGX, IMAGE_MODE_HGR, IMAGE_MODE_LAYERED, IMAGE_MODE_MODE5, IMAGE_MODE_RASTER, IMAGE_MODE_TMS9918G2, T_Document::image_width, Main, T_Page::Nb_layers, T_List_of_pages::Pages, Pixel_in_layer(), T_Image::Pixels, Read_pixel_from_layer(), Selected_Constraint_Mode, Switch_layer_mode(), T_Page::Transparent_color, and Verbose_message().
Referenced by Button_Constraint_menu(), and Button_Effects().
void Button_Constraint_menu | ( | void | ) |
References Back_color, T_Document::backups, Button_Constraint_mode(), BUTTON_EFFECTS, BUTTON_HELP, C64_set_palette(), Check_menu_mode(), Close_window(), Compute_optimal_menu_colors(), Config, CPC_set_default_BASIC_palette(), CPC_set_HW_palette(), DHGR_set_palette(), Dialog_multiple_choice(), Display_all_screen(), Display_cursor(), Display_menu(), End_of_modification(), Favorite_GUI_color(), First_color_in_palette, Fore_color, HGR_set_palette(), Hide_cursor, T_Page::Image_mode, IMAGE_MODE_ANIMATION, IMAGE_MODE_C64FLI, IMAGE_MODE_C64HIRES, IMAGE_MODE_C64MULTI, IMAGE_MODE_DHGR, IMAGE_MODE_EGX, IMAGE_MODE_EGX2, IMAGE_MODE_GBC, IMAGE_MODE_HGR, IMAGE_MODE_MEGADRIVE, IMAGE_MODE_MODE5, IMAGE_MODE_RASTER, IMAGE_MODE_THOMSON, IMAGE_MODE_TMS9918G2, IMAGE_MODE_ZX, Is_shortcut(), Key, KEY_ESC, KEY_g, KEY_p, KEY_RETURN, KEY_s, label, LEFT_SIDE, MACHINE_MO5, MACHINE_MO6, MACHINE_TO7, MACHINE_TO8, Main, MC_Black, MC_Dark, MC_Light, mode, T_Config::MOTO_gamma, MOTO_set_MO5_palette(), MOTO_set_TO7_palette(), MSX_set_palette(), NULL, Open_window(), T_List_of_pages::Pages, T_Document::palette, Print_in_window(), Print_in_window_underscore(), Redraw_layered_image(), Remap_screen_after_menu_colors_change(), Resize_image(), RIGHT_SIDE, Selected_Constraint_Mode, Set_palette(), Set_palette_Gamma(), Set_palette_RGB_scale(), Show_grid, Snap_height, Snap_mode, Snap_offset_X, Snap_offset_Y, Snap_width, Update_window_area, Window_attribute2, Window_clicked_button(), Window_dropdown_add_item(), Window_height, Window_help(), Window_set_dropdown_button(), Window_set_normal_button(), Window_width, and ZX_Spectrum_set_palette().
Referenced by Button_Effects().
void Button_Tilemap_mode | ( | void | ) |
References Main, T_Document::tilemap_mode, and Tilemap_update().
Referenced by Button_Effects(), and Main_handler().
void Button_Tilemap_menu | ( | void | ) |
References BUTTON_EFFECTS, BUTTON_HELP, Close_window(), Config, Display_cursor(), Hide_cursor, Is_shortcut(), Key, KEY_ESC, KEY_RETURN, Main, MC_Black, MC_Dark, MC_Light, Open_window(), Print_in_window(), T_Config::Tilemap_allow_flipped_x, T_Config::Tilemap_allow_flipped_y, T_Document::tilemap_mode, T_Config::Tilemap_show_count, Tilemap_update(), Update_window_area, Window_clicked_button(), Window_display_frame(), Window_height, Window_help(), Window_set_normal_button(), and Window_width.
Referenced by Button_Effects(), and Main_handler().
void Effects_off | ( | void | ) |
Callback for the command that turns off all drawaing effects.
References Colorize_mode, Effect_function, Main, Mask_mode, No_effect(), Quick_shade_mode, Shade_mode, Sieve_mode, Smear_mode, Smooth_mode, Snap_mode, Stencil_mode, T_Document::tilemap_mode, and Tiling_mode.
Referenced by Button_Effects(), and Main_handler().
void Button_Effects | ( | int | btn | ) |
Callback for the effects button click.
Displays the effect selection menu.
References Any_effect_active(), T_Document::backups, Button_Colorize_menu(), Button_Colorize_mode(), Button_Constraint_menu(), Button_Constraint_mode(), BUTTON_EFFECTS, Button_Grid_menu(), BUTTON_HELP, Button_Mask_menu(), Button_Mask_mode(), Button_Quick_shade_menu(), Button_Quick_shade_mode(), Button_Shade_menu(), Button_Shade_mode(), Button_Sieve_menu(), Button_Sieve_mode(), Button_Smear_mode(), Button_Smooth_menu(), Button_Smooth_mode(), Button_Snap_mode(), Button_Stencil_menu(), Button_Stencil_mode(), Button_Tilemap_menu(), Button_Tilemap_mode(), Button_Tiling_menu(), Button_Tiling_mode(), C1, C2, C3, Close_window(), Config, Config_Key, Display_cursor(), Display_effect_sprite(), Display_effect_state(), Display_effect_states(), Display_feedback_state(), Effects_off(), EFFECTS_SPRITE_8BIT, EFFECTS_SPRITE_GRID, EFFECTS_SPRITE_MASK, EFFECTS_SPRITE_SHADE, EFFECTS_SPRITE_SIEVE, EFFECTS_SPRITE_SMEAR, EFFECTS_SPRITE_SMOOTH, EFFECTS_SPRITE_STENCIL, EFFECTS_SPRITE_TILING, EFFECTS_SPRITE_TRANSP, T_Config::FX_Feedback, Hide_cursor, T_Page::Image_mode, IMAGE_MODE_ANIMATION, Input_sticky_control, Is_shortcut(), Key, KEY_DELETE, KEY_ESC, KEY_f, KEY_RETURN, L1, L2, L3, L4, L5, LEFT_SIDE, Main, Mask_mode, MC_Black, MC_Dark, MC_Light, NULL, Open_window(), T_List_of_pages::Pages, Print_in_window(), Print_in_window_underscore(), Quit_is_required, Selected_Constraint_Mode, Show_grid, Sieve_mode, Snap_mode, SPECIAL_COLORIZE_MODE, SPECIAL_FORMAT_CHECKER_MENU, SPECIAL_GRID_MODE, SPECIAL_MASK_MODE, SPECIAL_QUICK_SHADE_MODE, SPECIAL_SHADE_MODE, SPECIAL_SHOW_GRID, SPECIAL_SIEVE_MODE, SPECIAL_SMEAR_MODE, SPECIAL_SMOOTH_MODE, SPECIAL_STENCIL_MODE, SPECIAL_TILEMAP_MODE, SPECIAL_TILING_MODE, Stencil_mode, T_Document::tilemap_mode, Unselect_button(), Update_FX_feedback(), Update_window_area, Window_attribute1, Window_clicked_button(), Window_display_frame_mono(), Window_get_clicked_button(), Window_height, Window_help(), Window_rectangle(), Window_set_normal_button(), and Window_width.
void Button_Brush | ( | int | btn | ) |
Callback for the brush button left click.
Start the brush picking operation.
References Current_operation, Display_cursor(), Hide_cursor, OPERATION_GRAB_BRUSH, Start_operation_stack(), and Unselect_button().
void Button_Restore_brush | ( | int | btn | ) |
Callback for the brush button right click.
Activates the last captured custom brush.
References Change_paintbrush_shape(), Display_cursor(), Hide_cursor, PAINTBRUSH_SHAPE_COLOR_BRUSH, and Unselect_button().
void Button_Unselect_brush | ( | int | btn | ) |
Disables the custom brush and set back a regular one.
References Operation_before_interrupt, and Start_operation_stack().
void Button_Lasso | ( | int | btn | ) |
Callback for the freehand brush pick button left click.
Starts freehand brush picking operation.
References Current_operation, Display_cursor(), Hide_cursor, OPERATION_POLYBRUSH, Paintbrush_shape, Paintbrush_shape_before_lasso, PAINTBRUSH_SHAPE_POINT, Start_operation_stack(), and Unselect_button().
void Button_Unselect_lasso | ( | int | btn | ) |
Disables the custom freehand brush and set back a regular one.
References Current_operation, Operation_before_interrupt, OPERATION_POLYBRUSH, Paintbrush_shape, Paintbrush_shape_before_lasso, and Start_operation_stack().
void Button_Colorpicker | ( | int | btn | ) |
Starts the color picking operation.
References Colorpicker_color, Current_operation, Display_cursor(), Hide_cursor, T_Document::magnifier_mode, Main, Menu_is_visible, Menu_Y, Mouse_X, Mouse_Y, Operation_before_interrupt, OPERATION_COLORPICK, OPERATION_REPLACE, Paintbrush_shape, Paintbrush_shape_before_colorpicker, PAINTBRUSH_SHAPE_NONE, Print_in_menu(), T_Document::separator_position, Start_operation_stack(), Unselect_button(), and T_Document::X_zoom.
void Button_Unselect_colorpicker | ( | int | btn | ) |
Disables the color picker button and get back to the previously selected drawing mode.
References Current_operation, T_Document::magnifier_mode, Main, Menu_is_visible, Menu_Y, Mouse_X, Mouse_Y, Operation_before_interrupt, OPERATION_COLORPICK, OPERATION_REPLACE, Paintbrush_shape, Paintbrush_shape_before_colorpicker, Print_in_menu(), T_Document::separator_position, Start_operation_stack(), and T_Document::X_zoom.
void Button_Invert_foreback | ( | int | btn | ) |
Swap fore- and background colors.
References Back_color, Display_cursor(), Display_foreback(), Fore_color, Frame_menu_color(), Hide_cursor, Reposition_palette(), and Unselect_button().
void Button_Magnify | ( | int | btn | ) |
Enters magnify mode.
References Clip_magnifier_offsets(), Coming_from_zoom_factor_menu, Compute_limits(), Compute_magnifier_data(), Compute_paintbrush_coordinates(), Config, Current_operation, Display_all_screen(), Display_cursor(), T_Config::Fast_zoom, Hide_cursor, T_Document::magnifier_height, T_Document::magnifier_mode, T_Document::magnifier_offset_X, T_Document::magnifier_offset_Y, T_Document::magnifier_width, Main, Menu_Y, Mouse_X, Mouse_Y, T_Document::offset_X, T_Document::offset_Y, OPERATION_MAGNIFY, Pixel_preview, Pixel_preview_magnifier, Position_screen_according_to_zoom(), Start_operation_stack(), Unselect_button(), and Update_rect().
void Button_Magnify_menu | ( | int | btn | ) |
Displays magnify menu.
References T_Dropdown_button::Bottom_up, BUTTON_MAGNIFIER, Buttons_Pool, Change_magnifier_factor(), Coming_from_zoom_factor_menu, Current_operation, Display_all_screen(), Display_cursor(), Dropdown_activate(), T_Dropdown_button::Dropdown_width, T_Dropdown_button::First_item, T_Dropdown_button::Height, T_Toolbar_button::Height, Hide_cursor, LEFT_SIDE, T_Document::magnifier_mode, Main, Menu_Y, NB_ZOOM_FACTORS, NULL, T_Dropdown_choice::Number, OPERATION_MAGNIFY, T_Dropdown_button::Pos_X, T_Dropdown_button::Pos_Y, Screen_width, Select_button(), T_Document::separator_position, Unselect_button(), Update_rect(), Window_dropdown_add_item(), Window_dropdown_clear_items(), T_Toolbar_button::X_offset, and T_Toolbar_button::Y_offset.
void Button_Unselect_magnifier | ( | int | btn | ) |
Exit magnify mode.
References Compute_limits(), Compute_paintbrush_coordinates(), Display_all_screen(), T_Document::image_height, T_Document::image_width, T_Document::magnifier_height, T_Document::magnifier_mode, T_Document::magnifier_offset_X, T_Document::magnifier_offset_Y, T_Document::magnifier_width, Main, Menu_Y, T_Document::offset_X, T_Document::offset_Y, Old_MX, Old_MY, Operation_before_interrupt, Pixel_preview, Pixel_preview_normal, Screen_width, and Start_operation_stack().
void Button_Brush_FX | ( | int | btn | ) |
Display the Brush effects window.
References Brush, Brush_colormap, Brush_height, Brush_offset_X, Brush_offset_Y, Brush_original_pixels, Brush_width, BUTTON_BRUSH_EFFECTS, BUTTON_HELP, Close_window(), Config_Key, CONTEXT_BRUSH, Display_cursor(), Flip_X_lowlevel(), Flip_Y_lowlevel(), Get_colors_from_brush(), Hide_cursor, Is_shortcut(), Key, KEY_ESC, Load_picture(), MC_Black, MC_Dark, MC_Light, Nibble_brush(), NULL, Open_window(), OPERATION_DISTORT_BRUSH, OPERATION_ROTATE_BRUSH, OPERATION_STRETCH_BRUSH, Outline_brush(), Pixel_in_window(), Print_in_window(), Quit_is_required, Remap_brush(), Remap_general_lowlevel(), Rotate_180_deg_lowlevel(), Rotate_90_deg(), Save_picture(), SPECIAL_BOTTOM_LEFT_ATTACHMENT, SPECIAL_BOTTOM_RIGHT_ATTACHMENT, SPECIAL_CENTER_ATTACHMENT, SPECIAL_DISTORT, SPECIAL_FLIP_X, SPECIAL_FLIP_Y, SPECIAL_GET_BRUSH_COLORS, SPECIAL_LOAD_BRUSH, SPECIAL_NIBBLE, SPECIAL_OUTLINE, SPECIAL_RECOLORIZE_BRUSH, SPECIAL_ROTATE_180, SPECIAL_ROTATE_90, SPECIAL_ROTATE_ANY_ANGLE, SPECIAL_SAVE_BRUSH, SPECIAL_STRETCH, SPECIAL_TOP_LEFT_ATTACHMENT, SPECIAL_TOP_RIGHT_ATTACHMENT, Start_operation_stack(), Unselect_button(), Update_window_area, Window_clicked_button(), Window_display_frame(), Window_height, Window_help(), Window_rectangle(), Window_set_normal_button(), and Window_width.
void Button_Page | ( | int | btn | ) |
Swap main and spare drawing pages.
References Any_effect_active(), BUTTON_EFFECTS, BUTTON_MAGNIFIER, Check_menu_mode(), Compute_limits(), Compute_magnifier_data(), Compute_optimal_menu_colors(), Compute_paintbrush_coordinates(), Config, Copy_view_to_spare(), Display_all_screen(), Display_cursor(), Display_menu(), Draw_menu_button(), End_of_modification(), Hide_cursor, T_Document::image_height, T_Document::image_width, T_Document::magnifier_factor, T_Document::magnifier_mode, Main, T_Document::palette, Pixel_preview, Pixel_preview_magnifier, Pixel_preview_normal, Set_palette(), Spare, T_Config::Sync_views, Unselect_button(), Update_buffers(), Update_depth_buffer(), Update_screen_targets(), Upload_infos_page(), and ZOOM_FACTOR.
Referenced by Button_Quit(), Check_recovery(), and Init_program().
void Button_Copy_page | ( | int | btn | ) |
Copy main page to spare page.
References Backup_the_spare(), BUTTON_HELP, BUTTON_PAGE, Close_window(), Copy_image_only(), Copy_some_colors(), Disable_tilemap(), Display_cursor(), Hide_cursor, T_Document::image_height, T_Document::image_is_modified, T_Document::image_width, Is_shortcut(), Key, KEY_c, KEY_ESC, KEY_p, KEY_r, KEY_RETURN, KEY_x, LAYER_ALL, LAYER_NONE, Main, NULL, Open_window(), T_Document::palette, Quit_is_required, Redraw_spare_image(), Remap_spare(), Spare, T_Document::tilemap_mode, Unselect_button(), Update_spare_buffers(), Update_window_area, Window_clicked_button(), Window_height, Window_help(), Window_set_normal_button(), and Window_width.
void Copy_image_only | ( | void | ) |
Copy only pixel data from main page to spare page (no palette copy).
References Backup_and_resize_the_spare(), T_Document::backups, Copy_part_of_image_to_another(), Copy_view_to_spare(), T_Document::current_layer, T_Page::Image, T_Document::image_height, T_Document::image_width, Main, Message_out_of_memory(), Min(), T_Page::Nb_layers, T_Page::Next, T_List_of_pages::Pages, T_Image::Pixels, Redraw_spare_image(), Spare, and Update_spare_buffers().
Referenced by Button_Copy_page().
void Button_Kill | ( | int | btn | ) |
Kill (free from memory) the current page.
References T_Document::backups, BUTTON_MAGNIFIER, Compute_optimal_menu_colors(), Confirmation_box(), Display_all_screen(), Display_cursor(), Display_menu(), Draw_menu_button(), Free_current_page(), Hide_cursor, T_List_of_pages::List_size, T_Document::magnifier_mode, Main, T_Document::palette, Set_palette(), Unselect_button(), and Warning_message().
void Button_Resolution | ( | int | btn | ) |
Display the screenmode menu.
References BUTTON_HELP, BUTTON_MAGNIFIER, BUTTON_RESOL, Check_mode_button(), Close_window(), Current_resolution, Display_all_screen(), Display_cursor(), Display_menu(), Display_modes_list(), End_of_modification(), Error, T_Video_mode::Height, Hide_cursor, T_Document::image_height, T_Document::image_width, Init_mode_video(), INPUT_TYPE_INTEGER, Is_shortcut(), Key, KEY_DOWN, KEY_END, KEY_ESC, KEY_h, KEY_HOME, KEY_NONE, KEY_PAGEDOWN, KEY_PAGEUP, KEY_RETURN, KEY_UP, KEY_w, LEFT_SIDE, T_Document::magnifier_mode, Main, MC_Black, MC_Dark, MC_Light, Menu_factor_Y, MODELIST_LINES, Mouse_K, Mouse_X, Mouse_Y, Nb_video_modes, NULL, Num2str, Open_window(), Paintbrush_X, Paintbrush_Y, Pixel_height, PIXEL_MAX, Pixel_ratio, PIXEL_SIMPLE, Pixel_width, Print_in_window(), Print_in_window_underscore(), Quit_is_required, Readline(), Reposition_palette(), Resize_image(), RIGHT_SIDE, Scroll_list_of_modes(), T_Video_mode::State, Tilemap_update(), Unselect_button(), Update_window_area, Video_mode, Wait_end_of_click(), T_Video_mode::Width, Window_attribute1, Window_attribute2, Window_clicked_button(), Window_display_frame(), Window_display_frame_in(), Window_draw_normal_bouton(), Window_dropdown_add_item(), Window_height, Window_help(), Window_input_content(), Window_pos_Y, Window_rectangle(), Window_set_dropdown_button(), Window_set_input_button_s(), Window_set_normal_button(), Window_set_scroller_button(), Window_set_special_button(), and Window_width.
void Button_Safety_resolution | ( | int | btn | ) |
Set the screen to the "safe resolution" (320x200 pixel window).
References BUTTON_MAGNIFIER, Current_resolution, Display_all_screen(), Display_cursor(), Display_menu(), Hide_cursor, Init_mode_video(), PIXEL_SIMPLE, Reposition_palette(), Unselect_button(), and Video_mode.
void Button_Load | ( | int | btn | ) |
Opens the load file dialog.
References CONTEXT_MAIN_IMAGE, Load_picture(), Main, Tilemap_update(), and Upload_infos_page().
void Button_Reload | ( | int | btn | ) |
Reload current picture from disk.
References T_Config::Auto_set_res, T_Document::backups, Best_video_mode(), BUTTON_LOAD, BUTTON_MAGNIFIER, Check_menu_mode(), Compute_limits(), Compute_optimal_menu_colors(), Compute_paintbrush_coordinates(), Config, Confirmation_box(), Current_resolution, Cursor_shape, CURSOR_SHAPE_HOURGLASS, Destroy_context(), Display_all_screen(), Display_cursor(), T_Config::Display_image_limits, Display_image_limits(), Display_menu(), Draw_menu_button(), End_of_modification(), T_Page::File_directory, File_error, T_Page::Filename, Hide_cursor, T_Document::image_is_modified, Init_context_layered_image(), Init_mode_video(), Load_image(), T_Document::magnifier_mode, Main, T_Document::offset_X, T_Document::offset_Y, Original_screen_X, Original_screen_Y, T_List_of_pages::Pages, T_Document::palette, Pixel_preview, Pixel_preview_normal, Pixel_ratio, PIXEL_TALL, PIXEL_TALL2, PIXEL_TALL3, PIXEL_WIDE, PIXEL_WIDE2, T_IO_Context::Ratio, Redraw_layered_image(), Resolution_in_command_line, Tilemap_update(), Unselect_button(), Upload_infos_page(), and Video_mode.
void Button_Save | ( | int | btn | ) |
Open the save file dialog.
References CONTEXT_MAIN_IMAGE, and Save_picture().
void Button_Autosave | ( | int | btn | ) |
Saves the current file without asking for a new name.
Saves the current file without asking for a new name.
References T_Config::Backup, Backup_existing_file(), T_Document::backups, BUTTON_SAVE, Config, Confirmation_box(), Cursor_shape, CURSOR_SHAPE_HOURGLASS, Destroy_context(), Display_cursor(), Error, T_Page::File_directory, File_error, File_exists(), T_IO_Context::File_name_unicode, T_Page::Filename, T_Page::Filename_unicode, Filepath_append_to_dir(), Hide_cursor, T_Document::image_is_modified, Init_context_layered_image(), Main, T_List_of_pages::Pages, Save_image(), Unicode_strdup(), and Unselect_button().
void Button_Settings | ( | int | btn | ) |
Display the setting menu.
References T_Config::Adjust_brush_pick, T_Config::Allow_multi_shortcuts, T_Config::Auto_discontinuous, T_Config::Auto_nb_used, T_Config::Auto_save, T_Config::Auto_set_res, T_Config::Backup, Brush_selector, BUTTON_HELP, BUTTON_SETTINGS, T_Config::Clear_palette, T_Config::Clear_with_stencil, Close_window(), Compute_optimal_menu_colors(), Config, T_Config::Coords_rel, T_Config::Delay_left_click_on_slider, T_Config::Delay_right_click_on_slider, T_Setting::Digits, Display_cursor(), T_Config::Display_image_limits, Display_menu(), T_Config::Double_click_speed, T_Config::Double_key_speed, T_Config::Fast_zoom, T_Config::Find_file_fast, Get_setting_value(), Hide_cursor, INPUT_TYPE_INTEGER, Is_shortcut(), Key, KEY_a, KEY_ESC, KEY_MOUSEWHEELDOWN, KEY_MOUSEWHEELUP, KEY_r, KEY_RETURN, KEY_s, LEFT_SIDE, T_Setting::Lookup, Lookup_AutoRes, Lookup_Coords, Lookup_FFF, Lookup_MenuRatio, Lookup_next(), Lookup_previous(), Lookup_SwapButtons, Lookup_VirtualKeyboard, Lookup_YesNo, Main, T_Config::Max_undo_pages, T_Setting::Max_value, T_Config::Maximize_preview, Menu_factor_Y, T_Setting::Min_value, T_Config::MOTO_gamma, Mouse_K, T_Config::Mouse_merge_movement, T_Config::Mouse_motion_debounce, Mouse_Y, NB_BUTTONS, T_Config::Nb_max_vertices_per_polygon, NULL, Num2str, T_Selector_settings::Offset, Open_window(), T_Config::Opening_message, T_Document::palette, Palette_selector, T_Special_button::Pos_X, T_Special_button::Pos_Y, T_Selector_settings::Position, Quit_is_required, T_Config::Ratio, Readline(), Remove_duplicate_shortcuts(), T_Config::Right_click_colorpick, RIGHT_SIDE, T_Config::Safety_colors, T_Config::Screen_size_in_GIF, T_Document::selector, T_Config::Separate_colors, Set_number_of_backups(), T_Config::Set_resolution_according_to, Set_setting_value(), SETTING_HEIGHT, SETTING_PAGES, SETTING_PER_PAGE, Settings_display_config(), Settings_load_config(), Settings_save_config(), T_Config::Show_hidden_directories, T_Config::Show_hidden_files, Spare, T_Config::Swap_buttons, T_Config::Sync_views, T_Config::Timer_delay, T_Setting::Type, Unselect_button(), Update_window_area, T_Config::Use_virtual_keyboard, T_Special_button::Width, Window_attribute2, Window_clicked_button(), Window_draw_slider(), Window_height, Window_help(), Window_normal_button_onclick(), Window_pos_Y, Window_scroller_button_list, Window_set_normal_button(), Window_set_scroller_button(), Window_set_special_button(), and Window_width.
void Button_Skins | ( | int | btn | ) |
Display the skin selector window.
Display the skin selector window.
References Add_font_or_skin(), Any_effect_active(), BUTTON_EFFECTS, BUTTON_HELP, BUTTON_MAGNIFIER, BUTTON_SETTINGS, Buttons_Pool, Close_window(), T_Gui_skin::Color, Compute_optimal_menu_colors(), Config, T_Config::Cursor, T_List_button::Cursor_position, Data_directory, T_Gui_skin::Default_palette, Display_cursor(), T_Config::Display_image_limits, Display_menu(), Draw_menu_button(), Draw_one_skin_name(), Filepath_append_to_dir(), FILESEL_Y, Find_file_in_fileselector(), T_Config::Font_file, Font_files_list, For_each_file(), Free_fileselector_list(), T_Fileselector_item::Full_name, Get_item_by_index(), Gfx, Gui_loading_error_message, T_Dropdown_button::Height, Hide_cursor, Is_shortcut(), Key, KEY_ESCAPE, KEY_NONE, KEY_RETURN, LEFT_SIDE, T_List_button::List_start, Load_font(), Load_graphics(), T_Document::magnifier_mode, Main, MC_Black, MC_Dark, MC_Light, MC_White, Menu_font, NB_BUTTONS, T_Fileselector::Nb_elements, T_Fileselector::Nb_files, NULL, Open_window(), T_Document::palette, Pixel_in_window(), T_Dropdown_button::Pos_X, T_Dropdown_button::Pos_Y, T_Toolbar_button::Pressed, T_Gui_skin::Preview, Print_in_window(), Print_in_window_limited(), Quit_is_required, RIGHT_SIDE, T_Config::Separate_colors, Set_color(), Set_current_skin(), Set_palette(), T_Fileselector_item::Short_name, T_Config::Skin_file, Skin_files_list, SKINS_SUBDIRECTORY, Sort_list_of_files(), Unselect_button(), Update_window_area, Verbose_message(), Window_attribute2, Window_clicked_button(), Window_display_frame_in(), Window_dropdown_add_item(), Window_height, Window_help(), Window_rectangle(), Window_redraw_list(), Window_set_dropdown_button(), Window_set_list_button(), Window_set_normal_button(), Window_set_scroller_button(), Window_set_special_button(), and Window_width.
void Button_Undo | ( | int | btn | ) |
Undo the last modification to the picture.
References BUTTON_MAGNIFIER, Check_menu_mode(), Compute_optimal_menu_colors(), Display_all_screen(), Display_cursor(), Display_menu(), Draw_menu_button(), Hide_cursor, T_Document::magnifier_mode, Main, T_Document::palette, Set_palette(), Undo(), and Unselect_button().
void Button_Redo | ( | int | btn | ) |
Redo the last modification to the picture.
References BUTTON_MAGNIFIER, Check_menu_mode(), Compute_optimal_menu_colors(), Display_all_screen(), Display_cursor(), Display_menu(), Draw_menu_button(), Hide_cursor, T_Document::magnifier_mode, Main, T_Document::palette, Redo(), Set_palette(), and Unselect_button().
void Button_Clear | ( | int | btn | ) |
Clear the whole screen with black (color index 0).
References Backup(), T_Document::backups, Clear_current_image(), Clear_current_image_with_stencil(), T_Config::Clear_with_stencil, Config, Display_all_screen(), Display_cursor(), End_of_modification(), Hide_cursor, Main, T_List_of_pages::Pages, Redraw_layered_image(), Stencil, Stencil_mode, T_Page::Transparent_color, and Unselect_button().
void Button_Clear_with_backcolor | ( | int | btn | ) |
Clear the screen with the selected backcolor.
References Back_color, Backup(), Clear_current_image(), Clear_current_image_with_stencil(), T_Config::Clear_with_stencil, Config, Display_all_screen(), Display_cursor(), End_of_modification(), Hide_cursor, Redraw_layered_image(), Stencil, Stencil_mode, and Unselect_button().
void Button_Quit | ( | int | btn | ) |
Quits the program.
Display a requester to save the changes to the picture before exiting if the pic was modified since last save.
References Button_Page(), BUTTON_PAGE, Button_Quit_local_function(), Display_cursor(), Hide_cursor, T_Document::image_is_modified, Menu_is_visible, Menu_Y, Mouse_Y, Quitting, Spare, and Unselect_button().
Referenced by Main_handler().
void Button_Hide_menu | ( | int | btn | ) |
Hides the menubar.
References Compute_limits(), Compute_magnifier_data(), Compute_paintbrush_coordinates(), Display_all_screen(), Display_cursor(), Display_menu(), T_Menu_Bar::Height, Hide_cursor, T_Document::image_height, T_Document::magnifier_mode, Main, Menu_bars, Menu_factor_Y, Menu_is_visible, Menu_Y, MENUBAR_COUNT, T_Document::offset_Y, Position_screen_according_to_zoom(), Screen_height, Spare, and Unselect_button().
void Button_Toggle_toolbar | ( | int | btn | ) |
Shows a dropdown panel where you can choose which toolbars are visible.
References T_Document::backups, T_Dropdown_button::Bottom_up, BUTTON_HIDE, Buttons_Pool, Config, T_Config::Default_mode_layers, Display_all_screen(), Display_cursor(), Display_menu(), Dropdown_activate(), T_Dropdown_button::Dropdown_width, T_Dropdown_button::First_item, T_Dropdown_button::Height, T_Toolbar_button::Height, Hide_cursor, T_Page::Image_mode, IMAGE_MODE_ANIMATION, IMAGE_MODE_LAYERED, Main, Menu_bars, Menu_factor_Y, Menu_Y, MENUBAR_ANIMATION, MENUBAR_LAYERS, MENUBAR_STATUS, MENUBAR_TOOLS, T_Page::Nb_layers, NULL, T_Dropdown_choice::Number, T_List_of_pages::Pages, T_Dropdown_button::Pos_X, T_Dropdown_button::Pos_Y, Set_bar_visibility(), Switch_layer_mode(), Unselect_button(), T_Menu_Bar::Visible, Window_dropdown_add_item(), Window_dropdown_clear_items(), T_Toolbar_button::X_offset, and T_Toolbar_button::Y_offset.
void Button_Toggle_all_toolbars | ( | int | btn | ) |
Hides all toolbars (except status) or shows them again.
References Check_menu_mode(), Display_all_screen(), Display_cursor(), Display_menu(), Hide_cursor, Menu_bars, MENUBAR_COUNT, MENUBAR_STATUS, Set_bar_visibility(), and Unselect_button().
void Load_picture | ( | enum CONTEXT_TYPE | type | ) |
Load picture from file.
References T_Config::Auto_discontinuous, T_Config::Auto_set_res, T_Document::backups, Best_video_mode(), Brush_file_directory, Brush_fileformat, Brush_filename, Brush_filename_unicode, Brush_height, Brush_offset_X, Brush_offset_Y, Brush_selector, Brush_width, BUTTON_DRAW, Button_Load_or_Save(), BUTTON_MAGNIFIER, Change_paintbrush_shape(), Check_menu_mode(), Compute_limits(), Compute_optimal_menu_colors(), Compute_paintbrush_coordinates(), Config, Confirmation_box(), CONTEXT_BRUSH, CONTEXT_MAIN_IMAGE, CONTEXT_PALETTE, Current_operation, Current_resolution, Cursor_shape, CURSOR_SHAPE_HOURGLASS, Destroy_context(), Display_all_screen(), Display_cursor(), Display_menu(), Draw_menu_button(), End_of_modification(), T_IO_Context::File_directory, T_Page::File_directory, File_error, T_IO_Context::File_name, T_IO_Context::File_name_unicode, T_Document::fileformat, T_Page::Filename, T_Page::Filename_unicode, T_IO_Context::Format, FORMAT_PAL, Get_fileformat(), Hide_cursor, T_Document::image_height, T_Document::image_is_modified, T_Document::image_width, Init_context_brush(), Init_context_layered_image(), Init_mode_video(), LEFT_SIDE, Load_image(), T_Document::magnifier_mode, Main, NULL, T_Document::offset_X, T_Document::offset_Y, OPERATION_DISCONTINUOUS_DRAW, Original_screen_X, Original_screen_Y, T_List_of_pages::Pages, PAINTBRUSH_SHAPE_COLOR_BRUSH, T_Document::palette, T_Format::Palette_only, Palette_selector, Pixel_preview, Pixel_preview_normal, Pixel_ratio, PIXEL_TALL, PIXEL_TALL2, PIXEL_TALL3, PIXEL_WIDE, PIXEL_WIDE2, Print_filename(), T_IO_Context::Ratio, Redraw_layered_image(), RIGHT_SIDE, Select_button(), T_Document::selector, Set_palette(), Tiling_offset_X, Tiling_offset_Y, T_IO_Context::Type, Unicode_strdup(), and Video_mode.
Referenced by Button_Brush_FX(), Button_Load(), Button_Palette(), and Main_handler().
void Save_picture | ( | enum CONTEXT_TYPE | type | ) |
Save picture to file.
References T_Config::Backup, Backup_existing_file(), T_Document::backups, Brush_file_directory, Brush_fileformat, Brush_filename, Brush_filename_unicode, Brush_selector, Button_Load_or_Save(), Config, Confirmation_box(), CONTEXT_BRUSH, CONTEXT_MAIN_IMAGE, CONTEXT_PALETTE, Cursor_shape, CURSOR_SHAPE_HOURGLASS, Destroy_context(), Display_cursor(), Error, T_IO_Context::File_directory, T_Page::File_directory, File_error, File_exists(), T_IO_Context::File_name, T_IO_Context::File_name_unicode, T_Document::fileformat, T_Page::Filename, T_Page::Filename_unicode, Filepath_append_to_dir(), T_IO_Context::Format, format, FORMAT_PAL, Get_fileformat(), Hide_cursor, T_Document::image_is_modified, Init_context_brush(), Init_context_layered_image(), Main, T_Page::Nb_layers, NULL, T_List_of_pages::Pages, T_Document::palette, Palette_selector, Print_filename(), Save_image(), T_Document::selector, Set_palette(), T_IO_Context::Type, and Unicode_strdup().
Referenced by Button_Brush_FX(), Button_Palette(), Button_Save(), and Main_handler().
void Menu_tag_colors | ( | char * | window_title, |
byte * | table, | ||
byte * | mode, | ||
byte | can_cancel, | ||
const char * | help_section, | ||
word | close_shortcut | ||
) |
Generic color tagging menu, for various effects.
References BUTTON_EFFECTS, BUTTON_HELP, Close_window(), Display_cursor(), Get_color_behind_window(), Hide_cursor, Is_shortcut(), Key, KEY_BACKQUOTE, KEY_c, KEY_COMMA, KEY_ESC, KEY_i, KEY_RETURN, LEFT_SIDE, MC_Black, MC_Light, mode, Mouse_K, Mouse_X, Mouse_Y, Open_window(), Read_pixel, Stencil_tag_color(), Stencil_update_color(), Update_window_area, Wait_end_of_click(), Window_attribute2, Window_clicked_button(), Window_height, Window_help(), Window_set_normal_button(), Window_set_palette_button(), and Window_width.
Referenced by Button_Mask_menu(), Button_Secondary_palette(), Button_Stencil_menu(), Copy_some_colors(), and Main_handler().
void Button_Smooth_menu | ( | void | ) |
Display the menu for the smooth effect.
References BUTTON_EFFECTS, BUTTON_HELP, Button_Smooth_mode(), Close_window(), Display_cursor(), Hide_cursor, INPUT_TYPE_INTEGER, Is_shortcut(), Key, KEY_ESC, KEY_NONE, KEY_RETURN, MC_Black, MC_Light, Num2str, Open_window(), Print_char_in_window(), Readline(), Smooth_default_matrices, Smooth_matrix, Smooth_mode, SPECIAL_SMOOTH_MENU, Update_window_area, Window_clicked_button(), Window_display_frame(), Window_height, Window_help(), Window_input_content(), Window_set_input_button(), Window_set_normal_button(), and Window_width.
Referenced by Button_Effects(), and Main_handler().
void Button_Smear_mode | ( | void | ) |
Toogles the smear mode.
References Colorize_mode, Effect_function, No_effect(), Quick_shade_mode, Shade_mode, Smear_mode, Smooth_mode, and Tiling_mode.
Referenced by Button_Effects(), and Main_handler().
void Button_Brush_container | ( | void | ) |
References BRUSH_CONTAINER_COLUMNS, BRUSH_CONTAINER_PREVIEW_HEIGHT, BRUSH_CONTAINER_PREVIEW_WIDTH, BRUSH_CONTAINER_ROWS, Close_window(), Display_cursor(), Display_stored_brush_in_window(), Hide_cursor, KEY_ESC, KEY_NONE, Open_window(), Restore_brush(), RIGHT_SIDE, Store_brush(), Update_window_area, Window_attribute1, Window_clicked_button(), Window_height, Window_set_normal_button(), and Window_width.
byte Store_paintbrush | ( | int | index | ) |
Store the current brush in paintbrush slot, if possible.
References Back_color, Brush, Brush_height, Brush_offset_X, Brush_offset_Y, Brush_width, T_Paintbrush::Height, MAX_PAINTBRUSH_SIZE, Min(), T_Paintbrush::Offset_X, T_Paintbrush::Offset_Y, Paintbrush, PAINTBRUSH_HEIGHT, Paintbrush_height, Paintbrush_offset_X, Paintbrush_offset_Y, Paintbrush_shape, PAINTBRUSH_SHAPE_COLOR_BRUSH, PAINTBRUSH_SHAPE_MISC, PAINTBRUSH_SHAPE_MONO_BRUSH, Paintbrush_sprite, PAINTBRUSH_WIDTH, Paintbrush_width, T_Paintbrush::Shape, and T_Paintbrush::Width.
Referenced by Button_Paintbrush_menu(), and Init_paintbrush().
void Select_paintbrush | ( | int | index | ) |
Retrieve a normal paintbrush.
References Change_paintbrush_shape(), T_Paintbrush::Height, MAX_PAINTBRUSH_SIZE, T_Paintbrush::Offset_X, T_Paintbrush::Offset_Y, Paintbrush, PAINTBRUSH_HEIGHT, Paintbrush_height, Paintbrush_offset_X, Paintbrush_offset_Y, Paintbrush_shape, Paintbrush_sprite, PAINTBRUSH_WIDTH, Paintbrush_width, Set_paintbrush_size(), T_Paintbrush::Shape, T_Paintbrush::Sprite, and T_Paintbrush::Width.
Referenced by Button_Paintbrush_menu().
byte Any_effect_active | ( | void | ) |
References T_Document::backups, Colorize_mode, T_Page::Image_mode, IMAGE_MODE_ANIMATION, Main, Mask_mode, T_List_of_pages::Pages, Quick_shade_mode, Shade_mode, Sieve_mode, Smear_mode, Smooth_mode, Snap_mode, Stencil_mode, T_Document::tilemap_mode, and Tiling_mode.
Referenced by Button_Effects(), Button_Page(), Button_Skins(), Main_handler(), and Set_image_mode().