GrafX2 2.9.3227
The ultimate 256-color painting program
|
Utility functions for the menu and all windows. More...
#include "struct.h"
Functions | |
void | Main_handler (void) |
Main handler for everything. This is the main loop of the program. More... | |
void | Draw_menu_button (byte btn_number, byte pressed) |
Draw a menu button, selected or not. More... | |
void | Unselect_button (int btn_number) |
Deselect a button. More... | |
void | Select_button (int btn_number, byte click) |
Select a button and disable all his family (for example, selecting "freehand" unselect "curves", "lines", ...) More... | |
void | Open_window (word width, word height, const char *title) |
Open a GUI window. More... | |
void | Close_window (void) |
Close a window previously open with Open_window() More... | |
void | Open_popup (word x_pos, word y_pos, word width, word height) |
Open a popup window. More... | |
void | Close_popup (void) |
void | Window_draw_normal_bouton (word x_pos, word y_pos, word width, word height, const char *title, byte undersc_letter, byte clickable) |
void | Window_select_normal_button (word x_pos, word y_pos, word width, word height) |
void | Window_unselect_normal_button (word x_pos, word y_pos, word width, word height) |
void | Window_draw_palette_bouton (word x_pos, word y_pos) |
void | Compute_slider_cursor_length (T_Scroller_button *button) |
void | Window_draw_slider (T_Scroller_button *button) |
void | Window_draw_scroller_button (T_Scroller_button *button) |
void | Window_input_content (T_Special_button *button, const char *content) |
void | Window_clear_input_button (T_Special_button *button) |
void | Window_draw_input_bouton (word x_pos, word y_pos, word width_in_characters) |
T_Normal_button * | Window_set_normal_button (word x_pos, word y_pos, word width, word height, const char *title, byte undersc_letter, byte clickable, word shortcut) |
T_Normal_button * | Window_set_repeatable_button (word x_pos, word y_pos, word width, word height, const char *title, byte undersc_letter, byte clickable, word shortcut) |
T_Palette_button * | Window_set_palette_button (word x_pos, word y_pos) |
void | Window_clear_tags (void) |
void | Tag_color_range (byte start, byte end) |
T_Scroller_button * | Window_set_scroller_button (word x_pos, word y_pos, word height, word nb_elements, word nb_elements_visible, word initial_position) |
T_Scroller_button * | Window_set_horizontal_scroller_button (word x_pos, word y_pos, word width, word nb_elements, word nb_elements_visible, word initial_position) |
T_Special_button * | Window_set_special_button (word x_pos, word y_pos, word width, word height, word shortcut) |
T_Special_button * | Window_set_input_button_s (word x_pos, word y_pos, word width_in_characters, word shortcut) |
T_Special_button * | Window_set_input_button (word x_pos, word y_pos, word width_in_characters) |
T_Dropdown_button * | Window_set_dropdown_button (word x_pos, word y_pos, word width, word height, word dropdown_width, const char *label, byte display_choice, byte display_centered, byte display_arrow, byte active_button, byte bottom_up) |
void | Window_dropdown_add_item (T_Dropdown_button *dropdown, word btn_number, const char *label) |
Adds an item to a dropdown menu. More... | |
void | Window_dropdown_clear_items (T_Dropdown_button *dropdown) |
T_Dropdown_choice * | Dropdown_activate (T_Dropdown_button *button, short off_x, short off_y) |
Displays a dropped-down menu and handles the UI logic until the user releases a mouse button. More... | |
T_List_button * | Window_set_list_button (T_Special_button *entry_button, T_Scroller_button *scroller, Func_draw_list_item draw_list_item, byte color_index) |
void | Window_redraw_list (T_List_button *list) |
byte | Window_click_in_rectangle (short start_x, short start_y, short end_x, short end_y) |
short | Wait_click_in_palette (T_Palette_button *button) |
short | Window_normal_button_onclick (word x_pos, word y_pos, word width, word height, short btn_number) |
void | Get_color_behind_window (byte *color, byte *click) |
short | Window_clicked_button (void) |
int | Button_under_mouse (void) |
Guess the number of the button that was just clicked. More... | |
short | Window_get_button_shortcut (void) |
short | Window_get_clicked_button (void) |
void | Remap_window_backgrounds (const byte *conversion_table, int Min_Y, int Max_Y) |
Remaps all the colors from the window background buffers from row Min_Y to row Max_Y. More... | |
void | Remap_UI_in_window_backgrounds (const byte *conversion_table) |
Remaps only UI elements (Windows + Menu) in all window background buffers. More... | |
void | Pixel_background (int x_pos, int y_pos, byte color) |
Draw a pixel in a saved screen block (when you sort colors in the palette, for example) More... | |
void | Status_print_palette_color (byte color) |
Updates the status bar line with a color number. More... | |
void | Delay_with_active_mouse (int delay) |
Puts the user in wait mode for the specified time ( in 1/100s), though the mouse still works. More... | |
void | Compute_menu_offsets (void) |
Based on which toolbars are visible, updates their offsets and computes Menu_height and Menu_Y. More... | |
void | Set_bar_visibility (word bar, int visible, int with_redraw) |
Shows or hides a tolbar from the menu. More... | |
int | Check_menu_mode (void) |
Checks if the current menu toolbars suit the current image type : layered vs anim. More... | |
Utility functions for the menu and all windows.
void Main_handler | ( | void | ) |
Main handler for everything. This is the main loop of the program.
References Allow_color_change_during_operation, Any_effect_active(), T_Config::Auto_discontinuous, Bigger_paintbrush(), Block, Brush, Brush_colormap, Brush_fileformat, Brush_filename, Brush_filename_unicode, Brush_height, Brush_offset_X, Brush_offset_Y, Brush_original_pixels, Brush_width, BUTTON_CHOOSE_COL, Button_Colorize_menu(), Button_Colorize_mode(), BUTTON_DRAW, BUTTON_EFFECTS, Button_Grid_menu(), BUTTON_LAYER_SELECT, Button_Mask_menu(), Button_Mask_mode(), Button_Quick_shade_menu(), Button_Quick_shade_mode(), Button_Quit(), BUTTON_QUIT, Button_Shade_menu(), Button_Shade_mode(), Button_Show_grid(), 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(), Button_under_mouse(), Buttons_Pool, Change_paintbrush_shape(), Check_menu_mode(), Compute_limits(), Compute_optimal_menu_colors(), Compute_paintbrush_coordinates(), Config, Confirmation_box(), CONTEXT_BRUSH, Current_operation, Cursor_hidden, Cursor_in_menu, Cursor_in_menu_previous, Cursor_shape, CURSOR_SHAPE_HOURGLASS, Cycling_mode, Default_window_height, Default_window_width, Destroy_context(), Display_all_screen(), Display_cursor(), T_Config::Display_image_limits, Display_image_limits(), Display_menu(), Draw_menu_button(), Drop_file_name, Drop_file_name_unicode, Effects_off(), End_of_modification(), Exclude_color, File_error, T_IO_Context::File_name_unicode, Find_last_separator(), Find_last_separator_unicode(), First_color_in_palette, Flip_X_lowlevel(), Flip_Y_lowlevel(), T_IO_Context::Format, FORMAT_CLIPBOARD, FORMAT_GIF, Get_colors_from_brush(), Get_input(), GFX2_WINDOW_STANDARD, Hide_cursor, T_Document::image_is_modified, Init_context_brush(), Init_context_layered_image(), Init_mode_video(), Invert_trame(), Is_shortcut(), Key, Layer_activate(), Layer_preview_off(), Layer_preview_on(), LEFT_SIDE, Load_image(), Load_picture(), T_Document::magnifier_height, T_Document::magnifier_mode, T_Document::magnifier_width, Main, MC_Light, Menu_factor_X, Menu_factor_Y, Menu_is_visible, Menu_status_Y, Menu_tag_colors(), Menu_Y, Mouse_K, Mouse_K_unique, Mouse_X, Mouse_Y, Move_separator(), NB_BUTTONS, NB_SPECIAL_SHORTCUTS, Nibble_brush(), NULL, Old_MX, Old_MY, Operation, OPERATION_COLORPICK, OPERATION_CONTINUOUS_DRAW, OPERATION_DISCONTINUOUS_DRAW, OPERATION_DISTORT_BRUSH, OPERATION_PAN_VIEW, OPERATION_REPLACE, OPERATION_ROTATE_BRUSH, Operation_stack_size, OPERATION_STRETCH_BRUSH, Outline_brush(), Paintbrush_shape, PAINTBRUSH_SHAPE_COLOR_BRUSH, PAINTBRUSH_SHAPE_MONO_BRUSH, PAINTBRUSH_SHAPE_ROUND, T_Document::palette, Pan_shortcut_pressed, Pick_color_in_palette(), Pixel_ratio, Print_in_menu(), Quit_is_required, Quitting, Redraw_layered_image(), Remap_brush(), Remap_general_lowlevel(), Repeat_script(), Reposition_palette(), Resize_height, Resize_width, RIGHT_SIDE, Rotate_180_deg_lowlevel(), Rotate_90_deg(), Run_numbered_script(), Save_image(), Save_picture(), Screen_height, Screen_width, Scroll_magnifier(), Scroll_screen(), Select_button(), T_Document::separator_position, Set_paintbrush_size(), Set_palette(), SHORTCUT_COPY, SHORTCUT_PASTE, Smaller_paintbrush(), SPECIAL_BIGGER_PAINTBRUSH, SPECIAL_BOTTOM_LEFT_ATTACHMENT, SPECIAL_BOTTOM_RIGHT_ATTACHMENT, SPECIAL_BRUSH_DOUBLE, SPECIAL_BRUSH_DOUBLE_HEIGHT, SPECIAL_BRUSH_DOUBLE_WIDTH, SPECIAL_BRUSH_HALVE, SPECIAL_CENTER_ATTACHMENT, SPECIAL_CLICK_RIGHT, SPECIAL_COLORIZE_MENU, SPECIAL_COLORIZE_MODE, SPECIAL_CONTINUOUS_DRAW, SPECIAL_CYCLE_MODE, SPECIAL_DISTORT, SPECIAL_DOT_PAINTBRUSH, SPECIAL_EFFECTS_OFF, SPECIAL_EXCLUDE_COLORS_MENU, SPECIAL_FLIP_X, SPECIAL_FLIP_Y, SPECIAL_GET_BRUSH_COLORS, SPECIAL_GRID_MENU, SPECIAL_GRID_MODE, SPECIAL_HOLD_PAN, SPECIAL_INVERT_SIEVE, SPECIAL_LAYER1_SELECT, SPECIAL_LAYER1_TOGGLE, SPECIAL_LAYER2_SELECT, SPECIAL_LAYER2_TOGGLE, SPECIAL_LAYER3_SELECT, SPECIAL_LAYER3_TOGGLE, SPECIAL_LAYER4_SELECT, SPECIAL_LAYER4_TOGGLE, SPECIAL_LAYER5_SELECT, SPECIAL_LAYER5_TOGGLE, SPECIAL_LAYER6_SELECT, SPECIAL_LAYER6_TOGGLE, SPECIAL_LAYER7_SELECT, SPECIAL_LAYER7_TOGGLE, SPECIAL_LAYER8_SELECT, SPECIAL_LAYER8_TOGGLE, SPECIAL_LOAD_BRUSH, SPECIAL_MASK_MENU, SPECIAL_MASK_MODE, SPECIAL_NEXT_BACKCOLOR, Special_next_backcolor(), SPECIAL_NEXT_FORECOLOR, Special_next_forecolor(), SPECIAL_NEXT_USER_BACKCOLOR, Special_next_user_backcolor(), SPECIAL_NEXT_USER_FORECOLOR, Special_next_user_forecolor(), SPECIAL_NIBBLE, SPECIAL_OUTLINE, SPECIAL_PREVIOUS_BACKCOLOR, Special_previous_backcolor(), SPECIAL_PREVIOUS_FORECOLOR, Special_previous_forecolor(), SPECIAL_PREVIOUS_USER_BACKCOLOR, Special_previous_user_backcolor(), SPECIAL_PREVIOUS_USER_FORECOLOR, Special_previous_user_forecolor(), SPECIAL_QUICK_SHADE_MENU, SPECIAL_QUICK_SHADE_MODE, SPECIAL_RECOLORIZE_BRUSH, SPECIAL_REPEAT_SCRIPT, SPECIAL_ROTATE_180, SPECIAL_ROTATE_90, SPECIAL_ROTATE_ANY_ANGLE, SPECIAL_RUN_SCRIPT_1, SPECIAL_RUN_SCRIPT_10, SPECIAL_RUN_SCRIPT_2, SPECIAL_RUN_SCRIPT_3, SPECIAL_RUN_SCRIPT_4, SPECIAL_RUN_SCRIPT_5, SPECIAL_RUN_SCRIPT_6, SPECIAL_RUN_SCRIPT_7, SPECIAL_RUN_SCRIPT_8, SPECIAL_RUN_SCRIPT_9, SPECIAL_SAVE_BRUSH, SPECIAL_SCROLL_DOWN, SPECIAL_SCROLL_DOWN_FAST, SPECIAL_SCROLL_DOWN_SLOW, SPECIAL_SCROLL_LEFT, SPECIAL_SCROLL_LEFT_FAST, SPECIAL_SCROLL_LEFT_SLOW, SPECIAL_SCROLL_RIGHT, SPECIAL_SCROLL_RIGHT_FAST, SPECIAL_SCROLL_RIGHT_SLOW, SPECIAL_SCROLL_UP, SPECIAL_SCROLL_UP_FAST, SPECIAL_SCROLL_UP_SLOW, SPECIAL_SHADE_MENU, SPECIAL_SHADE_MODE, SPECIAL_SHOW_GRID, SPECIAL_SHOW_HIDE_CURSOR, SPECIAL_SIEVE_MENU, SPECIAL_SIEVE_MODE, SPECIAL_SMALLER_PAINTBRUSH, SPECIAL_SMEAR_MODE, SPECIAL_SMOOTH_MENU, SPECIAL_SMOOTH_MODE, SPECIAL_STENCIL_MENU, SPECIAL_STENCIL_MODE, SPECIAL_STRETCH, SPECIAL_TILEMAP_MENU, SPECIAL_TILEMAP_MODE, SPECIAL_TILING_MENU, SPECIAL_TILING_MODE, SPECIAL_TOP_LEFT_ATTACHMENT, SPECIAL_TOP_RIGHT_ATTACHMENT, SPECIAL_TRANSPARENCY_0, SPECIAL_TRANSPARENCY_1, SPECIAL_TRANSPARENCY_2, SPECIAL_TRANSPARENCY_3, SPECIAL_TRANSPARENCY_4, SPECIAL_TRANSPARENCY_5, SPECIAL_TRANSPARENCY_6, SPECIAL_TRANSPARENCY_7, SPECIAL_TRANSPARENCY_8, SPECIAL_TRANSPARENCY_9, SPECIAL_ZOOM_1, SPECIAL_ZOOM_10, SPECIAL_ZOOM_12, SPECIAL_ZOOM_14, SPECIAL_ZOOM_16, SPECIAL_ZOOM_18, SPECIAL_ZOOM_2, SPECIAL_ZOOM_20, SPECIAL_ZOOM_3, SPECIAL_ZOOM_4, SPECIAL_ZOOM_5, SPECIAL_ZOOM_6, SPECIAL_ZOOM_8, SPECIAL_ZOOM_IN, SPECIAL_ZOOM_IN_MORE, SPECIAL_ZOOM_OUT, SPECIAL_ZOOM_OUT_MORE, Start_operation_stack(), Status_print_palette_color(), Stretch_brush(), Tiling_offset_X, Tiling_offset_Y, Transparency_set(), Unicode_strdup(), Update_rect(), Upload_infos_page(), Window_state, T_Document::X_zoom, Zoom(), and Zoom_set().
Referenced by main().
Draw a menu button, selected or not.
References BUTTON_PAINTBRUSHES, BUTTON_SHAPE_NO_FRAME, BUTTON_SHAPE_RECTANGLE, BUTTON_SHAPE_TRIANGLE_BOTTOM_RIGHT, BUTTON_SHAPE_TRIANGLE_TOP_LEFT, Buttons_Pool, Gfx, T_Toolbar_button::Height, T_Toolbar_button::Icon, icon, MAX_PAINTBRUSH_SIZE, MC_Black, Menu_bars, Menu_factor_X, Menu_factor_Y, Menu_is_visible, T_Gui_skin::Menu_sprite, MENU_SPRITE_WIDTH, Menu_Y, MENUBAR_COUNT, MENUBAR_TOOLS, Paintbrush_height, Paintbrush_offset_X, Paintbrush_offset_Y, Paintbrush_shape, PAINTBRUSH_SHAPE_COLOR_BRUSH, PAINTBRUSH_SHAPE_MONO_BRUSH, Paintbrush_sprite, Paintbrush_width, Pixel_in_menu_and_skin(), T_Menu_Bar::Skin, T_Menu_Bar::Skin_width, Update_rect(), T_Toolbar_button::Width, T_Toolbar_button::X_offset, and T_Toolbar_button::Y_offset.
Referenced by Button_Circle_switch_mode(), Button_Curves_switch_mode(), Button_Draw_switch_mode(), Button_Kill(), Button_Lines_switch_mode(), Button_Page(), Button_Redo(), Button_Reload(), Button_Secondary_palette(), Button_Skins(), Button_Text(), Button_Undo(), Display_paintbrush_in_menu(), Init_program(), Load_picture(), Main_handler(), Select_button(), Set_image_mode(), and Unselect_button().
void Unselect_button | ( | int | btn_number | ) |
Deselect a button.
References BUTTON_RELEASED, Buttons_Pool, Draw_menu_button(), NB_BUTTONS, T_Toolbar_button::Pressed, and T_Toolbar_button::Unselect_action.
Referenced by Button_Anim_continuous_next(), Button_Anim_continuous_prev(), Button_Anim_first_frame(), Button_Anim_last_frame(), Button_Anim_next_frame(), Button_Anim_prev_frame(), Button_Anim_time(), Button_Autosave(), Button_Brush(), Button_Brush_FX(), Button_Brush_monochrome(), Button_Clear(), Button_Clear_with_backcolor(), Button_Colorpicker(), Button_Copy_page(), Button_Effects(), Button_Gradients(), Button_Hide_menu(), Button_Invert_foreback(), Button_Kill(), Button_Lasso(), Button_Layer_add(), Button_Layer_down(), Button_Layer_duplicate(), Button_Layer_get_transparent(), Button_Layer_menu(), Button_Layer_merge(), Button_Layer_remove(), Button_Layer_set_transparent(), Button_Layer_up(), Button_Load_or_Save(), Button_Magnify(), Button_Magnify_menu(), Button_Page(), Button_Paintbrush_menu(), Button_Pal_left(), Button_Pal_left_fast(), Button_Pal_right(), Button_Pal_right_fast(), Button_Palette(), Button_Quit(), Button_Redo(), Button_Reload(), Button_Resolution(), Button_Restore_brush(), Button_Safety_resolution(), Button_Secondary_palette(), Button_Settings(), Button_Skins(), Button_Stats(), Button_Text(), Button_Toggle_all_toolbars(), Button_Toggle_toolbar(), Button_Transform_menu(), Button_Undo(), Colorpicker_0_1(), Select_button(), Window_help(), and Zoom_set().
void Select_button | ( | int | btn_number, |
byte | click | ||
) |
Select a button and disable all his family (for example, selecting "freehand" unselect "curves", "lines", ...)
References BUTTON_ADJUST, BUTTON_FLOODFILL, BUTTON_GRADRECT, BUTTON_MAGNIFIER, BUTTON_POLYFILL, BUTTON_POLYGONS, BUTTON_PRESSED, BUTTON_RELEASED, BUTTON_SHAPE_TRIANGLE_BOTTOM_RIGHT, BUTTON_SHAPE_TRIANGLE_TOP_LEFT, Buttons_Pool, Display_cursor(), Display_sprite_in_menu(), Draw_menu_button(), T_Toolbar_button::Family, FAMILY_INTERRUPTION, FAMILY_TOOLBAR, Hide_cursor, icon, T_Toolbar_button::Left_action, T_Document::magnifier_mode, Main, MENU_SPRITE_POLYFORM, MENU_SPRITE_REPLACE, NB_BUTTONS, T_Toolbar_button::Pressed, T_Toolbar_button::Right_action, RIGHT_SIDE, Unselect_button(), and Wait_end_of_click().
Referenced by Button_Airbrush_menu(), Button_Magnify_menu(), Button_Palette(), Button_Text(), Init_program(), Load_picture(), Main_handler(), Return_to_draw_mode(), and Zoom_set().
Open a GUI window.
width | window width (max 320) |
height | window height (max 200) |
title | window title |
The mouse must be shown before calling this function. The mouse is hidden when the function returns.
The function Close_window() must be called afterward.
References Allow_colorcycling, Allow_drag_and_drop(), Cursor_shape, CURSOR_SHAPE_ARROW, Cursor_shape_before_window, GFX2_Log(), GFX2_WARNING, Hide_cursor, Main, MC_Black, MC_Dark, MC_White, MC_Window, Menu_factor_X, Menu_factor_Y, Menu_is_visible, Menu_is_visible_before_window, Menu_Y, Menu_Y_before_window, NULL, Paintbrush_hidden, Paintbrush_hidden_before_window, T_Document::palette, Print_in_window_limited(), Save_background(), Screen_height, Screen_width, Set_palette(), Window_background, Window_display_frame_mono(), Window_display_frame_out(), Window_draggable, Window_dropdown_button_list, Window_height, Window_nb_buttons, Window_normal_button_list, Window_palette_button_list, Window_pos_X, Window_pos_Y, Window_rectangle(), Window_scroller_button_list, Window_special_button_list, Window_width, and Windows_open.
Referenced by Button_Airbrush_menu(), Button_Anim_time(), Button_Brush_container(), Button_Brush_FX(), Button_Colorize_menu(), Button_Constraint_menu(), Button_Copy_page(), Button_Effects(), Button_Gradients(), Button_Grid_menu(), Button_Layer_menu(), Button_Load_or_Save(), Button_Message_initial(), Button_Paintbrush_menu(), Button_Palette(), Button_Quick_shade_menu(), Button_Quit_local_function(), Button_Resolution(), Button_Secondary_palette(), Button_Settings(), Button_Sieve_menu(), Button_Skins(), Button_Smooth_menu(), Button_Stats(), Button_Text(), Button_Tilemap_menu(), Button_Tiling_menu(), Button_Transform_menu(), Confirmation_box(), Dialog_multiple_choice(), Load_SCR(), Menu_shade(), Menu_tag_colors(), Message_out_of_memory(), Requester_window(), Save_C64_window(), Save_image(), Save_MOTO_window(), Tilemap_update(), Verbose_message(), Warning_message(), Window_help(), Window_Histogram(), and Window_set_shortcut().
void Close_window | ( | void | ) |
Close a window previously open with Open_window()
The mouse must be shown when this functions is called. It is hidden when the function returns.
References Allow_colorcycling, Allow_drag_and_drop(), Check_menu_mode(), Compute_paintbrush_coordinates(), Cursor_shape, Cursor_shape_before_window, Display_all_screen(), Display_menu(), Hide_cursor, Key, Menu_is_visible, Menu_is_visible_before_window, Menu_Y, Menu_Y_before_window, Mouse_K, NULL, Old_MX, Old_MY, Paintbrush_hidden, Paintbrush_hidden_before_window, Restore_background(), Update_window_area, Window_background, Window_dropdown_button_list, Window_dropdown_clear_items(), Window_height, Window_list_button_list, Window_normal_button_list, Window_palette_button_list, Window_pos_X, Window_pos_Y, Window_scroller_button_list, Window_special_button_list, Window_width, and Windows_open.
Referenced by Button_Airbrush_menu(), Button_Anim_time(), Button_Brush_container(), Button_Brush_FX(), Button_Colorize_menu(), Button_Constraint_menu(), Button_Copy_page(), Button_Effects(), Button_Gradients(), Button_Grid_menu(), Button_Layer_menu(), Button_Load_or_Save(), Button_Message_initial(), Button_Paintbrush_menu(), Button_Palette(), Button_Quick_shade_menu(), Button_Quit_local_function(), Button_Resolution(), Button_Secondary_palette(), Button_Settings(), Button_Sieve_menu(), Button_Skins(), Button_Smooth_menu(), Button_Stats(), Button_Text(), Button_Tilemap_menu(), Button_Tiling_menu(), Button_Transform_menu(), Confirmation_box(), Dialog_multiple_choice(), Load_SCR(), Menu_shade(), Menu_tag_colors(), Message_out_of_memory(), Requester_window(), Save_C64_window(), Save_image(), Save_MOTO_window(), Tilemap_update(), Verbose_message(), Warning_message(), Window_help(), Window_Histogram(), and Window_set_shortcut().
Open a popup window.
x_pos | left position |
y_pos | top position |
width | width of the popup (max 320) |
height | height of the popup (max 200) |
The mouse cursor must be shown when calling this function. When the function returns it is hidden.
Popup windows are managed as sub-windows. They have their own event loop, widget can be added inside, etc. The differences with plain windows are almost only graphical :
References Cursor_shape, CURSOR_SHAPE_ARROW, Cursor_shape_before_window, Menu_factor_X, Menu_factor_Y, Menu_is_visible, Menu_is_visible_before_window, Menu_Y, Menu_Y_before_window, NULL, Paintbrush_hidden, Paintbrush_hidden_before_window, Save_background(), Screen_height, Screen_width, Window_background, Window_draggable, Window_dropdown_button_list, Window_height, Window_nb_buttons, Window_normal_button_list, Window_palette_button_list, Window_pos_X, Window_pos_Y, Window_scroller_button_list, Window_special_button_list, Window_width, and Windows_open.
Referenced by Dropdown_activate(), Init_virtual_keyboard(), and Layer_preview_on().
void Close_popup | ( | void | ) |
References Compute_paintbrush_coordinates(), Cursor_shape, Cursor_shape_before_window, Display_all_screen(), Display_menu(), Hide_cursor, Key, Menu_is_visible, Menu_is_visible_before_window, Menu_Y, Menu_Y_before_window, Mouse_K, NULL, Old_MX, Old_MY, Paintbrush_hidden, Paintbrush_hidden_before_window, Restore_background(), Update_window_area, Window_background, Window_dropdown_button_list, Window_dropdown_clear_items(), Window_height, Window_list_button_list, Window_normal_button_list, Window_palette_button_list, Window_pos_X, Window_pos_Y, Window_scroller_button_list, Window_special_button_list, Window_width, and Windows_open.
Referenced by Dropdown_activate(), Layer_preview_off(), and Readline_ex_unicode().
void Window_draw_normal_bouton | ( | word | x_pos, |
word | y_pos, | ||
word | width, | ||
word | height, | ||
const char * | title, | ||
byte | undersc_letter, | ||
byte | clickable | ||
) |
References MC_Black, MC_Dark, MC_Light, Print_in_window(), Window_display_frame_generic(), Window_display_frame_mono(), Window_display_frame_out(), and Window_rectangle().
Referenced by Button_Palette(), Button_Resolution(), Window_set_dropdown_button(), Window_set_normal_button(), and Window_set_repeatable_button().
References MC_Black, MC_Dark, Update_window_area, and Window_display_frame_generic().
Referenced by Display_effect_state(), Window_dropdown_on_click(), Window_get_button_shortcut(), Window_get_clicked_button(), and Window_normal_button_onclick().
References Update_window_area, and Window_display_frame_out().
Referenced by Display_effect_state(), Window_dropdown_on_click(), Window_get_button_shortcut(), Window_get_clicked_button(), and Window_normal_button_onclick().
References Window_display_frame(), and Window_rectangle().
Referenced by Button_Palette(), and Window_set_palette_button().
void Compute_slider_cursor_length | ( | T_Scroller_button * | button | ) |
References T_Scroller_button::Cursor_length, T_Scroller_button::Length, T_Scroller_button::Nb_elements, and T_Scroller_button::Nb_visibles.
Referenced by Prepare_and_display_filelist(), Scroll_help(), Set_palette_slider(), Window_help(), Window_set_horizontal_scroller_button(), and Window_set_scroller_button().
void Window_draw_slider | ( | T_Scroller_button * | button | ) |
References T_Scroller_button::Cursor_length, T_Scroller_button::Is_horizontal, T_Scroller_button::Length, MC_Black, MC_OnBlack, T_Scroller_button::Nb_elements, T_Scroller_button::Nb_visibles, T_Scroller_button::Pos_X, T_Scroller_button::Pos_Y, T_Scroller_button::Position, Update_window_area, and Window_rectangle().
Referenced by Button_Gradients(), Button_Palette(), Button_Secondary_palette(), Button_Settings(), Draw_all_palette_sliders(), Prepare_and_display_filelist(), Quicksearch_list(), Refresh_airbrush_settings(), Scroll_fileselector(), Scroll_help(), Scroll_list_of_modes(), Set_palette_slider(), Window_clicked_button(), Window_draw_scroller_button(), Window_get_clicked_button(), and Window_help().
void Window_draw_scroller_button | ( | T_Scroller_button * | button | ) |
References T_Scroller_button::Is_horizontal, T_Scroller_button::Length, MC_Black, MC_Dark, MC_Light, T_Scroller_button::Pos_X, T_Scroller_button::Pos_Y, Print_in_window(), Window_display_frame_generic(), Window_display_frame_mono(), Window_display_frame_out(), and Window_draw_slider().
Referenced by Window_set_horizontal_scroller_button(), and Window_set_scroller_button().
void Window_input_content | ( | T_Special_button * | button, |
const char * | content | ||
) |
References MC_Black, MC_Light, T_Special_button::Pos_X, T_Special_button::Pos_Y, Print_in_window_limited(), and T_Special_button::Width.
Referenced by Button_Airbrush_menu(), Button_Colorize_menu(), Button_Grid_menu(), Button_Quick_shade_menu(), Button_Resolution(), Button_Smooth_menu(), Button_Text(), Button_Tiling_menu(), Load_SCR(), and Menu_shade().
void Window_clear_input_button | ( | T_Special_button * | button | ) |
References Window_display_frame_in().
Referenced by Window_set_input_button_s().
T_Normal_button * Window_set_normal_button | ( | word | x_pos, |
word | y_pos, | ||
word | width, | ||
word | height, | ||
const char * | title, | ||
byte | undersc_letter, | ||
byte | clickable, | ||
word | shortcut | ||
) |
References T_Normal_button::Clickable, T_Normal_button::Height, T_Normal_button::Next, NULL, T_Normal_button::Number, T_Normal_button::Pos_X, T_Normal_button::Pos_Y, T_Normal_button::Repeatable, T_Normal_button::Shortcut, T_Normal_button::Width, Window_draw_normal_bouton(), Window_nb_buttons, and Window_normal_button_list.
Referenced by Button_Airbrush_menu(), Button_Anim_time(), Button_Brush_container(), Button_Brush_FX(), Button_Colorize_menu(), Button_Constraint_menu(), Button_Copy_page(), Button_Effects(), Button_Gradients(), Button_Grid_menu(), Button_Layer_menu(), Button_Load_or_Save(), Button_Message_initial(), Button_Paintbrush_menu(), Button_Palette(), Button_Quick_shade_menu(), Button_Quit_local_function(), Button_Resolution(), Button_Secondary_palette(), Button_Settings(), Button_Sieve_menu(), Button_Skins(), Button_Smooth_menu(), Button_Stats(), Button_Text(), Button_Tilemap_menu(), Button_Tiling_menu(), Button_Transform_menu(), Confirmation_box(), Dialog_multiple_choice(), Load_SCR(), Menu_shade(), Menu_tag_colors(), Message_out_of_memory(), Readline_ex_unicode(), Requester_window(), Save_C64_window(), Save_image(), Save_MOTO_window(), Verbose_message(), Warning_message(), Window_help(), Window_Histogram(), and Window_set_shortcut().
T_Normal_button * Window_set_repeatable_button | ( | word | x_pos, |
word | y_pos, | ||
word | width, | ||
word | height, | ||
const char * | title, | ||
byte | undersc_letter, | ||
byte | clickable, | ||
word | shortcut | ||
) |
References T_Normal_button::Height, T_Normal_button::Next, NULL, T_Normal_button::Number, T_Normal_button::Pos_X, T_Normal_button::Pos_Y, T_Normal_button::Repeatable, T_Normal_button::Shortcut, T_Normal_button::Width, Window_draw_normal_bouton(), Window_nb_buttons, and Window_normal_button_list.
Referenced by Button_Palette(), Button_Sieve_menu(), and Button_Text().
T_Palette_button * Window_set_palette_button | ( | word | x_pos, |
word | y_pos | ||
) |
References T_Palette_button::Next, T_Palette_button::Number, T_Palette_button::Pos_X, T_Palette_button::Pos_Y, Window_draw_palette_bouton(), Window_nb_buttons, and Window_palette_button_list.
Referenced by Button_Airbrush_menu(), Button_Gradients(), Button_Palette(), Menu_shade(), and Menu_tag_colors().
void Window_clear_tags | ( | void | ) |
References MC_Light, Update_window_area, Window_palette_button_list, and Window_rectangle().
Referenced by Button_Airbrush_menu().
References MC_Black, MC_Light, Pixel_in_window(), Update_window_area, Window_palette_button_list, and Window_rectangle().
Referenced by Button_Palette(), Menu_shade(), and Tag_color_gradient_range().
T_Scroller_button * Window_set_scroller_button | ( | word | x_pos, |
word | y_pos, | ||
word | height, | ||
word | nb_elements, | ||
word | nb_elements_visible, | ||
word | initial_position | ||
) |
References Compute_slider_cursor_length(), T_Scroller_button::Is_horizontal, T_Scroller_button::Length, T_Scroller_button::Nb_elements, T_Scroller_button::Nb_visibles, T_Scroller_button::Next, T_Scroller_button::Number, T_Scroller_button::Pos_X, T_Scroller_button::Pos_Y, T_Scroller_button::Position, Window_draw_scroller_button(), Window_nb_buttons, and Window_scroller_button_list.
Referenced by Button_Airbrush_menu(), Button_Gradients(), Button_Load_or_Save(), Button_Palette(), Button_Resolution(), Button_Secondary_palette(), Button_Settings(), Button_Skins(), Button_Text(), Menu_shade(), and Window_help().
T_Scroller_button * Window_set_horizontal_scroller_button | ( | word | x_pos, |
word | y_pos, | ||
word | width, | ||
word | nb_elements, | ||
word | nb_elements_visible, | ||
word | initial_position | ||
) |
References Compute_slider_cursor_length(), T_Scroller_button::Is_horizontal, T_Scroller_button::Length, T_Scroller_button::Nb_elements, T_Scroller_button::Nb_visibles, T_Scroller_button::Next, T_Scroller_button::Number, T_Scroller_button::Pos_X, T_Scroller_button::Pos_Y, T_Scroller_button::Position, Window_draw_scroller_button(), Window_nb_buttons, and Window_scroller_button_list.
Referenced by Button_Gradients(), and Button_Secondary_palette().
T_Special_button * Window_set_special_button | ( | word | x_pos, |
word | y_pos, | ||
word | width, | ||
word | height, | ||
word | shortcut | ||
) |
References T_Special_button::Height, T_Special_button::Next, T_Special_button::Number, T_Special_button::Pos_X, T_Special_button::Pos_Y, T_Special_button::Shortcut, T_Special_button::Width, Window_nb_buttons, and Window_special_button_list.
Referenced by Button_Load_or_Save(), Button_Resolution(), Button_Settings(), Button_Sieve_menu(), Button_Skins(), Button_Text(), Menu_shade(), Window_help(), Window_Histogram(), and Window_set_input_button_s().
T_Special_button * Window_set_input_button_s | ( | word | x_pos, |
word | y_pos, | ||
word | width_in_characters, | ||
word | shortcut | ||
) |
References Window_draw_input_bouton(), and Window_set_special_button().
Referenced by Button_Airbrush_menu(), Button_Resolution(), Button_Text(), Button_Transform_menu(), and Window_set_input_button().
T_Special_button * Window_set_input_button | ( | word | x_pos, |
word | y_pos, | ||
word | width_in_characters | ||
) |
T_Dropdown_button * Window_set_dropdown_button | ( | word | x_pos, |
word | y_pos, | ||
word | width, | ||
word | height, | ||
word | dropdown_width, | ||
const char * | label, | ||
byte | display_choice, | ||
byte | display_centered, | ||
byte | display_arrow, | ||
byte | active_button, | ||
byte | bottom_up | ||
) |
References T_Dropdown_button::Active_button, T_Dropdown_button::Bottom_up, T_Dropdown_button::Display_arrow, T_Dropdown_button::Display_centered, T_Dropdown_button::Display_choice, T_Dropdown_button::Dropdown_width, T_Dropdown_button::First_item, T_Dropdown_button::Height, ICON_DROPDOWN, label, MC_Black, MC_Light, T_Dropdown_button::Next, NULL, T_Dropdown_button::Number, T_Dropdown_button::Pos_X, T_Dropdown_button::Pos_Y, Print_in_window(), T_Dropdown_button::Width, Window_display_icon_sprite(), Window_draw_normal_bouton(), Window_dropdown_button_list, and Window_nb_buttons.
Referenced by Button_Constraint_menu(), Button_Load_or_Save(), Button_Paintbrush_menu(), Button_Palette(), Button_Resolution(), Button_Skins(), Button_Transform_menu(), Dialog_multiple_choice(), Load_SCR(), Save_C64_window(), and Save_MOTO_window().
void Window_dropdown_add_item | ( | T_Dropdown_button * | dropdown, |
word | btn_number, | ||
const char * | label | ||
) |
Adds an item to a dropdown menu.
References T_Dropdown_button::First_item, label, T_Dropdown_choice::Label, T_Dropdown_choice::Next, NULL, and T_Dropdown_choice::Number.
Referenced by Button_Circle_switch_mode(), Button_Constraint_menu(), Button_Draw_switch_mode(), Button_Load_or_Save(), Button_Magnify_menu(), Button_Paintbrush_menu(), Button_Palette(), Button_Resolution(), Button_Skins(), Button_Toggle_toolbar(), Button_Transform_menu(), Dialog_multiple_choice(), Display_bookmark(), Load_SCR(), Save_C64_window(), and Save_MOTO_window().
void Window_dropdown_clear_items | ( | T_Dropdown_button * | dropdown | ) |
T_Dropdown_choice * Dropdown_activate | ( | T_Dropdown_button * | button, |
short | off_x, | ||
short | off_y | ||
) |
Displays a dropped-down menu and handles the UI logic until the user releases a mouse button.
This function then clears the dropdown and returns the selected item, or NULL if the user wasn't highlighting an item when he closed.
References T_Dropdown_button::Bottom_up, Close_popup(), Display_cursor(), T_Dropdown_button::Dropdown_width, T_Dropdown_button::First_item, Get_input(), GFX2_DEBUG, GFX2_Log(), T_Dropdown_button::Height, Hide_cursor, T_Dropdown_choice::Label, MC_Black, MC_Dark, MC_Light, MC_White, Menu_factor_X, Menu_factor_Y, Mouse_K, Mouse_X, Mouse_Y, T_Dropdown_choice::Next, NULL, Open_popup(), T_Dropdown_button::Pos_X, T_Dropdown_button::Pos_Y, Print_in_window(), Screen_height, SHADOW_BOTTOM, SHADOW_RIGHT, Update_window_area, Window_click_in_rectangle(), Window_display_frame_out(), Window_height, Window_pos_X, Window_pos_Y, Window_rectangle(), and Window_width.
Referenced by Button_Circle_switch_mode(), Button_Draw_switch_mode(), Button_Magnify_menu(), Button_Palette(), Button_Toggle_toolbar(), and Window_dropdown_on_click().
T_List_button * Window_set_list_button | ( | T_Special_button * | entry_button, |
T_Scroller_button * | scroller, | ||
Func_draw_list_item | draw_list_item, | ||
byte | color_index | ||
) |
References T_List_button::Color_index, T_List_button::Cursor_position, T_List_button::Draw_list_item, T_List_button::Entry_button, T_List_button::List_start, T_List_button::Next, T_List_button::Number, T_List_button::Scroller, Window_list_button_list, and Window_nb_buttons.
Referenced by Button_Skins(), and Button_Text().
void Window_redraw_list | ( | T_List_button * | list | ) |
References T_List_button::Color_index, T_List_button::Cursor_position, T_List_button::Draw_list_item, T_List_button::Entry_button, T_List_button::List_start, MC_Black, MC_Dark, MC_Light, MC_White, Min(), T_Scroller_button::Nb_elements, T_Scroller_button::Nb_visibles, T_Special_button::Pos_X, T_Special_button::Pos_Y, T_List_button::Scroller, T_Special_button::Width, and Window_rectangle().
Referenced by Button_Skins(), Button_Text(), Quicksearch_list(), and Window_clicked_button().
byte Window_click_in_rectangle | ( | short | start_x, |
short | start_y, | ||
short | end_x, | ||
short | end_y | ||
) |
References Menu_factor_X, Menu_factor_Y, Mouse_X, Mouse_Y, Window_pos_X, and Window_pos_Y.
Referenced by Dropdown_activate(), Wait_click_in_palette(), Wait_click_in_shade_table(), Window_get_clicked_button(), Window_Histogram(), and Window_normal_button_onclick().
short Wait_click_in_palette | ( | T_Palette_button * | button | ) |
References Cursor_hidden, Cursor_shape, CURSOR_SHAPE_ARROW, CURSOR_SHAPE_TARGET, Display_cursor(), Get_input(), Hide_cursor, Key, KEY_ESC, LEFT_SIDE, T_Document::magnifier_mode, Main, Menu_factor_X, Menu_factor_Y, Mouse_K, Mouse_X, Mouse_Y, T_Palette_button::Pos_X, T_Palette_button::Pos_Y, Read_pixel, RIGHT_SIDE, Window_click_in_rectangle(), Window_height, Window_pos_X, Window_pos_Y, and Window_width.
Referenced by Button_Palette().
short Window_normal_button_onclick | ( | word | x_pos, |
word | y_pos, | ||
word | width, | ||
word | height, | ||
short | btn_number | ||
) |
References Display_cursor(), Get_input(), Hide_cursor, Mouse_K, Window_click_in_rectangle(), Window_select_normal_button(), and Window_unselect_normal_button().
Referenced by Button_Settings(), and Window_get_clicked_button().
References BUTTON_CHOOSE_COL, Buttons_Pool, Cursor_hidden, Cursor_shape, CURSOR_SHAPE_ARROW, CURSOR_SHAPE_COLORPICKER, Display_all_screen(), Display_cursor(), Display_menu(), Get_input(), Hide_cursor, Key, KEY_ESC, Main, Menu_factor_X, Menu_is_visible, Menu_is_visible_before_window, Menu_status_Y, Menu_Y, Menu_Y_before_window, Mouse_K, Mouse_X, Mouse_Y, NULL, Paintbrush_hidden, T_Document::palette, Print_general(), Print_in_menu(), Read_pixel, Restore_background(), Save_background(), Update_window_area, Window_height, Window_pos_X, Window_pos_Y, and Window_width.
Referenced by Button_Airbrush_menu(), Button_Gradients(), Button_Layer_menu(), Button_Palette(), Menu_shade(), and Menu_tag_colors().
short Window_clicked_button | ( | void | ) |
References Config, T_List_button::Cursor_position, Display_cursor(), T_Config::Double_click_speed, T_List_button::Draw_list_item, T_List_button::Entry_button, Get_input(), GFX2_GetTicks(), Hide_cursor, Input_sticky_control, Key, KEY_DOWN, KEY_END, KEY_HOME, KEY_MOUSEWHEELDOWN, KEY_MOUSEWHEELUP, KEY_PAGEDOWN, KEY_PAGEUP, KEY_UP, T_List_button::List_start, Menu_factor_X, Menu_factor_Y, Mouse_K, Mouse_X, Mouse_Y, Move_window(), T_Scroller_button::Nb_elements, T_Scroller_button::Nb_visibles, T_List_button::Next, NULL, T_Scroller_button::Number, T_Special_button::Number, T_List_button::Number, T_Special_button::Pos_X, T_Special_button::Pos_Y, T_Scroller_button::Position, T_List_button::Scroller, Window_attribute2, Window_draggable, Window_draw_slider(), Window_get_button_shortcut(), Window_get_clicked_button(), Window_height, Window_list_button_list, Window_pos_X, Window_pos_Y, Window_redraw_list(), and Window_width.
Referenced by Button_Airbrush_menu(), Button_Anim_time(), Button_Brush_container(), Button_Brush_FX(), Button_Colorize_menu(), Button_Constraint_menu(), Button_Copy_page(), Button_Effects(), Button_Gradients(), Button_Grid_menu(), Button_Layer_menu(), Button_Load_or_Save(), Button_Paintbrush_menu(), Button_Palette(), Button_Quick_shade_menu(), Button_Quit_local_function(), Button_Resolution(), Button_Secondary_palette(), Button_Settings(), Button_Sieve_menu(), Button_Skins(), Button_Smooth_menu(), Button_Stats(), Button_Text(), Button_Tilemap_menu(), Button_Tiling_menu(), Button_Transform_menu(), Confirmation_box(), Dialog_multiple_choice(), Load_SCR(), Menu_shade(), Menu_tag_colors(), Message_out_of_memory(), Readline_ex_unicode(), Requester_window(), Save_C64_window(), Save_image(), Save_MOTO_window(), Verbose_message(), Warning_message(), Window_help(), Window_Histogram(), and Window_set_shortcut().
int Button_under_mouse | ( | void | ) |
Guess the number of the button that was just clicked.
References BUTTON_SHAPE_NO_FRAME, BUTTON_SHAPE_RECTANGLE, BUTTON_SHAPE_TRIANGLE_BOTTOM_RIGHT, BUTTON_SHAPE_TRIANGLE_TOP_LEFT, Buttons_Pool, T_Toolbar_button::Height, T_Menu_Bar::Last_button_index, Menu_bars, Menu_factor_X, Menu_factor_Y, Menu_Y, MENUBAR_COUNT, Mouse_X, Mouse_Y, and T_Toolbar_button::Y_offset.
Referenced by Button_Help(), Button_Select_backcolor(), Button_Select_forecolor(), and Main_handler().
short Window_get_button_shortcut | ( | void | ) |
References Config, T_Config::Delay_right_click_on_slider, Delay_with_active_mouse(), Display_cursor(), GFX2_MOD_SHIFT, T_Normal_button::Height, Hide_cursor, Key, LEFT_SIDE, T_Normal_button::Next, T_Special_button::Next, T_List_button::Next, NULL, T_Normal_button::Number, T_Special_button::Number, T_Normal_button::Pos_X, T_Normal_button::Pos_Y, RIGHT_SIDE, T_Normal_button::Shortcut, T_Special_button::Shortcut, T_Normal_button::Width, Window_attribute1, Window_list_button_list, Window_normal_button_list, Window_select_normal_button(), Window_special_button_list, and Window_unselect_normal_button().
Referenced by Button_Message_initial(), and Window_clicked_button().
short Window_get_clicked_button | ( | void | ) |
References T_Dropdown_button::Active_button, Config, T_Scroller_button::Cursor_length, T_Config::Delay_left_click_on_slider, T_Config::Delay_right_click_on_slider, Delay_with_active_mouse(), Display_cursor(), T_Normal_button::Height, T_Special_button::Height, T_Dropdown_button::Height, Hide_cursor, Input_sticky_control, T_Scroller_button::Is_horizontal, T_Scroller_button::Length, Menu_factor_X, Menu_factor_Y, Mouse_K, Mouse_X, Mouse_Y, T_Scroller_button::Nb_elements, T_Scroller_button::Nb_visibles, T_Normal_button::Next, T_Palette_button::Next, T_Scroller_button::Next, T_Special_button::Next, T_Dropdown_button::Next, T_Normal_button::Number, T_Palette_button::Number, T_Scroller_button::Number, T_Special_button::Number, T_Dropdown_button::Number, T_Normal_button::Pos_X, T_Palette_button::Pos_X, T_Scroller_button::Pos_X, T_Special_button::Pos_X, T_Dropdown_button::Pos_X, T_Normal_button::Pos_Y, T_Palette_button::Pos_Y, T_Scroller_button::Pos_Y, T_Special_button::Pos_Y, T_Dropdown_button::Pos_Y, T_Scroller_button::Position, T_Normal_button::Repeatable, T_Normal_button::Width, T_Special_button::Width, T_Dropdown_button::Width, Window_attribute1, Window_attribute2, Window_click_in_rectangle(), Window_draw_slider(), Window_dropdown_button_list, Window_dropdown_on_click(), Window_normal_button_list, Window_normal_button_onclick(), Window_palette_button_list, Window_pos_X, Window_pos_Y, Window_scroller_button_list, Window_select_normal_button(), Window_special_button_list, and Window_unselect_normal_button().
Referenced by Button_Effects(), Button_Message_initial(), and Window_clicked_button().
void Remap_window_backgrounds | ( | const byte * | conversion_table, |
int | Min_Y, | ||
int | Max_Y | ||
) |
Remaps all the colors from the window background buffers from row Min_Y to row Max_Y.
References T_Window::Height, Max_Y, Menu_factor_X, Menu_factor_Y, Min_Y, Pixel_width, T_Window::Width, Window_background, Window_stack, and Windows_open.
Referenced by Remap_image_highlevel().
void Remap_UI_in_window_backgrounds | ( | const byte * | conversion_table | ) |
Remaps only UI elements (Windows + Menu) in all window background buffers.
References T_Window::Height, Menu_factor_X, Menu_factor_Y, Menu_is_visible_before_window, Menu_Y_before_window, Pixel_width, T_Window::Pos_X, T_Window::Pos_Y, Screen_width, T_Window::Width, Window_background, Window_stack, and Windows_open.
Referenced by Remap_screen_after_menu_colors_change().
void Pixel_background | ( | int | x_pos, |
int | y_pos, | ||
byte | color | ||
) |
Draw a pixel in a saved screen block (when you sort colors in the palette, for example)
References Menu_factor_X, Pixel_width, Window_background, and Window_width.
Referenced by Display_menu_palette_avoiding_window().
void Status_print_palette_color | ( | byte | color | ) |
Updates the status bar line with a color number.
Used when hovering the menu palette.
References BUTTON_CHOOSE_COL, Buttons_Pool, Encode_component(), Main, T_Document::palette, and Print_in_menu().
Referenced by Button_Select_backcolor(), Button_Select_forecolor(), and Main_handler().
void Delay_with_active_mouse | ( | int | delay | ) |
Puts the user in wait mode for the specified time ( in 1/100s), though the mouse still works.
References Get_input(), GFX2_GetTicks(), and Mouse_K.
Referenced by Error_function(), Window_get_button_shortcut(), and Window_get_clicked_button().
void Compute_menu_offsets | ( | void | ) |
Based on which toolbars are visible, updates their offsets and computes Menu_height and Menu_Y.
References T_Menu_Bar::Height, Menu_bars, Menu_factor_Y, Menu_height, Menu_Y, MENUBAR_COUNT, Screen_height, and T_Menu_Bar::Top.
Referenced by Init_program(), and Set_bar_visibility().
void Set_bar_visibility | ( | word | bar, |
int | visible, | ||
int | with_redraw | ||
) |
Shows or hides a tolbar from the menu.
If with_redraw is set to zero, the caller should redraw itself using Display_menu() and Display_all_screen().
References Compute_limits(), Compute_magnifier_data(), Compute_menu_offsets(), Compute_paintbrush_coordinates(), Display_all_screen(), Display_menu(), T_Document::image_height, T_Document::magnifier_mode, Main, Menu_bars, T_Document::offset_Y, Position_screen_according_to_zoom(), Screen_height, Spare, and T_Menu_Bar::Visible.
Referenced by Button_Toggle_all_toolbars(), Button_Toggle_toolbar(), and Check_menu_mode().
int Check_menu_mode | ( | void | ) |
Checks if the current menu toolbars suit the current image type : layered vs anim.
If they don't fit, swap the toolbars and return 1: The caller is then responsible for refreshing the screen by calling Display_menu() and Display_all_screen()
References T_Document::backups, T_Page::Image_mode, IMAGE_MODE_ANIMATION, Main, Menu_bars, MENUBAR_ANIMATION, MENUBAR_LAYERS, T_List_of_pages::Pages, and Set_bar_visibility().
Referenced by Button_Constraint_menu(), Button_Message_initial(), Button_Page(), Button_Redo(), Button_Reload(), Button_Toggle_all_toolbars(), Button_Undo(), Close_window(), Init_program(), Load_picture(), and Main_handler().