GrafX2 2.9.3227
The ultimate 256-color painting program
|
#include <fcntl.h>
#include <stdio.h>
#include <string.h>
#include <strings.h>
#include <stdlib.h>
#include <unistd.h>
#include <ctype.h>
#include <sys/stat.h>
#include "const.h"
#include "struct.h"
#include "global.h"
#include "misc.h"
#include "osdep.h"
#include "graph.h"
#include "engine.h"
#include "readline.h"
#include "filesel.h"
#include "fileseltools.h"
#include "loadsave.h"
#include "init.h"
#include "buttons.h"
#include "operatio.h"
#include "pages.h"
#include "palette.h"
#include "errors.h"
#include "readini.h"
#include "saveini.h"
#include "shade.h"
#include "io.h"
#include "help.h"
#include "text.h"
#include "screen.h"
#include "windows.h"
#include "brush.h"
#include "input.h"
#include "special.h"
#include "tiles.h"
#include "setup.h"
#include "unicode.h"
#include "keycodes.h"
#include <dirent.h>
Data Structures | |
struct | T_Lookup |
struct | T_Setting |
Macros | |
#define | SETTING_PER_PAGE 11 |
#define | SETTING_PAGES 5 |
#define | SETTING_HEIGHT 12 |
#define | FILESEL_Y 34 |
#define | MODELIST_LINES 10 |
Number of video modes to display in the resolution menu. More... | |
#define | TOLERANCE_X 8 |
#define | TOLERANCE_Y 4 |
#define | C1 10 |
#define | C2 99 |
#define | C3 184 |
#define | L1 19 |
#define | L2 38 |
#define | L3 57 |
#define | L4 76 |
#define | L5 95 |
Functions | |
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_Undo (int btn) |
Undo the last modification to the picture. More... | |
void | Button_Redo (int btn) |
Redo the last modification to the picture. More... | |
void | Button_Pal_left (int btn) |
Callback for the palette scroller buttons left click. More... | |
void | Button_Pal_left_fast (int btn) |
Callback for the palette scroller buttons right click. More... | |
void | Button_Pal_right (int btn) |
Callback for the palette scroller buttons left click. More... | |
void | Button_Pal_right_fast (int btn) |
Callback for the palette scroller buttons right click. More... | |
void | Button_Select_forecolor (int btn) |
Callback for the palette color buttons left click. More... | |
void | Button_Select_backcolor (int btn) |
Callback for the palette color buttons right click. More... | |
void | Button_Hide_menu (int btn) |
Hides the menubar. More... | |
void | Button_Toggle_toolbar (int btn) |
Shows a dropdown panel where you can choose which toolbars are visible. More... | |
void | Button_Toggle_all_toolbars (int btn) |
Hides all toolbars (except status) or shows them again. More... | |
byte | Button_Quit_local_function (void) |
void | Button_Quit (int btn) |
Quits the program. More... | |
void | Button_Clear (int btn) |
Clear the whole screen with black (color index 0). More... | |
void | Button_Clear_with_backcolor (int btn) |
Clear the screen with the selected backcolor. More... | |
long int | Get_setting_value (const T_Setting *item) |
void | Set_setting_value (const T_Setting *item, long int value) |
const char * | Lookup_code (int code, const T_Lookup *lookup) |
int | Lookup_next (int code, const T_Lookup *lookup) |
Increase an enum to next-higher value (wrapping). More... | |
int | Lookup_previous (int code, const T_Lookup *lookup) |
Decrease an enum to previous value (wrapping). More... | |
void | Settings_display_config (const T_Setting *setting, T_Config *conf, T_Special_button *panel) |
void | Settings_save_config (T_Config *conf) |
void | Settings_load_config (T_Config *conf) |
void | Button_Settings (int btn) |
Display the setting menu. More... | |
char * | Format_font_filename (const char *fname) |
static void | Add_font_or_skin (const char *full_name, const char *fname) |
void | Draw_one_skin_name (word x, word y, word index, byte highlighted) |
void | Button_Skins (int btn) |
Skin selector window. More... | |
void | Button_Page (int btn) |
Swap main and spare drawing pages. More... | |
void | Copy_image_only (void) |
Copy only pixel data from main page to spare page (no palette copy). More... | |
void | Copy_some_colors (void) |
void | Button_Copy_page (int btn) |
Copy main page to spare page. More... | |
void | Button_Kill (int btn) |
Kill (free from memory) the current page. More... | |
void | Check_mode_button (short x_pos, short y_pos, byte state) |
void | Display_modes_list (short list_start, short cursor_position) |
void | Scroll_list_of_modes (short list_start, short cursor_position, int *selected_mode) |
void | Button_Resolution (int btn) |
Display the screenmode menu. More... | |
void | Button_Safety_resolution (int btn) |
Set the screen to the "safe resolution" (320x200 pixel window). More... | |
void | Button_Draw (int btn) |
Callback for the freehand draw button left click. More... | |
void | Button_Draw_switch_mode (int btn) |
Callback for the freehand draw button right click. More... | |
void | Button_Empty_rectangle (int btn) |
Callback for the empty rectangle button. More... | |
void | Button_Filled_rectangle (int btn) |
Callback for the filled 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 btn) |
Callback for the cicle button right click. More... | |
void | Draw_button_gradient_style (short x_pos, short y_pos, int technique) |
void | Load_gradient_data (int index) |
Gets the informations from the gradations table and set the global vars for the current gradation. More... | |
static void | Draw_gradient_preview (short start_x, short start_y, short width, short height, int index) |
draw the gradient preview for the Gradation menu More... | |
static void | Tag_color_gradient_range (const T_Gradient_range *range) |
Tag colors from a gradient range. More... | |
static void | Print_color_cycling_details (short y_pos) |
Print the Color cycling speed in Hz, ms and in DP2E unit. More... | |
void | Button_Gradients (int btn) |
Callback for the gradation button. More... | |
void | Button_Grad_rectangle (int btn) |
Callback for the gradation rectangle button. More... | |
void | Button_Fill (int btn) |
Callback for the fill button left click. More... | |
void | Button_Replace (int btn) |
Callback for the fill button right click. More... | |
void | Button_Unselect_fill (int btn) |
Disable and release the fill button. More... | |
byte | Same_paintbrush (byte index) |
Checks if the current brush is identical to a preset one. More... | |
void | Button_Paintbrush_menu (int btn) |
Callback for the brush button right click. More... | |
void | Button_Brush_monochrome (int btn) |
Callback for the brush button left click. More... | |
static int | Best_video_mode (void) |
void | Load_picture (enum CONTEXT_TYPE type) |
Load picture from file. More... | |
void | Button_Load (int btn) |
Opens the load file dialog. More... | |
void | Button_Reload (int btn) |
Reload current picture from disk. More... | |
static void | Backup_existing_file (const char *filename) |
void | Save_picture (enum CONTEXT_TYPE type) |
Save picture to file. More... | |
void | Button_Save (int btn) |
Open the save file dialog. More... | |
void | Button_Autosave (int btn) |
Save main image over existing file (no fileselector) More... | |
void | Button_Lines (int btn) |
Callback for the lines button left click. More... | |
void | Button_Lines_switch_mode (int btn) |
Callback for the lines button right click. More... | |
void | Button_Brush (int btn) |
Callback for the brush button left click. More... | |
void | Button_Unselect_brush (int btn) |
Disables the custom brush and set back a regular one. More... | |
void | Button_Restore_brush (int btn) |
Callback for the brush button right click. More... | |
void | Button_Lasso (int btn) |
Callback for the freehand brush pick button left click. More... | |
void | Button_Unselect_lasso (int btn) |
Disables the custom freehand brush and set back a regular one. More... | |
void | Button_Colorpicker (int btn) |
Starts the color picking operation. More... | |
void | Button_Unselect_colorpicker (int btn) |
Disables the color picker button and get back to the previously selected drawing mode. More... | |
void | Button_Invert_foreback (int btn) |
Swap fore- and background colors. More... | |
void | Button_Magnify (int btn) |
Enters magnify mode. More... | |
void | Button_Magnify_menu (int btn) |
Displays magnify menu. More... | |
void | Button_Unselect_magnifier (int btn) |
Exit magnify mode. More... | |
void | Button_Brush_FX (int btn) |
Display the Brush effects window. More... | |
void | Button_Curves (int btn) |
Callback for the curves button left click. More... | |
void | Button_Curves_switch_mode (int btn) |
Callback for the curves button right click. More... | |
void | Button_Airbrush (int btn) |
Callback for the spray button left click. More... | |
void | Refresh_airbrush_settings (byte selected_color, byte update_slider) |
void | Button_Airbrush_menu (int btn) |
Callback for the spray button right click. More... | |
void | Button_polygon (int btn) |
Callback for the polyline button left click. More... | |
void | Button_Polyform (int btn) |
Callback for the polyline right click. More... | |
void | Button_Polyfill (int btn) |
Callback for the polyfill button left click. More... | |
void | Button_Filled_polyform (int btn) |
Callback for the polyfill button right click. More... | |
void | Button_Adjust (int btn) |
Callback for the adjust picture button. More... | |
void | Display_effect_sprite (int sprite_number, short start_x, short start_y) |
void | Display_effect_state (short x, short y, char *label, byte state) |
void | Display_effect_states (void) |
void | Display_feedback_state (void) |
void | Button_Effects (int btn) |
Callback for the effects button click. More... | |
void | Draw_one_font_name (word x, word y, word index, byte highlighted) |
void | Button_Text (int btn) |
Callback for the text button. More... | |
void | Display_stored_brush_in_window (word x_pos, word y_pos, int index) |
void | Store_brush (int index) |
Store the current brush in brush container. More... | |
void | Select_paintbrush (int index) |
Retrieve a normal paintbrush. More... | |
byte | Store_paintbrush (int index) |
Store the current brush in paintbrush slot, if possible. More... | |
byte | Restore_brush (int index) |
void | Button_Brush_container (void) |
byte | Any_effect_active (void) |
Variables | |
char | Program_version [] |
short | Old_MX |
short | Old_MY |
const T_Lookup | Lookup_YesNo [] |
const T_Lookup | Lookup_FFF [] |
const T_Lookup | Lookup_AutoRes [] |
const T_Lookup | Lookup_Coords [] |
const T_Lookup | Lookup_MenuRatio [] |
const T_Lookup | Lookup_MouseSpeed [] |
const T_Lookup | Lookup_SwapButtons [] |
const T_Lookup | Lookup_VirtualKeyboard [] |
T_Fileselector | Skin_files_list |
T_Fileselector | Font_files_list |
byte | Coming_from_zoom_factor_menu =0 |
#define SETTING_PER_PAGE 11 |
#define SETTING_PAGES 5 |
#define SETTING_HEIGHT 12 |
#define FILESEL_Y 34 |
#define MODELIST_LINES 10 |
Number of video modes to display in the resolution menu.
#define TOLERANCE_X 8 |
#define TOLERANCE_Y 4 |
#define C1 10 |
#define C2 99 |
#define C3 184 |
#define L1 19 |
#define L2 38 |
#define L3 57 |
#define L4 76 |
#define L5 95 |
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_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_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_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().
byte Button_Quit_local_function | ( | void | ) |
References T_Document::backups, BUTTON_HELP, BUTTON_QUIT, Close_window(), Confirmation_box(), Cursor_shape, CURSOR_SHAPE_HOURGLASS, Destroy_context(), Display_cursor(), 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(), Is_shortcut(), Key, KEY_d, KEY_ESC, KEY_s, Main, NULL, Open_window(), T_List_of_pages::Pages, Quit_is_required, Save_image(), Update_window_area, Window_clicked_button(), Window_height, Window_help(), Window_set_normal_button(), and Window_width.
Referenced by Button_Quit().
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_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().
long int Get_setting_value | ( | const T_Setting * | item | ) |
References T_Setting::Type, and T_Setting::Value.
Referenced by Button_Settings(), and Settings_display_config().
void Set_setting_value | ( | const T_Setting * | item, |
long int | value | ||
) |
References T_Setting::Type, and T_Setting::Value.
Referenced by Button_Settings().
const char * Lookup_code | ( | int | code, |
const T_Lookup * | lookup | ||
) |
References T_Lookup::Label, and NULL.
Referenced by Settings_display_config().
int Lookup_next | ( | int | code, |
const T_Lookup * | lookup | ||
) |
Increase an enum to next-higher value (wrapping).
References T_Lookup::Code, T_Lookup::Label, and NULL.
Referenced by Button_Settings().
int Lookup_previous | ( | int | code, |
const T_Lookup * | lookup | ||
) |
Decrease an enum to previous value (wrapping).
References T_Lookup::Label, and NULL.
Referenced by Button_Settings().
void Settings_display_config | ( | const T_Setting * | setting, |
T_Config * | conf, | ||
T_Special_button * | panel | ||
) |
References T_Config::Auto_save, Get_setting_value(), T_Special_button::Height, T_Setting::Label, Lookup_code(), MC_Black, MC_Dark, MC_Light, MC_White, Num2str, T_Special_button::Pos_X, T_Special_button::Pos_Y, Print_in_window(), SETTING_HEIGHT, SETTING_PER_PAGE, Update_window_area, T_Special_button::Width, and Window_rectangle().
Referenced by Button_Settings().
void Settings_save_config | ( | T_Config * | conf | ) |
References Error, Save_CFG(), and Save_INI().
Referenced by Button_Settings().
void Settings_load_config | ( | T_Config * | conf | ) |
References Error, Load_CFG(), and Load_INI().
Referenced by Button_Settings().
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.
char * Format_font_filename | ( | const char * | fname | ) |
References ELLIPSIS_CHARACTER, and FONT_PREFIX.
Referenced by Add_font_or_skin().
|
static |
References Add_element_to_list(), Font_files_list, FONT_PREFIX, Format_filename(), Format_font_filename(), FSOBJECT_FILE, ICON_NONE, Skin_files_list, and SKIN_PREFIX.
Referenced by Button_Skins().
References Get_item_by_index(), MC_Black, MC_Dark, MC_Light, T_Fileselector::Nb_elements, Print_in_window(), T_Fileselector_item::Short_name, and Skin_files_list.
Referenced by Button_Skins().
void Button_Skins | ( | int | btn | ) |
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_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 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 Copy_some_colors | ( | void | ) |
References Backup_the_spare(), LAYER_NONE, Main, Menu_tag_colors(), NULL, T_Document::palette, and Spare.
Referenced by Button_Copy_page().
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 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 Check_mode_button | ( | short | x_pos, |
short | y_pos, | ||
byte | state | ||
) |
References MC_Black, MC_Dark, MC_Light, MC_White, Update_window_area, and Window_rectangle().
Referenced by Button_Resolution(), and Display_modes_list().
void Display_modes_list | ( | short | list_start, |
short | cursor_position | ||
) |
References Check_mode_button(), MC_Black, MC_Dark, MC_Light, MC_White, MODELIST_LINES, Nb_video_modes, Print_in_window(), and Video_mode.
Referenced by Button_Resolution(), and Scroll_list_of_modes().
void Scroll_list_of_modes | ( | short | list_start, |
short | cursor_position, | ||
int * | selected_mode | ||
) |
References Display_cursor(), Display_modes_list(), Hide_cursor, Window_draw_slider(), and Window_scroller_button_list.
Referenced by Button_Resolution().
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_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_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_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 Draw_button_gradient_style | ( | short | x_pos, |
short | y_pos, | ||
int | technique | ||
) |
References MC_Black, MC_White, Pixel_in_window(), Update_window_area, and Window_rectangle().
Referenced by Button_Gradients().
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().
|
static |
draw the gradient preview for the Gradation menu
References Gradient_function, Gradient_total_range, Load_gradient_data(), Menu_factor_X, Menu_factor_Y, Update_rect(), Window_pos_X, and Window_pos_Y.
Referenced by Button_Gradients().
|
static |
Tag colors from a gradient range.
References T_Gradient_range::End, T_Gradient_range::Start, and Tag_color_range().
Referenced by Button_Gradients().
|
static |
Print the Color cycling speed in Hz, ms and in DP2E unit.
References T_Document::backups, Current_gradient, T_Page::Gradients, Main, MC_Black, MC_Light, Num2str, T_List_of_pages::Pages, Print_in_window(), T_Gradient_array::Range, and T_Gradient_range::Speed.
Referenced by Button_Gradients().
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 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_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.
Checks if the current brush is identical to a preset one.
References MAX_PAINTBRUSH_SIZE, Paintbrush, Paintbrush_height, Paintbrush_shape, PAINTBRUSH_SHAPE_MISC, Paintbrush_sprite, and Paintbrush_width.
Referenced by Button_Paintbrush_menu().
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_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().
|
static |
References Config, Current_resolution, GFX2_DEBUG, GFX2_Log(), T_Video_mode::Height, T_Document::image_height, T_Document::image_width, Main, mode, Nb_video_modes, Original_screen_X, Original_screen_Y, T_Config::Set_resolution_according_to, TOLERANCE_X, TOLERANCE_Y, Video_mode, and T_Video_mode::Width.
Referenced by Button_Reload(), and Load_picture().
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 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.
|
static |
References File_error, File_exists(), Find_last_separator(), NULL, Position_last_dot(), and Remove_path().
Referenced by Button_Autosave(), and Save_picture().
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 Button_Save | ( | int | btn | ) |
Open the save file dialog.
References CONTEXT_MAIN_IMAGE, and Save_picture().
void Button_Autosave | ( | int | btn | ) |
Save main image over existing file (no fileselector)
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_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_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_Unselect_brush | ( | int | btn | ) |
Disables the custom brush and set back a regular one.
References Operation_before_interrupt, and Start_operation_stack().
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_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_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_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().
References Airbrush_multi_flow, MC_Black, MC_Light, Num2str, Print_in_window(), Update_window_area, Window_draw_slider(), Window_palette_button_list, and Window_scroller_button_list.
Referenced by Button_Airbrush_menu().
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_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 Display_effect_sprite | ( | int | sprite_number, |
short | start_x, | ||
short | start_y | ||
) |
References T_Gui_skin::Effect_sprite, EFFECT_SPRITE_HEIGHT, EFFECT_SPRITE_WIDTH, Gfx, Menu_factor_X, Menu_factor_Y, Pixel_in_window(), ToWinX, ToWinY, and Update_rect().
Referenced by Button_Effects().
void Display_effect_state | ( | short | x, |
short | y, | ||
char * | label, | ||
byte | state | ||
) |
References label, MC_Black, MC_Light, MC_White, Print_in_window(), Window_rectangle(), Window_select_normal_button(), and Window_unselect_normal_button().
Referenced by Button_Effects(), and Display_effect_states().
void Display_effect_states | ( | void | ) |
References T_Document::backups, C1, C2, C3, Colorize_mode, Display_effect_state(), T_Page::Image_mode, IMAGE_MODE_ANIMATION, L1, L2, L3, L4, L5, 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().
void Display_feedback_state | ( | void | ) |
References Config, T_Config::FX_Feedback, MC_Black, MC_Light, and Print_in_window().
Referenced by Button_Effects().
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.
References Font_label(), MC_Black, MC_Dark, MC_Light, and Print_in_window().
Referenced by Button_Text().
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.
References Brush_container, BRUSH_CONTAINER_PREVIEW_HEIGHT, BRUSH_CONTAINER_PREVIEW_WIDTH, T_Brush_template::Colormap, T_Brush_template::Height, MC_Black, MC_Light, Paintbrush_shape, PAINTBRUSH_SHAPE_MAX, PAINTBRUSH_SHAPE_MISC, Pixel_in_window(), T_Brush_template::Thumbnail, Update_window_area, T_Brush_template::Width, and Window_rectangle().
Referenced by Button_Brush_container(), and Button_Paintbrush_menu().
void Store_brush | ( | int | index | ) |
Store the current brush in brush container.
References Back_color, Brush, T_Brush_template::Brush, Brush_colormap, Brush_container, BRUSH_CONTAINER_PREVIEW_HEIGHT, BRUSH_CONTAINER_PREVIEW_WIDTH, Brush_height, Brush_original_palette, Brush_original_pixels, Brush_width, Copy_part_of_image_to_another(), Error, T_Brush_template::Height, MAX_PAINTBRUSH_SIZE, NULL, Paintbrush_height, Paintbrush_shape, T_Brush_template::Paintbrush_shape, PAINTBRUSH_SHAPE_COLOR_BRUSH, PAINTBRUSH_SHAPE_MAX, PAINTBRUSH_SHAPE_MISC, PAINTBRUSH_SHAPE_MONO_BRUSH, Paintbrush_sprite, Paintbrush_width, Rescale(), T_Brush_template::Transp_color, and T_Brush_template::Width.
Referenced by Button_Brush_container(), and Button_Paintbrush_menu().
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 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().
byte Restore_brush | ( | int | index | ) |
References Brush, Brush_colormap, Brush_container, BRUSH_CONTAINER_PREVIEW_HEIGHT, BRUSH_CONTAINER_PREVIEW_WIDTH, Brush_height, Brush_offset_X, Brush_offset_Y, Brush_original_palette, Brush_original_pixels, Brush_width, Change_paintbrush_shape(), T_Brush_template::Height, MAX_PAINTBRUSH_SIZE, NULL, Paintbrush_height, Paintbrush_offset_X, Paintbrush_offset_Y, Paintbrush_shape, T_Brush_template::Paintbrush_shape, PAINTBRUSH_SHAPE_COLOR_BRUSH, PAINTBRUSH_SHAPE_HORIZONTAL_BAR, PAINTBRUSH_SHAPE_MAX, PAINTBRUSH_SHAPE_MISC, PAINTBRUSH_SHAPE_MONO_BRUSH, PAINTBRUSH_SHAPE_VERTICAL_BAR, Paintbrush_sprite, Paintbrush_width, Realloc_brush(), Remap_general_lowlevel(), Set_paintbrush_size(), T_Brush_template::Thumbnail, and T_Brush_template::Width.
Referenced by Button_Brush_container(), and Button_Paintbrush_menu().
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 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().
|
extern |
Referenced by Button_Message_initial().
|
extern |
Referenced by Button_Unselect_magnifier(), Close_popup(), Close_window(), and Main_handler().
|
extern |
Referenced by Button_Unselect_magnifier(), Close_popup(), Close_window(), and Main_handler().
const T_Lookup Lookup_YesNo[] |
Referenced by Button_Settings().
const T_Lookup Lookup_FFF[] |
Referenced by Button_Settings().
const T_Lookup Lookup_AutoRes[] |
Referenced by Button_Settings().
const T_Lookup Lookup_Coords[] |
Referenced by Button_Settings().
const T_Lookup Lookup_MenuRatio[] |
Referenced by Button_Settings().
const T_Lookup Lookup_MouseSpeed[] |
const T_Lookup Lookup_SwapButtons[] |
Referenced by Button_Settings().
const T_Lookup Lookup_VirtualKeyboard[] |
Referenced by Button_Settings().
T_Fileselector Skin_files_list |
Referenced by Add_font_or_skin(), Button_Skins(), and Draw_one_skin_name().
T_Fileselector Font_files_list |
Referenced by Add_font_or_skin(), and Button_Skins().
byte Coming_from_zoom_factor_menu =0 |
Referenced by Button_Magnify(), and Button_Magnify_menu().