~cern-kicad/kicad/kicad-pns-tom

« back to all changes in this revision

Viewing changes to eeschema/dialogs/dialog_schematic_find.h

  • Committer: Maciej Suminski
  • Date: 2013-08-02 13:57:24 UTC
  • mfrom: (4024.1.238 kicad)
  • mto: This revision was merged to the branch mainline in revision 4221.
  • Revision ID: maciej.suminski@cern.ch-20130802135724-gix6orezshkukodv
Upstream merge.

Show diffs side-by-side

added added

removed removed

Lines of Context:
81
81
 
82
82
 
83
83
/**
84
 
 * Definition FR_MASK_NON_SEARCH_FLAGS
 
84
 * Definition FR_MASK_NON_COMPARE_FLAGS
85
85
 * is used to mask find/replace flag bits that do not effect the search results.
86
86
 */
87
 
#define FR_MASK_NON_SEARCH_FLAGS  ~( wxFR_DOWN | FR_SEARCH_WRAP | FR_NO_WARP_CURSOR | \
88
 
                                     FR_REPLACE_ITEM_FOUND )
 
87
#define FR_MASK_NON_COMPARE_FLAGS  ~( wxFR_DOWN | FR_SEARCH_WRAP | FR_NO_WARP_CURSOR | \
 
88
                                      FR_REPLACE_ITEM_FOUND )
89
89
 
90
90
 
91
91
/**
122
122
 
123
123
 
124
124
    /**
125
 
     * Function ChangesSearch
126
 
     * tests \a aFindReplaceData to see if it would result in a change in the search
127
 
     * results.
 
125
     * Function ChangesCompare
 
126
     * tests \a aFindReplaceData to see if it would result in a change in the search string
 
127
     * comparison results.
128
128
     *
129
129
     * @param aFindReplaceData A reference to a #SCH_FIND_REPLACE_DATA object to compare
130
130
     *                         against.
131
131
     * @return True if \a aFindReplaceData would result in a search and/or replace change,
132
132
     *         otherwise false.
133
133
     */
134
 
    bool ChangesSearch( SCH_FIND_REPLACE_DATA& aFindReplaceData )
 
134
    bool ChangesCompare( SCH_FIND_REPLACE_DATA& aFindReplaceData )
135
135
    {
136
136
        return ( (GetFindString() != aFindReplaceData.GetFindString())
137
 
              || (GetSearchFlags() != aFindReplaceData.GetSearchFlags()) );
 
137
              || (GetCompareFlags() != aFindReplaceData.GetCompareFlags()) );
138
138
    }
139
139
 
140
140
    bool IsReplacing() const { return (GetFlags() & FR_SEARCH_REPLACE) != 0; }
 
141
    bool IsWrapping() const { return (GetFlags() & FR_SEARCH_WRAP) != 0; }
141
142
 
142
143
private:
143
144
    /**
144
145
     * Function GetSearchFlags
145
146
     * @return The flags that only effect the search result.
146
147
     */
147
 
    wxUint32 GetSearchFlags() const { return GetFlags() & FR_MASK_NON_SEARCH_FLAGS; }
 
148
    wxUint32 GetCompareFlags() const { return GetFlags() & FR_MASK_NON_COMPARE_FLAGS; }
148
149
};
149
150
 
150
151