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 <base_units.h>
#include <kiway.h>
#include <confirm.h>
#include <general.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 51 of file dialog_edit_one_field.cpp.

References GR_TEXT_HJUSTIFY_LEFT, and GR_TEXT_HJUSTIFY_RIGHT.

Referenced by DIALOG_EDIT_ONE_FIELD::updateText().

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

Definition at line 65 of file dialog_edit_one_field.cpp.

References GR_TEXT_VJUSTIFY_BOTTOM, and GR_TEXT_VJUSTIFY_TOP.

Referenced by DIALOG_EDIT_ONE_FIELD::updateText().

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