Freeciv-3.3
|
#include <limits.h>
#include <gtk/gtk.h>
#include <gdk/gdkkeysyms.h>
#include "bitvector.h"
#include "fc_cmdline.h"
#include "fcintl.h"
#include "log.h"
#include "mem.h"
#include "fc_interface.h"
#include "game.h"
#include "government.h"
#include "map.h"
#include "movement.h"
#include "nation.h"
#include "research.h"
#include "tile.h"
#include "client_main.h"
#include "climisc.h"
#include "editor.h"
#include "mapview_common.h"
#include "tilespec.h"
#include "canvas.h"
#include "gui_main.h"
#include "gui_stuff.h"
#include "plrdlg.h"
#include "sprite.h"
#include "editprop.h"
#include "spechash.h"
Go to the source code of this file.
Data Structures | |
union | packetdata |
struct | tile_vision_data |
struct | pf_pattern |
struct | pf_conjunction |
struct | property_filter |
union | propval_data |
struct | propval |
struct | propstate |
struct | objprop |
struct | objbind |
struct | extviewer |
struct | property_page |
struct | property_editor |
Variables | |
static struct property_editor * | the_property_editor |
#define ADDPROP | ( | ARG_id, | |
ARG_name, | |||
ARG_tooltip, | |||
ARG_flags, | |||
ARG_valtype | |||
) |
#define PF_CONJUNCTION_SEPARATOR "&" |
Definition at line 120 of file editprop.c.
#define PF_DISJUNCTION_SEPARATOR "|" |
Definition at line 119 of file editprop.c.
#define PF_MAX_CLAUSES 16 |
Definition at line 118 of file editprop.c.
#define property_page_objbind_iterate | ( | ARG_pp, | |
NAME_ob | |||
) | TYPED_HASH_DATA_ITERATE(struct objbind *, (ARG_pp)->objbind_table, NAME_ob) |
Definition at line 639 of file editprop.c.
#define property_page_objbind_iterate_end HASH_DATA_ITERATE_END |
Definition at line 641 of file editprop.c.
#define property_page_objprop_iterate | ( | ARG_pp, | |
NAME_op | |||
) | TYPED_HASH_DATA_ITERATE(struct objprop *, (ARG_pp)->objprop_table, NAME_op) |
Definition at line 635 of file editprop.c.
#define property_page_objprop_iterate_end HASH_DATA_ITERATE_END |
Definition at line 637 of file editprop.c.
#define SPECHASH_IDATA_FREE propstate_destroy |
Definition at line 270 of file editprop.c.
#define SPECHASH_IDATA_FREE objbind_destroy |
Definition at line 270 of file editprop.c.
Definition at line 269 of file editprop.c.
Definition at line 269 of file editprop.c.
Definition at line 269 of file editprop.c.
#define SPECHASH_INT_DATA_TYPE |
Definition at line 91 of file editprop.c.
#define SPECHASH_INT_KEY_TYPE |
Definition at line 90 of file editprop.c.
#define SPECHASH_INT_KEY_TYPE |
Definition at line 90 of file editprop.c.
#define SPECHASH_INT_KEY_TYPE |
Definition at line 90 of file editprop.c.
#define SPECHASH_INT_KEY_TYPE |
Definition at line 90 of file editprop.c.
#define SPECHASH_TAG stored_tag |
Definition at line 89 of file editprop.c.
Definition at line 89 of file editprop.c.
Definition at line 89 of file editprop.c.
Definition at line 89 of file editprop.c.
Enumerator | |
---|---|
OPF_NO_FLAGS | |
OPF_EDITABLE | |
OPF_IN_LISTVIEW | |
OPF_HAS_WIDGET |
Definition at line 384 of file editprop.c.
Definition at line 305 of file editprop.c.
Definition at line 197 of file editprop.c.
|
static |
Convenience function to add a column to a GtkTreeView. Used for the view widget creation in extviewer_new().
Definition at line 820 of file editprop.c.
Referenced by extviewer_new().
|
static |
Convert the built_status information to a user viewable string. Returned value is g_strdup'd and must be g_free'd.
Definition at line 981 of file editprop.c.
Referenced by extviewer_refresh_widgets(), and extviewer_view_cell_toggled().
Returns TRUE if a unit can be created at the given tile based on the state of the editor (see editor_unit_virtual_create() ).
Definition at line 1002 of file editprop.c.
Referenced by property_page_create_objects().
Create a pixbuf containing an image of the given city.
May return NULL on error or bad input. NB: You must call g_object_unref on the non-NULL return value when you no longer need it.
Definition at line 5126 of file editprop.c.
Referenced by objbind_get_value_from_object().
|
static |
Create a pixbuf containing an image of the given tile, unit or city restricted to the layer category 'cat'.
May return NULL on error or bad input. NB: You must call g_object_unref on the non-NULL return value when you no longer need it.
Definition at line 5140 of file editprop.c.
Referenced by create_city_pixbuf(), create_tile_pixbuf(), and create_unit_pixbuf().
Create a pixbuf containing an image of the given tile. The image will only be of the layers containing terrains, resources and specials.
May return NULL on error or bad input. NB: You must call g_object_unref on the non-NULL return value when you no longer need it.
Definition at line 5102 of file editprop.c.
Referenced by objbind_get_value_from_object().
Create a pixbuf containing an image of the given unit.
May return NULL on error or bad input. NB: You must call g_object_unref on the non-NULL return value when you no longer need it.
Definition at line 5114 of file editprop.c.
Referenced by objbind_get_value_from_object().
struct property_editor * editprop_get_property_editor | ( | void | ) |
Get the property editor for the client's GUI.
Definition at line 6245 of file editprop.c.
Referenced by editbar_player_properties_button_clicked(), editgui_notify_object_changed(), editgui_notify_object_created(), editgui_popdown_all(), editgui_popup_properties(), editgui_refresh(), popdown_all_game_dialogs(), scenario_properties_callback(), and scenario_properties_callback().
Clear the display widgets.
Definition at line 4091 of file editprop.c.
Referenced by objprop_refresh_widget().
Returns the object property that is displayed by this extviewer.
Definition at line 3786 of file editprop.c.
Referenced by extviewer_clear_widgets(), extviewer_panel_button_clicked(), extviewer_refresh_widgets(), extviewer_textbuf_changed(), and extviewer_view_cell_toggled().
Returns the "panel widget" for this extviewer, i.e. the widget the is to be placed into the properties panel.
Definition at line 3798 of file editprop.c.
Referenced by objprop_setup_widget().
Returns the "view widget" for this extviewer, i.e. the widget the is to be used for viewing/editing a complex property.
Definition at line 3810 of file editprop.c.
Referenced by property_page_add_extviewer(), and property_page_show_extviewer().
Create "extended property viewer". This is used for viewing/editing complex property values (e.g. arrays, bitvectors, etc.).
Definition at line 3502 of file editprop.c.
Referenced by objprop_setup_widget().
Handle the extviewer's panel button click. This should set the property page to display the view widget for this complex property.
Definition at line 4146 of file editprop.c.
Referenced by extviewer_new().
Set the widgets in the extended property viewer to display the given value.
Definition at line 3821 of file editprop.c.
Referenced by objprop_refresh_widget().
|
static |
Handle a change in the extviewer's text buffer.
Definition at line 4387 of file editprop.c.
Referenced by extviewer_clear_widgets(), extviewer_new(), and extviewer_refresh_widgets().
|
static |
Handle toggling of a boolean cell value in the extviewer's tree view.
Definition at line 4166 of file editprop.c.
Referenced by extviewer_new().
Return the next tag number in the sequence.
Definition at line 1035 of file editprop.c.
Referenced by property_page_create_objects().
Bind the object in the given objbind to the properties in the page.
Definition at line 2225 of file editprop.c.
Referenced by property_page_add_objbind().
Deletes all stored modified property values.
Definition at line 2116 of file editprop.c.
Referenced by property_page_reset_objbinds().
Remove a stored modified value, if it exists.
Definition at line 2071 of file editprop.c.
Referenced by objbind_set_modified_value(), and objprop_refresh_widget().
Destroy the object bind and free any resources it might have been using.
Definition at line 2195 of file editprop.c.
|
static |
If applicable, sets the allowed range values of the given object property as applied to the bound object. Returns TRUE if values were set.
Definition at line 1884 of file editprop.c.
Referenced by objprop_refresh_widget().
|
static |
Retrieve the stored property value for the bound object, or NULL if none exists.
NB: Does NOT return a copy.
Definition at line 2176 of file editprop.c.
Referenced by objbind_pack_modified_value(), and objprop_refresh_widget().
Returns the bound object, if it still "exists". Returns NULL on error.
Definition at line 1366 of file editprop.c.
Referenced by objbind_get_allowed_value_span(), objbind_get_value_from_object(), objbind_pack_current_values(), objbind_pack_modified_value(), objbind_request_destroy_object(), property_page_create_button_clicked(), and property_page_create_objects().
Returns the ID of the bound object, or -1 if invalid.
Definition at line 1382 of file editprop.c.
Referenced by objbind_get_object(), and objbind_request_destroy_object().
Returns the object type of the bound object.
Definition at line 2214 of file editprop.c.
Referenced by objbind_get_allowed_value_span(), objbind_get_value_from_object(), objbind_pack_current_values(), objbind_pack_modified_value(), and objbind_request_destroy_object().
|
static |
Returns the row reference of this objbind, or NULL if not applicable.
Definition at line 2666 of file editprop.c.
Referenced by property_page_fill_widgets(), and property_page_object_changed().
|
static |
Returns a newly allocated property value for the given object property on the object referenced by the given object bind, or NULL on failure.
NB: You must call propval_free() on the non-NULL return value when it no longer needed.
Definition at line 1443 of file editprop.c.
Referenced by objbind_set_modified_value(), objprop_refresh_widget(), and property_page_set_store_value().
Returns TRUE if there are any stored modified values of any of the properties of the bound object.
Definition at line 2104 of file editprop.c.
Referenced by property_page_send_values().
Create a new object "bind". It serves to bind a set of object properties to an object instance.
Definition at line 1340 of file editprop.c.
Referenced by property_page_add_objbind().
Fill the packet with the bound object's current state.
NB: This must be updated if the packet_edit_<object> definitions change.
Definition at line 2239 of file editprop.c.
Referenced by property_page_send_values().
|
static |
Package the modified property value into the supplied packet.
Definition at line 2382 of file editprop.c.
Referenced by property_page_send_values().
Returns TRUE if a stored modified property value exists for this bound object for the given property.
Definition at line 2085 of file editprop.c.
Referenced by objbind_pack_modified_value(), and objprop_refresh_widget().
Sends a request to the server to have the bound object erased from existence. Only makes sense for object types for which the function objtype_is_conserved() returns FALSE.
Definition at line 1395 of file editprop.c.
Referenced by property_page_destroy_objects().
|
static |
Store a modified property value, but only if it is different from the current value. Always makes a copy of the given value when storing.
Returns whether anything changed.
Definition at line 2130 of file editprop.c.
Referenced by property_page_change_value().
|
static |
Sets the row reference in a GtkTreeModel of this objbind.
Definition at line 2654 of file editprop.c.
Referenced by property_page_fill_widgets().
|
static |
Create and return a cell renderer corresponding to this object property, suitable to be used with a tree view. May return NULL if this object property cannot exist in a list store.
Definition at line 2858 of file editprop.c.
Referenced by property_page_new().
Returns a the string corresponding to the attribute type name required for gtk_tree_view_column_new_with_attributes according to this objprop's GType value. May return NULL if it does not make sense for this object property.
Definition at line 2761 of file editprop.c.
Referenced by property_page_new().
|
static |
Retrieves the widget stored under the given name, or returns NULL and logs an error message if not found.
Definition at line 3410 of file editprop.c.
Referenced by objprop_refresh_widget().
Returns the column id in the list store for this object property. May return -1 if not applicable or if not yet set. NB: This is the column id in the model, not the view.
Definition at line 2799 of file editprop.c.
Referenced by property_page_new(), and property_page_set_store_value().
Return the stored extviewer, or NULL if none exists.
Definition at line 3455 of file editprop.c.
Referenced by objprop_refresh_widget().
Returns the GType that this object property renders as in a GtkTreeView. Returning G_TYPE_NONE indicates that this property cannot be viewed in a list.
NB: This must correspond to the actions in property_page_set_store_value.
Definition at line 2692 of file editprop.c.
Referenced by objprop_create_cell_renderer(), objprop_get_attribute_type_string(), objprop_is_sortable(), and property_page_new().
Returns the unique property identifier for this object property.
Definition at line 2677 of file editprop.c.
Referenced by extviewer_clear_widgets(), extviewer_new(), extviewer_refresh_widgets(), extviewer_textbuf_changed(), extviewer_view_cell_toggled(), objbind_clear_modified_value(), objbind_get_allowed_value_span(), objbind_get_modified_value(), objbind_get_value_from_object(), objbind_pack_modified_value(), objbind_property_is_modified(), objbind_set_modified_value(), objprop_get_child_widget(), objprop_refresh_widget(), objprop_set_child_widget(), objprop_setup_widget(), and propstate_new().
Returns the string name of this object property.
Definition at line 2834 of file editprop.c.
Referenced by extviewer_clear_widgets(), extviewer_new(), extviewer_refresh_widgets(), extviewer_textbuf_changed(), extviewer_view_cell_toggled(), objbind_get_allowed_value_span(), objbind_get_value_from_object(), objbind_pack_modified_value(), objprop_get_child_widget(), objprop_refresh_widget(), objprop_set_child_widget(), objprop_setup_widget(), property_filter_match(), and property_page_new().
Get the property page in which this property is installed.
Definition at line 3466 of file editprop.c.
Referenced by extviewer_panel_button_clicked(), extviewer_textbuf_changed(), extviewer_view_cell_toggled(), objprop_setup_widget(), objprop_widget_entry_changed(), objprop_widget_spin_button_changed(), objprop_widget_text_changed(), and objprop_widget_toggle_button_changed().
Return a description (translated) of the property.
Definition at line 2845 of file editprop.c.
Referenced by property_page_new().
|
static |
Returns the previously stored tree view column reference, or NULL if none exists.
Definition at line 2823 of file editprop.c.
Referenced by property_page_quick_find_entry_changed().
Returns the value type of this property value (one of enum value_types).
Definition at line 2725 of file editprop.c.
Referenced by objbind_get_value_from_object(), and property_page_set_store_value().
Returns the gtk widget used to display or edit this property, or NULL if not applicable.
Definition at line 3368 of file editprop.c.
Referenced by objprop_get_child_widget(), objprop_refresh_widget(), objprop_set_child_widget(), property_page_new(), and property_page_quick_find_entry_changed().
Returns TRUE if this object property can create and use a property widget.
Definition at line 2747 of file editprop.c.
Referenced by objprop_refresh_widget(), objprop_setup_widget(), property_page_new(), and property_page_quick_find_entry_changed().
Return TRUE if the given object property cannot be edited (i.e. it is displayed information only).
Definition at line 2893 of file editprop.c.
Referenced by extviewer_new(), objbind_pack_modified_value(), objbind_property_is_modified(), property_page_change_value(), and property_page_send_values().
Return TRUE if the given object property can be sorted (i.e. in the list view).
Definition at line 2879 of file editprop.c.
Referenced by property_page_new().
|
static |
Create a new object property.
Definition at line 3477 of file editprop.c.
Refresh the display/edit widget corresponding to this object property according to the value of the bound object. If a stored modified value exists, then check it against the object's current value and remove it if they are equal.
If 'ob' is NULL, then clear the widget.
Definition at line 3132 of file editprop.c.
Referenced by property_page_change_value(), property_page_fill_widgets(), property_page_object_changed(), property_page_reset_objbinds(), and property_page_selection_changed().
|
static |
Stores the given widget under the given name. This function will have no effect if objprop_get_widget does not return a valid GtkWidget instance.
Definition at line 3383 of file editprop.c.
Referenced by objprop_setup_widget().
Store the column id of the list store that this object property can be viewed in. This should generally only be changed set once, when the object property's associated list view is created. NB: This is the column id in the model, not the view.
Definition at line 2786 of file editprop.c.
Referenced by property_page_new().
Store the extviewer struct for later retrieval.
Definition at line 3443 of file editprop.c.
Referenced by objprop_setup_widget().
|
static |
Sets the view column reference for later convenience.
Definition at line 2810 of file editprop.c.
Referenced by property_page_new().
Create the gtk widget used to edit or display this object property.
Definition at line 2954 of file editprop.c.
Referenced by objprop_get_widget().
Returns TRUE if this object property can be viewed in a GtkTreeView.
Definition at line 2736 of file editprop.c.
Referenced by property_page_new(), property_page_quick_find_entry_changed(), and property_page_set_store_value().
Callback for entry widget 'changed' signal.
Definition at line 2904 of file editprop.c.
Referenced by objprop_setup_widget().
|
static |
Callback for spin button widget 'value-changed' signal.
Definition at line 2920 of file editprop.c.
Referenced by objprop_refresh_widget(), and objprop_setup_widget().
|
static |
Callback for toggle type button widget 'toggled' signal.
Definition at line 2937 of file editprop.c.
Referenced by objprop_refresh_widget(), and objprop_setup_widget().
|
static |
Returns the unique identifier value from the given object, assuming it is of the 'objtype' object type. Valid IDs are always greater than or equal to zero.
Definition at line 696 of file editprop.c.
Referenced by objbind_new(), and property_page_add_objbind().
|
static |
Returns the translated name for the given object type.
Definition at line 667 of file editprop.c.
Referenced by objbind_get_allowed_value_span(), objbind_get_value_from_object(), objbind_pack_current_values(), objbind_pack_modified_value(), objbind_request_destroy_object(), objtype_get_id_from_object(), objtype_get_object_from_id(), objtype_is_conserved(), property_page_add_objbinds_from_tile(), property_page_get_name(), property_page_new(), property_page_send_packet(), and property_page_setup_objprops().
|
static |
Get the object of type 'objtype' uniquely identified by 'id'.
Definition at line 725 of file editprop.c.
Referenced by objbind_get_object(), and property_page_object_created().
|
static |
Returns TRUE if it does not make sense for the object of the given type to be created and destroyed (e.g. tiles, game), as opposed to those that can be (e.g. units, cities, players, etc.).
Definition at line 756 of file editprop.c.
Referenced by objbind_request_destroy_object(), property_editor_handle_object_created(), property_page_create_objects(), and property_page_new().
|
static |
Create and add a property page for the given object type to the property editor. Returns TRUE if successful.
Definition at line 6155 of file editprop.c.
Referenced by property_editor_new().
void property_editor_clear | ( | struct property_editor * | pe | ) |
Clear all property pages in the given property editor.
Definition at line 6362 of file editprop.c.
Referenced by editgui_popdown_all(), editgui_popup_properties(), and editgui_refresh().
|
static |
Returns the property page for the given object type.
Definition at line 6189 of file editprop.c.
Referenced by property_editor_clear(), property_editor_handle_object_changed(), property_editor_handle_object_created(), property_editor_load_tiles(), property_editor_reload(), and property_page_create_button_clicked().
void property_editor_handle_object_changed | ( | struct property_editor * | pe, |
enum editor_object_type | objtype, | ||
int | object_id, | ||
bool | remove | ||
) |
Handle a notification from the client core that some object has changed state at the server side (including being removed).
Definition at line 6322 of file editprop.c.
Referenced by editgui_notify_object_changed().
void property_editor_handle_object_created | ( | struct property_editor * | pe, |
int | tag, | ||
int | object_id | ||
) |
Handle a notification that an object was created under the given tag.
Definition at line 6344 of file editprop.c.
Referenced by editgui_notify_object_created().
Refresh the given property editor according to the given list of tiles.
Definition at line 6256 of file editprop.c.
Referenced by editgui_popup_properties().
|
static |
Create and return the property editor widget bundle.
Definition at line 6202 of file editprop.c.
Referenced by editprop_get_property_editor().
void property_editor_popdown | ( | struct property_editor * | pe | ) |
Hide the property editor window.
Definition at line 6310 of file editprop.c.
Referenced by editgui_popdown_all(), editgui_refresh(), and popdown_all_game_dialogs().
void property_editor_popup | ( | struct property_editor * | pe, |
enum editor_object_type | objtype | ||
) |
Show the property editor to the user, with given page corresponding to 'objtype' in front (if a valid object type).
Definition at line 6292 of file editprop.c.
Referenced by editbar_player_properties_button_clicked(), editgui_popup_properties(), scenario_properties_callback(), and scenario_properties_callback().
void property_editor_reload | ( | struct property_editor * | pe, |
enum editor_object_type | objtype | ||
) |
Clear and load objects into the property page corresponding to the given object type. Also, make it the current shown notebook page.
Definition at line 6382 of file editprop.c.
Referenced by editbar_player_properties_button_clicked(), editgui_popup_properties(), scenario_properties_callback(), and scenario_properties_callback().
|
static |
Frees all memory used by the property filter.
Definition at line 6558 of file editprop.c.
Referenced by property_page_quick_find_entry_changed().
Returns TRUE if the filter matches the given object property.
The filter matches if its truth value is TRUE. That is, it has at least one OR clause in which all AND clauses are TRUE. An AND clause is TRUE if its pattern matches the name of the given object property (case is ignored), or it is negated and does not match. For example:
a - Matches all properties whose names contain "a" (or "A"). !a - Matches all properties whose names do not contain "a". a|b - Matches all properties whose names contain "a" or "b". a|b&c - Matches all properties whose names contain either an "a", or contain both "b" and "c".
NB: If you change the behaviour of this function, be sure to update the filter tooltip in property_page_new().
Definition at line 6504 of file editprop.c.
Referenced by property_page_quick_find_entry_changed().
|
static |
Create a new property filter from the given filter string. Result should be freed by property_filter_free when no longed needed.
The filter string is '|' ("or") separated list of '&' ("and") separated lists of patterns. A pattern may be preceded by '!' to have its result negated.
NB: If you change the behaviour of this function, be sure to update the filter tooltip in property_page_new().
Definition at line 6430 of file editprop.c.
Referenced by property_page_quick_find_entry_changed().
Add the extviewer's view widget to the property page so that it can be shown in the extended property view panel.
Definition at line 5987 of file editprop.c.
Referenced by objprop_setup_widget().
|
static |
Create a new object bind to the given object and register it with the given property page.
Definition at line 5197 of file editprop.c.
Referenced by property_editor_reload(), property_page_add_objbinds_from_tile(), and property_page_object_created().
|
static |
Create zero or more object binds from the objects on the given tile to the properties contained in the given property page.
Definition at line 5233 of file editprop.c.
Referenced by property_page_load_tiles().
Handles the 'clicked' signal for the "Apply" button in the property page.
Definition at line 6095 of file editprop.c.
Referenced by property_page_new().
|
static |
Called when a user sets a new value for the given property via the GUI. Refreshes the properties widget if anything changes.
Definition at line 5507 of file editprop.c.
Referenced by extviewer_textbuf_changed(), extviewer_view_cell_toggled(), objprop_widget_entry_changed(), objprop_widget_spin_button_changed(), objprop_widget_text_changed(), and objprop_widget_toggle_button_changed().
|
static |
Remove all object binds (i.e. objects listed) in the property page.
Definition at line 5182 of file editprop.c.
Referenced by property_editor_clear(), and property_editor_reload().
|
static |
Remove all tags in the tag table.
Definition at line 6084 of file editprop.c.
Referenced by property_editor_clear().
Handle a request to create a new object in the property page.
Definition at line 6116 of file editprop.c.
Referenced by property_page_new().
|
static |
Create objects corresponding to the type of this property page. Parameters such as the type, count, size and player owner are taken from the current editor state. The 'hint_tiles' argument is a list of tiles where the objects could be created.
Definition at line 5785 of file editprop.c.
Referenced by property_page_create_button_clicked().
Handle a click on the "destroy" button.
Definition at line 6144 of file editprop.c.
Referenced by property_page_new().
|
static |
Destroy all selected objects in the current property page.
Definition at line 5746 of file editprop.c.
Referenced by property_page_destroy_button_clicked().
|
static |
Inserts any objbinds owned by this proprety page into the page's list store if they are not there already and refreshes all property widgets.
Definition at line 5387 of file editprop.c.
Referenced by property_editor_reload(), property_page_load_tiles(), and property_page_object_created().
|
static |
Free any resources being used by the packet.
Definition at line 5685 of file editprop.c.
Referenced by property_page_send_values().
|
static |
Get the objbind corresponding to the object that is currently in view (i.e. in the information/properties panels) or NULL if none.
Definition at line 5436 of file editprop.c.
Referenced by property_page_change_value(), property_page_fill_widgets(), property_page_object_changed(), property_page_reset_objbinds(), property_page_selection_changed(), and property_page_selection_func().
Returns the translated name of the property page's object type.
Definition at line 5074 of file editprop.c.
Referenced by property_editor_add_page(), and property_page_store_creation_tag().
|
static |
Return the number of current bound objects to this property page.
Definition at line 5495 of file editprop.c.
Referenced by property_editor_load_tiles().
|
static |
Returns the objbind whose object corresponds to the given id, or NULL if no such objbind exists.
Definition at line 5461 of file editprop.c.
Referenced by property_page_object_changed().
|
static |
Returns the object type for this property page, or -1 if none.
Definition at line 5086 of file editprop.c.
Referenced by property_page_add_objbind(), property_page_add_objbinds_from_tile(), property_page_create_objects(), property_page_get_name(), property_page_new_packet(), property_page_object_created(), property_page_send_packet(), property_page_setup_objprops(), and property_page_store_creation_tag().
|
static |
Removes all of the current objbinds and extracts new ones from the supplied list of tiles.
Definition at line 5478 of file editprop.c.
Referenced by property_editor_load_tiles().
|
static |
Create and return a property page of the given object type. Returns NULL if the page could not be created.
Definition at line 4768 of file editprop.c.
Referenced by property_editor_add_page().
|
static |
Returns pointer to a packet suitable for this page's object type. Result should be freed using property_page_free_packet when no longer needed.
Definition at line 5603 of file editprop.c.
Referenced by property_page_send_values().
|
static |
Update objbinds and widgets according to how the object given by 'object_id' has changed. If the object no longer exists then the objbind is removed from the property page.
Definition at line 5909 of file editprop.c.
Referenced by property_editor_handle_object_changed().
|
static |
Handle a notification of object creation sent back from the server. If this is something we previously requested, then 'tag' should be found in the tag table. In this case we create a new objbind for the object given by 'object_id' and add it to this page.
Definition at line 5961 of file editprop.c.
Referenced by property_editor_handle_object_created().
Callback to handle text changing in the quick find entry widget.
Definition at line 4726 of file editprop.c.
Referenced by property_page_new().
Handles the 'clicked' signal for the "Refresh" button in the property page.
Definition at line 6106 of file editprop.c.
Referenced by property_page_new().
|
static |
Decrease the tag count and remove the object creation tag if it is no longer needed.
Definition at line 6054 of file editprop.c.
Referenced by property_page_object_created().
|
static |
Reload the displayed values of all properties for the selected bound objects. Hence, deletes all their stored modified values.
Definition at line 5705 of file editprop.c.
Referenced by property_page_refresh_button_clicked().
|
static |
Callback for when a property page's listview's selection changes.
Definition at line 4646 of file editprop.c.
Referenced by property_page_new().
|
static |
Monitor which rows are to be selected, so we know which objbind to display in the properties panel.
Definition at line 4671 of file editprop.c.
Referenced by property_page_new().
|
static |
Sends the given packet.
Definition at line 5644 of file editprop.c.
Referenced by property_page_send_values().
|
static |
Send all modified values of all selected properties.
Definition at line 5549 of file editprop.c.
Referenced by property_page_apply_button_clicked().
|
static |
Set the objbind that should be shown in the properties panel. Does not refresh property widgets.
Definition at line 5448 of file editprop.c.
Referenced by property_page_clear_objbinds(), property_page_selection_changed(), and property_page_selection_func().
|
static |
Set the column value in the list store of the property page. Returns TRUE if data was enetered into the store.
NB: This must match the conversion in objprop_get_gtype.
Definition at line 5287 of file editprop.c.
Referenced by property_page_fill_widgets(), property_page_object_changed(), and property_page_reset_objbinds().
|
static |
Install all object properties that this page type can view/edit.
Definition at line 4436 of file editprop.c.
Referenced by property_page_new().
|
static |
Make the given extended property viewer's view widget visible in the property page.
Definition at line 6007 of file editprop.c.
Referenced by extviewer_panel_button_clicked().
|
static |
Store the given object creation tag so that when the server notifies us about it we know what to do, up to 'count' times.
Definition at line 6032 of file editprop.c.
Referenced by property_page_create_objects().
|
static |
Check if the given tag is one that we previously stored.
Definition at line 6073 of file editprop.c.
Referenced by property_page_object_created().
Removes the stored value, freeing it if needed.
Definition at line 1285 of file editprop.c.
Referenced by propstate_destroy(), and propstate_set_value().
Free a property state and any associated resources.
Definition at line 1298 of file editprop.c.
Returns the stored value.
NB: NOT a copy of the value.
Definition at line 1328 of file editprop.c.
Referenced by objbind_get_modified_value().
Create a new "property state" record. It keeps track of the modified value of a property bound to an object.
NB: Does NOT make a copy of 'pv'.
Definition at line 1266 of file editprop.c.
Referenced by objbind_set_modified_value().
Replace the stored property value with a new one. The old value will be freed if needed.
NB: Does NOT make a copy of 'pv'.
Definition at line 1313 of file editprop.c.
Referenced by objbind_set_modified_value().
Fill the supplied buffer with a short string representation of the given value. Returned value is g_strdup'd and must be g_free'd.
Definition at line 862 of file editprop.c.
Referenced by extviewer_refresh_widgets(), extviewer_textbuf_changed(), extviewer_view_cell_toggled(), and property_page_set_store_value().
Return a newly allocated deep copy of the given value.
Definition at line 1046 of file editprop.c.
Referenced by extviewer_refresh_widgets(), and objbind_set_modified_value().
Returns TRUE if the two values are equal, in a deep sense.
Definition at line 1179 of file editprop.c.
Referenced by extviewer_refresh_widgets(), objbind_set_modified_value(), and objprop_refresh_widget().
Free all allocated memory used by this property value, including calling the appropriate free function on the internal data according to its type.
Definition at line 1128 of file editprop.c.
Referenced by extviewer_clear_widgets(), extviewer_refresh_widgets(), objbind_set_modified_value(), objprop_refresh_widget(), property_page_set_store_value(), and propstate_clear_value().
Frees the internal data held by the propval, without freeing the propval struct itself.
Definition at line 1142 of file editprop.c.
Referenced by propval_free().
|
static |
Returns the untranslated name for the given value type.
Definition at line 779 of file editprop.c.
Referenced by propval_free_data().
const char * vision_layer_get_name | ( | enum vision_layer | vl | ) |
Returns a translated string name for the given "vision layer".
Definition at line 6586 of file editprop.c.
Referenced by extviewer_new().
|
static |
Definition at line 661 of file editprop.c.
Referenced by editprop_get_property_editor().