KiCad PCB EDA Suite
dialog_edit_one_field.cpp File Reference

dialog to editing a field ( not a graphic text) in current component. More...

#include <fctsys.h>
#include <common.h>
#include <kiway.h>
#include <confirm.h>
#include <kicad_string.h>
#include <sch_base_frame.h>
#include <sch_component.h>
#include <class_libentry.h>
#include <lib_field.h>
#include <template_fieldnames.h>
#include <class_library.h>
#include <sch_validators.h>
#include <dialog_edit_one_field.h>

Go to the source code of this file.

Functions

EDA_TEXT_HJUSTIFY_T IntToEdaTextHorizJustify (int aHorizJustify)
 
EDA_TEXT_VJUSTIFY_T IntToEdaTextVertJustify (int aVertJustify)
 

Detailed Description

dialog to editing a field ( not a graphic text) in current component.

Definition in file dialog_edit_one_field.cpp.

Function Documentation

EDA_TEXT_HJUSTIFY_T IntToEdaTextHorizJustify ( int  aHorizJustify)

Definition at line 49 of file dialog_edit_one_field.cpp.

References GR_TEXT_HJUSTIFY_LEFT, and GR_TEXT_HJUSTIFY_RIGHT.

Referenced by DIALOG_SCH_EDIT_ONE_FIELD::UpdateField(), and DIALOG_EDIT_ONE_FIELD::updateText().

50 {
51  wxASSERT( aHorizJustify >= GR_TEXT_HJUSTIFY_LEFT && aHorizJustify <= GR_TEXT_HJUSTIFY_RIGHT );
52 
53  if( aHorizJustify > GR_TEXT_HJUSTIFY_RIGHT )
55 
56  if( aHorizJustify < GR_TEXT_HJUSTIFY_LEFT )
57  return GR_TEXT_HJUSTIFY_LEFT;
58 
59  return (EDA_TEXT_HJUSTIFY_T) aHorizJustify;
60 }
EDA_TEXT_HJUSTIFY_T
Definition: eda_text.h:62
EDA_TEXT_VJUSTIFY_T IntToEdaTextVertJustify ( int  aVertJustify)

Definition at line 63 of file dialog_edit_one_field.cpp.

References GR_TEXT_VJUSTIFY_BOTTOM, and GR_TEXT_VJUSTIFY_TOP.

Referenced by DIALOG_SCH_EDIT_ONE_FIELD::UpdateField(), and DIALOG_EDIT_ONE_FIELD::updateText().

64 {
65  wxASSERT( aVertJustify >= GR_TEXT_VJUSTIFY_TOP && aVertJustify <= GR_TEXT_VJUSTIFY_BOTTOM );
66 
67  if( aVertJustify > GR_TEXT_VJUSTIFY_BOTTOM )
69 
70  if( aVertJustify < GR_TEXT_VJUSTIFY_TOP )
71  return GR_TEXT_VJUSTIFY_TOP;
72 
73  return (EDA_TEXT_VJUSTIFY_T) aVertJustify;
74 }
EDA_TEXT_VJUSTIFY_T
Definition: eda_text.h:69