MCPcopy Create free account
hub / github.com/ProgerXP/Notepad2e / AutoLineLayout

Class AutoLineLayout

scintilla/src/Editor.cxx:416–437  ·  view source on GitHub ↗

* Convenience class to ensure LineLayout objects are always disposed. */

Source from the content-addressed store, hash-verified

414 * Convenience class to ensure LineLayout objects are always disposed.
415 */
416class AutoLineLayout
417{
418 LineLayoutCache &llc;
419 LineLayout *ll;
420 AutoLineLayout &operator= ( const AutoLineLayout & );
421 public:
422 AutoLineLayout ( LineLayoutCache &llc_, LineLayout *ll_ ) : llc ( llc_ ), ll ( ll_ ) {}
423 ~AutoLineLayout() {
424 llc.Dispose ( ll );
425 ll = 0;
426 }
427 LineLayout *operator->() const {
428 return ll;
429 }
430 operator LineLayout *() const {
431 return ll;
432 }
433 void Set ( LineLayout *ll_ ) {
434 llc.Dispose ( ll );
435 ll = ll_;
436 }
437};
438
439SelectionPosition Editor::ClampPositionIntoDocument ( SelectionPosition sp ) const
440{

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected