interface gráfica
DESCRIPTION
Interface Gráfica. Guide. Carlos André Vaz Junior [email protected] http://www.eq.ufrj.br/links/h2cin/carlosandre. Push Button. Toggle Button. Radio Button. Checkbox. Edit Text. Static Text. Slider. Frame. List Box. Popup Menu. Axes. estofamento. design. cor. material. - PowerPoint PPT PresentationTRANSCRIPT
![Page 1: Interface Gráfica](https://reader030.vdocuments.mx/reader030/viewer/2022033102/56815a86550346895dc7f51e/html5/thumbnails/1.jpg)
MA
TLA
B A
vanç
ado
– In
terf
ace
gráf
ica
Interface GráficaGuide
Carlos André Vaz Junior [email protected]
http://www.eq.ufrj.br/links/h2cin/carlosandre
![Page 2: Interface Gráfica](https://reader030.vdocuments.mx/reader030/viewer/2022033102/56815a86550346895dc7f51e/html5/thumbnails/2.jpg)
MA
TLA
B A
vanç
ado
– In
terf
ace
gráf
ica
![Page 3: Interface Gráfica](https://reader030.vdocuments.mx/reader030/viewer/2022033102/56815a86550346895dc7f51e/html5/thumbnails/3.jpg)
MA
TLA
B A
vanç
ado
– In
terf
ace
gráf
ica
![Page 4: Interface Gráfica](https://reader030.vdocuments.mx/reader030/viewer/2022033102/56815a86550346895dc7f51e/html5/thumbnails/4.jpg)
MA
TLA
B A
vanç
ado
– In
terf
ace
gráf
ica
![Page 5: Interface Gráfica](https://reader030.vdocuments.mx/reader030/viewer/2022033102/56815a86550346895dc7f51e/html5/thumbnails/5.jpg)
MA
TLA
B A
vanç
ado
– In
terf
ace
gráf
ica
![Page 6: Interface Gráfica](https://reader030.vdocuments.mx/reader030/viewer/2022033102/56815a86550346895dc7f51e/html5/thumbnails/6.jpg)
MA
TLA
B A
vanç
ado
– In
terf
ace
gráf
ica
Push Button
List Box
Axes
Slider
Edit Text
Radio Button
Popup Menu
Checkbox
Static Text
Frame
Toggle Button
![Page 7: Interface Gráfica](https://reader030.vdocuments.mx/reader030/viewer/2022033102/56815a86550346895dc7f51e/html5/thumbnails/7.jpg)
MA
TLA
B A
vanç
ado
– In
terf
ace
gráf
ica
![Page 8: Interface Gráfica](https://reader030.vdocuments.mx/reader030/viewer/2022033102/56815a86550346895dc7f51e/html5/thumbnails/8.jpg)
MA
TLA
B A
vanç
ado
– In
terf
ace
gráf
ica
![Page 9: Interface Gráfica](https://reader030.vdocuments.mx/reader030/viewer/2022033102/56815a86550346895dc7f51e/html5/thumbnails/9.jpg)
MA
TLA
B A
vanç
ado
– In
terf
ace
gráf
ica
estofamento
cor
material
design
tamanho
![Page 10: Interface Gráfica](https://reader030.vdocuments.mx/reader030/viewer/2022033102/56815a86550346895dc7f51e/html5/thumbnails/10.jpg)
MA
TLA
B A
vanç
ado
– In
terf
ace
gráf
ica
Enable Visible
on
off
inactive
on
off
![Page 11: Interface Gráfica](https://reader030.vdocuments.mx/reader030/viewer/2022033102/56815a86550346895dc7f51e/html5/thumbnails/11.jpg)
MA
TLA
B A
vanç
ado
– In
terf
ace
gráf
ica
WindowStyle
Resize
modal normal
onoff
![Page 12: Interface Gráfica](https://reader030.vdocuments.mx/reader030/viewer/2022033102/56815a86550346895dc7f51e/html5/thumbnails/12.jpg)
MA
TLA
B A
vanç
ado
– In
terf
ace
gráf
ica
Posição e Tamanho iniciais width
height
Name
y
x
![Page 13: Interface Gráfica](https://reader030.vdocuments.mx/reader030/viewer/2022033102/56815a86550346895dc7f51e/html5/thumbnails/13.jpg)
MA
TLA
B A
vanç
ado
– In
terf
ace
gráf
ica
![Page 14: Interface Gráfica](https://reader030.vdocuments.mx/reader030/viewer/2022033102/56815a86550346895dc7f51e/html5/thumbnails/14.jpg)
MA
TLA
B A
vanç
ado
– In
terf
ace
gráf
ica
Ao ser clicado:
![Page 15: Interface Gráfica](https://reader030.vdocuments.mx/reader030/viewer/2022033102/56815a86550346895dc7f51e/html5/thumbnails/15.jpg)
MA
TLA
B A
vanç
ado
– In
terf
ace
gráf
ica
Alterações em tempo de projeto
Alterações em tempo de execução
X
![Page 16: Interface Gráfica](https://reader030.vdocuments.mx/reader030/viewer/2022033102/56815a86550346895dc7f51e/html5/thumbnails/16.jpg)
MA
TLA
B A
vanç
ado
– In
terf
ace
gráf
ica
![Page 17: Interface Gráfica](https://reader030.vdocuments.mx/reader030/viewer/2022033102/56815a86550346895dc7f51e/html5/thumbnails/17.jpg)
MA
TLA
B A
vanç
ado
– In
terf
ace
gráf
ica
![Page 18: Interface Gráfica](https://reader030.vdocuments.mx/reader030/viewer/2022033102/56815a86550346895dc7f51e/html5/thumbnails/18.jpg)
MA
TLA
B A
vanç
ado
– In
terf
ace
gráf
ica
get(handles.edit1,'String')
Tag
![Page 19: Interface Gráfica](https://reader030.vdocuments.mx/reader030/viewer/2022033102/56815a86550346895dc7f51e/html5/thumbnails/19.jpg)
MA
TLA
B A
vanç
ado
– In
terf
ace
gráf
ica
set(handles.text1,'String',C)
![Page 20: Interface Gráfica](https://reader030.vdocuments.mx/reader030/viewer/2022033102/56815a86550346895dc7f51e/html5/thumbnails/20.jpg)
MA
TLA
B A
vanç
ado
– In
terf
ace
gráf
ica
Dica: o valor inicial das caixas pode ser
configurado no Property Inspector
Uma função qualquer desenvolvida pelo
programador
function C=soma(A,B)
![Page 21: Interface Gráfica](https://reader030.vdocuments.mx/reader030/viewer/2022033102/56815a86550346895dc7f51e/html5/thumbnails/21.jpg)
MA
TLA
B A
vanç
ado
– In
terf
ace
gráf
ica
Mostrando o número do item escolhido Mostrando o item escolhido
Preparando uma List Box
![Page 22: Interface Gráfica](https://reader030.vdocuments.mx/reader030/viewer/2022033102/56815a86550346895dc7f51e/html5/thumbnails/22.jpg)
MA
TLA
B A
vanç
ado
– In
terf
ace
gráf
ica
Preparando um Popup menu
Mostrando o item escolhido
![Page 23: Interface Gráfica](https://reader030.vdocuments.mx/reader030/viewer/2022033102/56815a86550346895dc7f51e/html5/thumbnails/23.jpg)
MA
TLA
B A
vanç
ado
– In
terf
ace
gráf
ica
Adicionando itens em tempo de execução
![Page 24: Interface Gráfica](https://reader030.vdocuments.mx/reader030/viewer/2022033102/56815a86550346895dc7f51e/html5/thumbnails/24.jpg)
MA
TLA
B A
vanç
ado
– In
terf
ace
gráf
ica
10
![Page 25: Interface Gráfica](https://reader030.vdocuments.mx/reader030/viewer/2022033102/56815a86550346895dc7f51e/html5/thumbnails/25.jpg)
MA
TLA
B A
vanç
ado
– In
terf
ace
gráf
ica
“Apenas um RadioButton pode estar selecionado de cada vez”
Você deve cuidar para que essa regra seja obedecida.
![Page 26: Interface Gráfica](https://reader030.vdocuments.mx/reader030/viewer/2022033102/56815a86550346895dc7f51e/html5/thumbnails/26.jpg)
MA
TLA
B A
vanç
ado
– In
terf
ace
gráf
ica
![Page 27: Interface Gráfica](https://reader030.vdocuments.mx/reader030/viewer/2022033102/56815a86550346895dc7f51e/html5/thumbnails/27.jpg)
MA
TLA
B A
vanç
ado
– In
terf
ace
gráf
ica
Para o checkbox não existe regra!
![Page 28: Interface Gráfica](https://reader030.vdocuments.mx/reader030/viewer/2022033102/56815a86550346895dc7f51e/html5/thumbnails/28.jpg)
MA
TLA
B A
vanç
ado
– In
terf
ace
gráf
ica
Limites mínimo e máximo:
![Page 29: Interface Gráfica](https://reader030.vdocuments.mx/reader030/viewer/2022033102/56815a86550346895dc7f51e/html5/thumbnails/29.jpg)
MA
TLA
B A
vanç
ado
– In
terf
ace
gráf
ica
![Page 30: Interface Gráfica](https://reader030.vdocuments.mx/reader030/viewer/2022033102/56815a86550346895dc7f51e/html5/thumbnails/30.jpg)
MA
TLA
B A
vanç
ado
– In
terf
ace
gráf
ica
Alt + f
Note: para exibir a letra mnemônica na forma sublinhada pressione “alt”
![Page 31: Interface Gráfica](https://reader030.vdocuments.mx/reader030/viewer/2022033102/56815a86550346895dc7f51e/html5/thumbnails/31.jpg)
MA
TLA
B A
vanç
ado
– In
terf
ace
gráf
ica
Formulário Principal:
Formulário Secundário:
Modal vs Não Modal
![Page 32: Interface Gráfica](https://reader030.vdocuments.mx/reader030/viewer/2022033102/56815a86550346895dc7f51e/html5/thumbnails/32.jpg)
MA
TLA
B A
vanç
ado
– In
terf
ace
gráf
ica
![Page 33: Interface Gráfica](https://reader030.vdocuments.mx/reader030/viewer/2022033102/56815a86550346895dc7f51e/html5/thumbnails/33.jpg)
MA
TLA
B A
vanç
ado
– In
terf
ace
gráf
ica
![Page 34: Interface Gráfica](https://reader030.vdocuments.mx/reader030/viewer/2022033102/56815a86550346895dc7f51e/html5/thumbnails/34.jpg)
MA
TLA
B A
vanç
ado
– In
terf
ace
gráf
ica
![Page 35: Interface Gráfica](https://reader030.vdocuments.mx/reader030/viewer/2022033102/56815a86550346895dc7f51e/html5/thumbnails/35.jpg)
MA
TLA
B A
vanç
ado
– In
terf
ace
gráf
ica
![Page 36: Interface Gráfica](https://reader030.vdocuments.mx/reader030/viewer/2022033102/56815a86550346895dc7f51e/html5/thumbnails/36.jpg)
MA
TLA
B A
vanç
ado
– In
terf
ace
gráf
ica
![Page 37: Interface Gráfica](https://reader030.vdocuments.mx/reader030/viewer/2022033102/56815a86550346895dc7f51e/html5/thumbnails/37.jpg)
MA
TLA
B A
vanç
ado
– In
terf
ace
gráf
ica
![Page 38: Interface Gráfica](https://reader030.vdocuments.mx/reader030/viewer/2022033102/56815a86550346895dc7f51e/html5/thumbnails/38.jpg)
MA
TLA
B A
vanç
ado
– In
terf
ace
gráf
ica
Esse trecho é executado sempre que o formulário secundário é criado!
![Page 39: Interface Gráfica](https://reader030.vdocuments.mx/reader030/viewer/2022033102/56815a86550346895dc7f51e/html5/thumbnails/39.jpg)
MA
TLA
B A
vanç
ado
– In
terf
ace
gráf
ica Não programe nesse trecho! Ele
é executado sempre que uma funçãoCallback é utilizada.
![Page 40: Interface Gráfica](https://reader030.vdocuments.mx/reader030/viewer/2022033102/56815a86550346895dc7f51e/html5/thumbnails/40.jpg)
MA
TLA
B A
vanç
ado
– In
terf
ace
gráf
ica
Interface Central
Programasauxiliares
Programasauxiliares
Programasauxiliares
Programasauxiliares
Programasauxiliares
Programasauxiliares
![Page 41: Interface Gráfica](https://reader030.vdocuments.mx/reader030/viewer/2022033102/56815a86550346895dc7f51e/html5/thumbnails/41.jpg)
MA
TLA
B A
vanç
ado
– In
terf
ace
gráf
ica
Mas como implementar interface gráfica em umprograma complexo previamente desenvolvido?
Programa Principal
Interface Programasauxiliares
Programasauxiliares
![Page 42: Interface Gráfica](https://reader030.vdocuments.mx/reader030/viewer/2022033102/56815a86550346895dc7f51e/html5/thumbnails/42.jpg)
MA
TLA
B A
vanç
ado
– In
terf
ace
gráf
ica
Programa Principal:
![Page 43: Interface Gráfica](https://reader030.vdocuments.mx/reader030/viewer/2022033102/56815a86550346895dc7f51e/html5/thumbnails/43.jpg)
MA
TLA
B A
vanç
ado
– In
terf
ace
gráf
ica
![Page 44: Interface Gráfica](https://reader030.vdocuments.mx/reader030/viewer/2022033102/56815a86550346895dc7f51e/html5/thumbnails/44.jpg)
MA
TLA
B A
vanç
ado
– In
terf
ace
gráf
ica
![Page 45: Interface Gráfica](https://reader030.vdocuments.mx/reader030/viewer/2022033102/56815a86550346895dc7f51e/html5/thumbnails/45.jpg)
MA
TLA
B A
vanç
ado
– In
terf
ace
gráf
ica
errordlg('texto de erro','titulo','modal') warndlg('texto de erro','titulo','modal')
prompt{1}='Pergunta 1';prompt{2}='Pergunta 2';prompt{3}='Pergunta 3';resposta=inputdlg(prompt,'titulo')
helpdlg('texto de erro','titulo')
resposta = 'essa é a resposta 1' 'resposta 2' 'terceira resposta'
![Page 46: Interface Gráfica](https://reader030.vdocuments.mx/reader030/viewer/2022033102/56815a86550346895dc7f51e/html5/thumbnails/46.jpg)
MA
TLA
B A
vanç
ado
– In
terf
ace
gráf
ica
ButtonName=questdlg('Voce entende isso?','Pergunta','Sim','Naoooo','Sim')
ButtonName=questdlg('Voce entende isso?','Pergunta','Sim','Naoooo','Sei la!','Sim')
Botão 1
Botão 2
Botão 3
Default
Essa função retorna o texto do botão
![Page 47: Interface Gráfica](https://reader030.vdocuments.mx/reader030/viewer/2022033102/56815a86550346895dc7f51e/html5/thumbnails/47.jpg)
MA
TLA
B A
vanç
ado
– In
terf
ace
gráf
ica
[arq caminho]=uigetfile('*.txt','Abrir Arquivo')
arq = economatica.txtcaminho = C:\Documents and Settings\Administrador\Desktop\
![Page 48: Interface Gráfica](https://reader030.vdocuments.mx/reader030/viewer/2022033102/56815a86550346895dc7f51e/html5/thumbnails/48.jpg)
MA
TLA
B A
vanç
ado
– In
terf
ace
gráf
ica
[arq caminho]=uiputfile('*.txt','Salvar Arquivo')
arq = nomedoarqcaminho =C:\Documents and Settings\Administrador\Desktop\
![Page 49: Interface Gráfica](https://reader030.vdocuments.mx/reader030/viewer/2022033102/56815a86550346895dc7f51e/html5/thumbnails/49.jpg)
MA
TLA
B A
vanç
ado
– In
terf
ace
gráf
ica
uisetcolor
ans = 0.5020 1.0000 0
ans = FontName: '@GulimChe' FontUnits: 'points' FontSize: 9 FontWeight: 'normal' FontAngle: 'italic'
uisetfont
![Page 50: Interface Gráfica](https://reader030.vdocuments.mx/reader030/viewer/2022033102/56815a86550346895dc7f51e/html5/thumbnails/50.jpg)
MA
TLA
B A
vanç
ado
– In
terf
ace
gráf
ica
Instale o aplicativo Winicon200 no diretório de trabalho.
http://www.rndee.dkArquivo disponível em:
![Page 51: Interface Gráfica](https://reader030.vdocuments.mx/reader030/viewer/2022033102/56815a86550346895dc7f51e/html5/thumbnails/51.jpg)
MA
TLA
B A
vanç
ado
– In
terf
ace
gráf
ica
Interface GráficaGuide
Carlos André Vaz Junior [email protected]
http://www.eq.ufrj.br/links/h2cin/carlosandre