gschem

o_find.c File Reference

#include <config.h>
#include <math.h>
#include <stdio.h>
#include "gschem.h"
Include dependency graph for o_find.c:

Go to the source code of this file.

Functions

static gboolean is_object_hit (GSCHEM_TOPLEVEL *w_current, OBJECT *object, int w_x, int w_y, int w_slack)
 Tests a if a given OBJECT was hit at a given set of coordinates.
static gboolean find_single_object (GSCHEM_TOPLEVEL *w_current, OBJECT *object, int w_x, int w_y, int w_slack, int change_selection)
 Tests a if a given OBJECT was hit at a given set of coordinates.
gboolean o_find_object (GSCHEM_TOPLEVEL *w_current, int w_x, int w_y, gboolean change_selection)
 Find an OBJECT at a given set of coordinates.
gboolean o_find_selected_object (GSCHEM_TOPLEVEL *w_current, int w_x, int w_y)

Function Documentation

static gboolean is_object_hit ( GSCHEM_TOPLEVEL w_current,
OBJECT *  object,
int  w_x,
int  w_y,
int  w_slack 
) [static]
Function Description
Tests a if a given OBJECT was hit at a given set of coordinates. If an object is not selectable (e.g. it is locked), or it is invisible and not being rendered, this function will return FALSE.
Parameters:
[in]w_currentThe GSCHEM_TOPLEVEL object.
[in]objectThe OBJECT being hit-tested.
[in]w_xThe X coordinate to test (in world coords).
[in]w_yThe Y coordinate to test (in world coords).
[in]w_slackThe slack applied to the hit-test.
Returns:
TRUE if the OBJECT was hit, otherwise FALSE.

Definition at line 48 of file o_find.c.

static gboolean find_single_object ( GSCHEM_TOPLEVEL w_current,
OBJECT *  object,
int  w_x,
int  w_y,
int  w_slack,
int  change_selection 
) [static]
Function Description
Tests a if a given OBJECT was hit at a given set of coordinates. If so, processes selection changes as appropriate for the object and passed flag. Saves a pointer to the found object so future find operations resume after this object.
Parameters:
[in]w_currentThe GSCHEM_TOPLEVEL object.
[in]objectThe OBJECT being hit-tested.
[in]w_xThe X coordinate to test (in world coords).
[in]w_yThe Y coordinate to test (in world coords).
[in]w_slackThe slack applied to the hit-test.
[in]change_selectionWhether to select the found object or not.
Returns:
TRUE if the OBJECT was hit, otherwise FALSE.

Definition at line 89 of file o_find.c.

Here is the call graph for this function:

gboolean o_find_object ( GSCHEM_TOPLEVEL w_current,
int  w_x,
int  w_y,
gboolean  change_selection 
)
Function Description
Tests for OBJECTS hit at a given set of coordinates. If change_selection is TRUE, it updates the page's selection.

Find operations resume searching after the last object which was found, so multiple find operations at the same point will cycle through any objects on top of each other at this location.

Parameters:
[in]w_currentThe GSCHEM_TOPLEVEL object.
[in]w_xThe X coordinate to test (in world coords).
[in]w_yThe Y coordinate to test (in world coords).
[in]change_selectionWhether to select the found object or not.
Returns:
TRUE if the object was hit at the given coordinates, otherwise FALSE.

Definition at line 127 of file o_find.c.

Here is the call graph for this function:

gboolean o_find_selected_object ( GSCHEM_TOPLEVEL w_current,
int  w_x,
int  w_y 
)
Todo:
Finish function documentation!!!
Function Description

Definition at line 190 of file o_find.c.

Here is the call graph for this function:

 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Defines